fix(web): ignore stale aggregate health snapshots #53

Merged
vince merged 1 commit from codex/fix-initial-stale-health-summary into main 2026-06-20 15:54:34 +02:00
Owner

Summary

Prevent warm-start tile snapshots from restoring derived aggregate health summaries over the fresh dashboard shell.

Why

A browser can keep an old system-status or runtime-health-summary snapshot from a transient monitoring failure. On the next page load, that stale aggregate could briefly show many services down until tile hydration corrected it.

Changes

  • Skip persisted/restored snapshots for system-status and runtime-health-summary.
  • Keep leaf tile warm-start behavior for telemetry, individual services, and other useful tile data.
  • Add regression coverage for snapshot-store restore and App shell restore.

Testing

  • bun --cwd apps/web test src/lib/client/dashboard-refresh.test.ts failed before the fix and passed after.
  • bun --cwd apps/web test src/App.test.tsx failed before the App restore guard and passed after.
  • bun install --frozen-lockfile
  • bun run check
  • bun run test
  • bun run build

Notes

This does not disable last-known data globally; it only avoids replaying derived aggregate summaries that can be misleading at startup.

## Summary Prevent warm-start tile snapshots from restoring derived aggregate health summaries over the fresh dashboard shell. ## Why A browser can keep an old `system-status` or `runtime-health-summary` snapshot from a transient monitoring failure. On the next page load, that stale aggregate could briefly show many services down until tile hydration corrected it. ## Changes - Skip persisted/restored snapshots for `system-status` and `runtime-health-summary`. - Keep leaf tile warm-start behavior for telemetry, individual services, and other useful tile data. - Add regression coverage for snapshot-store restore and App shell restore. ## Testing - `bun --cwd apps/web test src/lib/client/dashboard-refresh.test.ts` failed before the fix and passed after. - `bun --cwd apps/web test src/App.test.tsx` failed before the App restore guard and passed after. - `bun install --frozen-lockfile` - `bun run check` - `bun run test` - `bun run build` ## Notes This does not disable last-known data globally; it only avoids replaying derived aggregate summaries that can be misleading at startup.
vince added 1 commit 2026-06-20 15:51:21 +02:00
vince merged commit 29077923e8 into main 2026-06-20 15:54:34 +02:00
Sign in to join this conversation.
No description provided.