perf(web): stream dashboard tile events #52

Merged
vince merged 1 commit from codex/dashboard-sse-events into main 2026-06-20 15:26:49 +02:00
Owner

Summary

Add optional dashboard tile SSE transport.

Why

Multiple clients should be able to consume server-side tile refresh payloads through a shared live transport when available, while keeping the existing polling and batch hydration fallback.

Changes

  • Adds GET /api/dashboard/events returning text/event-stream.
  • Emits dashboard-tile events with ready tile payloads resolved through the existing cache/coalescing path.
  • Adds a client EventSource subscription helper with unavailable/error fallback behavior.
  • Wires App to apply ready SSE tile payloads while preserving polling and batch hydration.
  • Adds route, router, and client helper coverage.

Testing

  • bun --filter @dimensionlab/web test -- src/server/index.test.ts src/server/routes/dashboard.test.ts 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

SSE is optional; normal polling plus batch hydration remains the fallback. No packages/ui changes.

## Summary Add optional dashboard tile SSE transport. ## Why Multiple clients should be able to consume server-side tile refresh payloads through a shared live transport when available, while keeping the existing polling and batch hydration fallback. ## Changes - Adds GET /api/dashboard/events returning text/event-stream. - Emits dashboard-tile events with ready tile payloads resolved through the existing cache/coalescing path. - Adds a client EventSource subscription helper with unavailable/error fallback behavior. - Wires App to apply ready SSE tile payloads while preserving polling and batch hydration. - Adds route, router, and client helper coverage. ## Testing - bun --filter @dimensionlab/web test -- src/server/index.test.ts src/server/routes/dashboard.test.ts 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 SSE is optional; normal polling plus batch hydration remains the fallback. No packages/ui changes.
vince added 1 commit 2026-06-20 15:23:29 +02:00
vince merged commit 216545b838 into main 2026-06-20 15:26:49 +02:00
Sign in to join this conversation.
No description provided.