Remove completed TASK-012 from task list
TASK-012 (SetupGuard duplicate API calls) has been resolved and is no longer relevant to track in the tasks document. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -1,33 +1,3 @@
|
||||
## TASK-012 — `SetupGuard` fires duplicate API calls on mount
|
||||
|
||||
**Severity:** Low
|
||||
|
||||
### Where found
|
||||
Frontend setup guard component — the setup status check is performed by multiple consumers independently on mount, resulting in duplicate `GET /api/setup` requests.
|
||||
|
||||
### Why this is needed
|
||||
Duplicate API calls on mount create unnecessary backend load and introduce potential race conditions where both calls return slightly different states. It also increases perceived load time.
|
||||
|
||||
### Goal
|
||||
Deduplicate the setup status check so all consumers share a single in-flight request.
|
||||
|
||||
### What to do
|
||||
1. Move the setup status fetch into a shared React Query (`useQuery`) call keyed by `"setupStatus"`.
|
||||
2. Any component that needs the setup status reads from the same query cache — React Query deduplicates concurrent requests automatically.
|
||||
3. Remove any direct `fetch` calls for setup status that bypass the shared query.
|
||||
|
||||
### Possible traps and issues
|
||||
- React Query must be installed and configured at the app root.
|
||||
- The cache TTL for setup status should be relatively short (e.g., 30 seconds) or invalidated after a successful setup completion.
|
||||
|
||||
### Docs changes needed
|
||||
- `Web-Development.md` — data-fetching conventions (use React Query, not raw `fetch`).
|
||||
|
||||
### Doc references
|
||||
- [Web-Development.md](Web-Development.md) — data fetching patterns
|
||||
|
||||
---
|
||||
|
||||
## TASK-013 — nginx missing security response headers
|
||||
|
||||
**Severity:** High
|
||||
|
||||
Reference in New Issue
Block a user