3.8 KiB
3.8 KiB
id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, system_design
| id | title | status | wave | depends_on | plan | requirements | acceptance_criteria | system_design | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 03-live-analysis-ui | Render live analysis details | done | 3 |
|
plan.md |
|
|
|
Task 03: Render Live Analysis Details
Summary
Consume the progressive backend contract. Show cold-scan results, keep stale snapshots visible, and add the scan and cache information disclosure on desktop and phone.
In scope
- Update API, Zustand, and WebSocket types.
- Reload on analysis revisions and poll while a scan is active.
- Request a refresh at
refresh_due_atwhile the page is mounted. - Render completed, pending, failed, stale, and ready states.
- Add localized timing and progress copy in all required catalogs.
- Update
docs/public/operations.mdwith the refresh behavior.
Out of scope
- Backend scan logic.
- A new mobile route, drawer, or scroll owner.
- Time-remaining estimates.
Acceptance
- The first scan reveals completed sources and labels every aggregate as counted so far.
- A stale snapshot remains readable while progress updates continue.
- The timing disclosure works by hover, focus, click, and 44-pixel phone tap.
Verification
(cd apps && pnpm --filter @kandev/web test -- --run lib/state/slices/system/system-slice.test.ts lib/ws/handlers/system-events.test.ts hooks/domains/system/use-storage-maintenance.test.tsx hooks/domains/system/use-storage-maintenance-terminal-refresh.test.tsx components/settings/system/storage/storage-overview-card.test.tsx)
(cd apps/web && pnpm run typecheck)
(cd apps/web && pnpm run i18n:check)
node --test scripts/validate-public-docs.test.mjs
node scripts/validate-public-docs.mjs
Files likely touched
apps/web/lib/types/system.tsapps/web/lib/api/domains/system-api.tsapps/web/lib/api/domains/system-api.test.tsapps/web/lib/state/slices/system/types.tsapps/web/lib/state/slices/system/system-slice.tsapps/web/lib/state/slices/system/system-slice.test.tsapps/web/lib/ws/handlers/system-events.tsapps/web/lib/ws/handlers/system-events.test.tsapps/web/hooks/domains/system/use-storage-maintenance.tsapps/web/hooks/domains/system/use-storage-maintenance.test.tsxapps/web/components/settings/system/storage/storage-overview-card.tsxapps/web/components/settings/system/storage/storage-overview-card.test.tsxapps/web/components/settings/system/storage/storage-setting-help.tsxapps/web/src/locales/*/system.jsondocs/public/operations.md
Dependencies
Task 02 defines the API and event contract.
Risks
- A refresh timer can operate twice after a rerender if cleanup is incomplete.
- Partial and stale summaries can be combined accidentally.
- Tooltip content can become hover-only or too small for phone input.
Parallelism
sequential
Inputs
storage-analysis-progress.mdsections "Progress delivery" and "Storage page".- Current
StorageSettingHelpand Storage mobile E2E patterns.
Results
Implemented progressive API/event state, polling and deadline refresh hooks, localized source and timing disclosure UI, mobile-sized help interaction, and operator documentation. The focused suite passed with 48 tests across five files, typecheck and lint passed, i18n catalogs and ratchet passed, and public-doc validation passed.