diff --git a/spec/SDD-Keylime-Monitoring-Tool.md b/spec/SDD-Keylime-Monitoring-Tool.md index a09d1fe..2280170 100644 --- a/spec/SDD-Keylime-Monitoring-Tool.md +++ b/spec/SDD-Keylime-Monitoring-Tool.md @@ -992,7 +992,7 @@ The Backend URL is also runtime-configurable via the Settings page (FR-072). The * `/api/*` -> `http://localhost:8080` (API backend, avoids CORS in dev mode) * `/ws/*` -> `ws://localhost:8080` (WebSocket) -**Auto-Refresh Wiring:** The `visualizationStore` `autoRefresh` and `refreshInterval` settings are connected to `QueryClient.setDefaultOptions({ queries: { refetchInterval } })` in `App.tsx`, so all TanStack React Query hooks automatically poll at the configured interval when auto-refresh is enabled. +**Auto-Refresh Wiring:** The `visualizationStore` `autoRefresh` and `refreshInterval` settings are connected to `QueryClient.setDefaultOptions({ queries: { refetchInterval } })` in `App.tsx`, so all TanStack React Query hooks automatically poll at the configured interval when auto-refresh is enabled. When auto-refresh is disabled, `refetchInterval` is set to `false`, which stops all automatic polling. The refresh interval configuration control in the Settings page is also disabled (non-interactive) while auto-refresh is off, since the interval value has no effect. **Trace:** Implementation -- `keylime-webtool-frontend/vite.config.ts`, `keylime-webtool-frontend/src/App.tsx` @@ -1020,7 +1020,7 @@ Maximum 5 parallel concurrent log fetches to the Verifier API, enforced via Toki | Rust (Axum) for backend | Memory safety without GC, `#![forbid(unsafe_code)]`, async performance for 10K WebSocket connections | SR-023, NFR-005 | | React + TypeScript for frontend | Type safety, component reuse, ecosystem maturity for SPA | NFR-004 | | Zustand for client state | Lightweight, no boilerplate, supports localStorage persistence for settings | FR-008 | -| TanStack React Query for server state | Automatic cache invalidation, stale-while-revalidate, retry logic; `refetchInterval` wired to auto-refresh settings | NFR-001, FR-006 | +| TanStack React Query for server state | Automatic cache invalidation, stale-while-revalidate, retry logic; `refetchInterval` wired to auto-refresh settings (`false` when disabled) | NFR-001, FR-006 | | In-memory AlertStore (pre-DB) | Enables full alert lifecycle development before TimescaleDB integration | FR-047 | | Circuit breaker on Keylime API | Prevents cascading failures when Verifier is overloaded or unreachable | NFR-017 | | Health probes bypass circuit breaker | Connectivity status must reflect real reachability, not circuit breaker state | FR-057, FR-077 | diff --git a/spec/SRS-Keylime-Monitoring-Tool.md b/spec/SRS-Keylime-Monitoring-Tool.md index cca02a7..dab2f70 100644 --- a/spec/SRS-Keylime-Monitoring-Tool.md +++ b/spec/SRS-Keylime-Monitoring-Tool.md @@ -346,7 +346,7 @@ Feature: Time Range Selector ### FR-006: Auto-Refresh Toggle -**Description:** The System MUST provide a toggle control that enables or disables live automatic updates of dashboard data. When enabled, the auto-refresh setting and configurable interval MUST be wired to the data fetching layer (TanStack React Query `refetchInterval`) so that all queries automatically poll the backend. The auto-refresh interval MUST be configurable via the Settings page visualization settings. +**Description:** The System MUST provide a toggle control that enables or disables live automatic updates of dashboard data. When enabled, the auto-refresh setting and configurable interval MUST be wired to the data fetching layer (TanStack React Query `refetchInterval`) so that all queries automatically poll the backend. When disabled, `refetchInterval` MUST be set to `false`, stopping all automatic polling, and the refresh interval configuration control MUST be disabled (non-interactive) since it has no effect while auto-refresh is off. The auto-refresh interval MUST be configurable via the Settings page visualization settings. **Trace:** Dashboard - Navigation Structure @@ -358,11 +358,13 @@ Feature: Auto-Refresh Toggle When the user toggles auto-refresh off Then dashboard data MUST stop refreshing automatically And the displayed data MUST remain static until manually refreshed or re-enabled + And the refresh interval configuration control MUST be disabled Scenario: Enable auto-refresh Given auto-refresh is currently disabled When the user toggles auto-refresh on Then dashboard data MUST begin refreshing at the configured interval + And the refresh interval configuration control MUST be enabled Scenario: Auto-refresh interval drives all queries Given auto-refresh is enabled with a 10-second interval