feat: render dashboard from model #20

Merged
vince merged 3 commits from codex/issue-7-model-renderer into main 2026-06-18 19:33:29 +02:00
Owner

Summary

Renders the one-page dashboard directly from the validated dashboard model.

Closes #7.

Why

The MVP needs to prove that layout, content, icons, telemetry, services, modules, and status data flow through the model rather than preview fixtures or component hardcoding.

Changes

  • Added a typed dashboardDocumentToUiDashboard projection from DashboardDocument to reusable UI props.
  • Updated the server runtime loader to return ready, empty, or invalid model states.
  • Replaced the page preview switcher with direct active-model rendering and invalid/empty states.
  • Added stable data-model-id attributes to telemetry cards, service rows, modules, and footer cells.
  • Added renderer tests for Dimension Lab and generic fixtures plus empty model sections.
  • Updated route/server tests for ready and invalid runtime states.

Testing

  • bun run vitest run src/lib/ui/model-renderer.test.ts src/routes/page.test.ts src/lib/server/dashboard.test.ts src/lib/ui/components/render.test.ts -> 13 tests passed.
  • bun run test -> 10 files, 48 tests passed.
  • bun run check -> 0 Svelte diagnostics.
  • bun run build -> production app build passed.
  • bun run build-storybook -> static Storybook build passed.
  • git diff --check -> clean.
  • UI/route source search for Dimension Lab-specific terms -> no matches outside tests/stories/data.

Notes

  • Live datasource polling remains out of scope; the renderer uses the seed/static/fallback values already present in the validated model.
## Summary Renders the one-page dashboard directly from the validated dashboard model. Closes #7. ## Why The MVP needs to prove that layout, content, icons, telemetry, services, modules, and status data flow through the model rather than preview fixtures or component hardcoding. ## Changes - Added a typed `dashboardDocumentToUiDashboard` projection from `DashboardDocument` to reusable UI props. - Updated the server runtime loader to return `ready`, `empty`, or `invalid` model states. - Replaced the page preview switcher with direct active-model rendering and invalid/empty states. - Added stable `data-model-id` attributes to telemetry cards, service rows, modules, and footer cells. - Added renderer tests for Dimension Lab and generic fixtures plus empty model sections. - Updated route/server tests for ready and invalid runtime states. ## Testing - `bun run vitest run src/lib/ui/model-renderer.test.ts src/routes/page.test.ts src/lib/server/dashboard.test.ts src/lib/ui/components/render.test.ts` -> 13 tests passed. - `bun run test` -> 10 files, 48 tests passed. - `bun run check` -> 0 Svelte diagnostics. - `bun run build` -> production app build passed. - `bun run build-storybook` -> static Storybook build passed. - `git diff --check` -> clean. - UI/route source search for Dimension Lab-specific terms -> no matches outside tests/stories/data. ## Notes - Live datasource polling remains out of scope; the renderer uses the seed/static/fallback values already present in the validated model.
vince added 1 commit 2026-06-18 19:23:16 +02:00
vince added 1 commit 2026-06-18 19:29:32 +02:00
vince added 1 commit 2026-06-18 19:32:35 +02:00
vince merged commit af09f705b1 into main 2026-06-18 19:33:29 +02:00
Sign in to join this conversation.
No description provided.