diff --git a/Docs/Tasks.md b/Docs/Tasks.md index e3eb49e..02d3778 100644 --- a/Docs/Tasks.md +++ b/Docs/Tasks.md @@ -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