Standardise AbortController cancellation in setup and server health hooks

Add abortable API signals for setup status and server health/log fetches, document hook cancellation patterns, and cover stale refresh cancellation with tests.
This commit is contained in:
2026-04-21 17:38:35 +02:00
parent cf5a000bf5
commit e683108965
7 changed files with 203 additions and 12 deletions

View File

@@ -283,7 +283,9 @@ Issues are grouped by category and ordered roughly by severity. Each entry descr
---
### TASK-015 — Standardise AbortController pattern across all hooks
### TASK-015 — Standardise AbortController pattern across all hooks (done)
**Where fixed:** `frontend/src/hooks/useSetup.ts`, `frontend/src/hooks/useServerHealth.ts`, `frontend/src/api/setup.ts`, `frontend/src/api/config.ts`, `frontend/src/hooks/README.md`, `frontend/src/hooks/__tests__/useSetupAndServerHealth.test.ts`
**Where found:** Three different patterns exist in `frontend/src/hooks/`:
1. `useRef<AbortController | null>` with manual abort before each fetch (correct — used in `useActiveBans`, `useActionList`).