perf(web): adapt dashboard refresh hydration #49

Merged
vince merged 1 commit from codex/dashboard-adaptive-hydration into main 2026-06-20 14:52:01 +02:00
Owner

Summary

Add adaptive client refresh scheduling and viewport-aware dashboard tile hydration.

Why

The dashboard should avoid synchronized refresh bursts, slow down during repeated refresh failures, and spend tile hydration work on visible content before below-the-fold content.

Changes

  • Replaces fixed refresh intervals with jittered one-shot scheduling.
  • Adds refresh failure backoff for shell reloads while still skipping hidden/offline states.
  • Uses existing data-model-id attributes with IntersectionObserver to identify visible tiles.
  • Hydrates visible tiles first, then waits for idle before below-the-fold work.
  • Adds unit coverage for visible-first ordering, idle deferral, IntersectionObserver collection, and jittered failure delays.

Testing

  • bun --filter @dimensionlab/web test -- src/lib/client/dashboard-refresh.test.ts src/App.test.tsx
  • bun --filter @dimensionlab/web check
  • bun install --frozen-lockfile
  • bun run check
  • bun run test

Notes

No packages/ui changes; viewport detection uses existing rendered data-model-id attributes.

## Summary Add adaptive client refresh scheduling and viewport-aware dashboard tile hydration. ## Why The dashboard should avoid synchronized refresh bursts, slow down during repeated refresh failures, and spend tile hydration work on visible content before below-the-fold content. ## Changes - Replaces fixed refresh intervals with jittered one-shot scheduling. - Adds refresh failure backoff for shell reloads while still skipping hidden/offline states. - Uses existing data-model-id attributes with IntersectionObserver to identify visible tiles. - Hydrates visible tiles first, then waits for idle before below-the-fold work. - Adds unit coverage for visible-first ordering, idle deferral, IntersectionObserver collection, and jittered failure delays. ## Testing - bun --filter @dimensionlab/web test -- src/lib/client/dashboard-refresh.test.ts src/App.test.tsx - bun --filter @dimensionlab/web check - bun install --frozen-lockfile - bun run check - bun run test ## Notes No packages/ui changes; viewport detection uses existing rendered data-model-id attributes.
vince added 1 commit 2026-06-20 14:48:07 +02:00
vince merged commit b6de67f081 into main 2026-06-20 14:52:01 +02:00
Sign in to join this conversation.
No description provided.