Mark Task 7 as done in Tasks.md

This commit is contained in:
2026-03-14 19:51:12 +01:00
parent 4b6e118a88
commit d3b2022ffb

View File

@@ -336,7 +336,13 @@ The `deactivate_jail` endpoint in `backend/app/routers/config.py` is inconsisten
## Task 7 — Fix ActivateJailDialog not honouring backend rejection and mypy false positive
**Status:** in progress
**Status:** done
**Summary:**
- **Bug 1** (`ActivateJailDialog.tsx`): Added `|| blockingIssues.length > 0` to the "Activate" button's `disabled` prop so the button is correctly greyed-out when pre-validation surfaces any blocking issue (filter or logpath problems).
- **Bug 2** (`ActivateJailDialog.tsx`): `handleConfirm`'s `.then()` handler now checks `result.active` first. When `active=false` the dialog stays open and shows `result.message` as an error; `resetForm()` and `onActivated()` are only called on `active=true`.
- **Bug 3** (`config.py`): Added `# type: ignore[call-arg]` with a comment to `Settings()` call to suppress the mypy strict-mode false positive caused by pydantic-settings loading required fields from environment variables at runtime.
- **Tests**: Added `ActivateJailDialog.test.tsx` with 5 tests (button disabled on blocking issues, button enabled on clean validation, dialog stays open on backend rejection, `onActivated` called on success, `onCrashDetected` fired when `fail2ban_running=false`).
### Problem description