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:
@@ -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`).
|
||||
|
||||
Reference in New Issue
Block a user