From 2331567bd792cf54d74a8fd13f6ad8559d121318 Mon Sep 17 00:00:00 2001 From: Lukas Date: Sun, 26 Apr 2026 13:40:48 +0200 Subject: [PATCH] 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> --- Docs/Tasks.md | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/Docs/Tasks.md b/Docs/Tasks.md index c9ddebb..72f1bf6 100644 --- a/Docs/Tasks.md +++ b/Docs/Tasks.md @@ -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