feat(dashboard): Run detail page + flamegraph#29
Merged
Conversation
3 tasks
Exelord
added a commit
that referenced
this pull request
May 12, 2026
…ents (#27) PR 8/10 of the dashboard track. Replaces the legacy static-HTML page modules (still living in packages/run/src/dashboard-ui/, to be removed in PR #28) with proper Solid components. - @solidjs/router HashRouter — URLs stay shaped like the legacy app (#/overview, #/runs, #/runs/:id) and the bundle works as a flat static asset without SPA-fallback server config - src/api.ts: response types (OverviewResponse, RunSummary, SlowestTask, CacheEntryRow) + fetchJson<T> - src/format.ts: formatAge / formatPercent / shortHash / shortRunId added, with tests; pre-existing formatBytes / formatDurationMs / formatRelativeTime kept - Shared chrome via a <Shell> root component; pages render into it via the router's outlet - <AsyncView resource={r}> for uniform loading/error/data handling on top of createResource - Card / Empty primitives for the recurring summary-card and empty-state shapes Run-detail + flamegraph land in PR #29; legacy dashboard-ui/ removal + server-side static-serving rewrite is PR #28. Production bundle: ~46 KB raw / 16 KB gzipped JS, 5 KB CSS. Co-authored-by: Claude <noreply@anthropic.com>
5 tasks
Exelord
pushed a commit
that referenced
this pull request
May 12, 2026
PR 9/10. Wires the JSON API server to the built Solid bundle and
deletes the inlined vanilla-JS UI.
- DashboardServerOptions: new required `uiDir` field
- handleRequest(db, req, uiDir): static-serving path is uiDir-relative
- resolveUiDir(): VZN_DASHBOARD_DIST env override → repo-relative
apps/dashboard/dist; throws DashboardUiMissingError with a
'bun --cwd apps/dashboard run build' fixit when missing
- Static-serving tests rewritten for the Vite layout
(index.html + assets/<hashed>.{js,css}) and a path-traversal guard
- beforeAll builds the dist lazily on cold local runs; CI gets an
explicit 'Build dashboard UI' step so test logs don't mix in vite
output
Run-detail + flamegraph is the last dashboard PR (#29).
94b902b to
ba32df2
Compare
b5f3f6e to
4aa6034
Compare
Exelord
pushed a commit
that referenced
this pull request
May 12, 2026
PR 9/10. Wires the JSON API server to the built Solid bundle and
deletes the inlined vanilla-JS UI.
- DashboardServerOptions: new required `uiDir` field
- handleRequest(db, req, uiDir): static-serving path is uiDir-relative
- resolveUiDir(): VZN_DASHBOARD_DIST env override → repo-relative
apps/dashboard/dist; throws DashboardUiMissingError with a
'bun --cwd apps/dashboard run build' fixit when missing
- Static-serving tests rewritten for the Vite layout
(index.html + assets/<hashed>.{js,css}) and a path-traversal guard
- beforeAll builds the dist lazily on cold local runs; CI gets an
explicit 'Build dashboard UI' step so test logs don't mix in vite
output
Run-detail + flamegraph is the last dashboard PR (#29).
ba32df2 to
eee970a
Compare
4aa6034 to
dcd76cc
Compare
Exelord
pushed a commit
that referenced
this pull request
May 12, 2026
PR 9/10. Wires the JSON API server to the built Solid bundle and
deletes the inlined vanilla-JS UI.
- DashboardServerOptions: new required `uiDir` field
- handleRequest(db, req, uiDir): static-serving path is uiDir-relative
- resolveUiDir(): VZN_DASHBOARD_DIST env override → repo-relative
apps/dashboard/dist; throws DashboardUiMissingError with a
'bun --cwd apps/dashboard run build' fixit when missing
- Static-serving tests rewritten for the Vite layout
(index.html + assets/<hashed>.{js,css}) and a path-traversal guard
- beforeAll builds the dist lazily on cold local runs; CI gets an
explicit 'Build dashboard UI' step so test logs don't mix in vite
output
Run-detail + flamegraph is the last dashboard PR (#29).
eee970a to
b433a80
Compare
Exelord
added a commit
that referenced
this pull request
May 12, 2026
…i/ (#28) PR 9/10. Wires the JSON API server to the built Solid bundle and deletes the inlined vanilla-JS UI. - DashboardServerOptions: new required `uiDir` field - handleRequest(db, req, uiDir): static-serving path is uiDir-relative - resolveUiDir(): VZN_DASHBOARD_DIST env override → repo-relative apps/dashboard/dist; throws DashboardUiMissingError with a 'bun --cwd apps/dashboard run build' fixit when missing - Static-serving tests rewritten for the Vite layout (index.html + assets/<hashed>.{js,css}) and a path-traversal guard - beforeAll builds the dist lazily on cold local runs; CI gets an explicit 'Build dashboard UI' step so test logs don't mix in vite output Run-detail + flamegraph is the last dashboard PR (#29). Co-authored-by: Claude <noreply@anthropic.com>
PR 10/10 of the dashboard track. Adds the #/runs/:id page that visualises a single 'vzn run' invocation as a flamegraph of task wall-clock spans, plus a task table. - src/flamegraph.ts: pure layout (one lane per project; bars positioned by wallclockStartNs ns-precise when present, ms-epoch fallback for legacy rows); colorForTask classifies status x cacheHit. Unit-tested independent of rendering. - src/components/Flamegraph.tsx: absolute-positioned bars (no canvas, no SVG library); hover sets a footer detail strip - src/pages/RunDetail.tsx: header summary cards (tasks / duration / started / OK / cached / failed), the Flamegraph, then a task table with CPU + peak-RSS columns and a StatusBadge component - Wired into the HashRouter as /runs/:id; the Runs page already links via #/runs/<id>
dcd76cc to
bbff024
Compare
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Final PR of the dashboard 10-PR sequence. Stacked on #28
(which is stacked on #27). Adds the
#/runs/:idpage thatvisualises a single
vzn runinvocation as a flamegraph of taskwall-clock spans, plus a task table.
Pieces
src/flamegraph.ts— pure layout function:wallclockStartNs(ns-precise when present,startedAt-relative ms fallback for legacy rows)colorForTask()classifies status × cacheHitcases)
src/components/Flamegraph.tsx— absolute-positioned bars.No canvas, no SVG library — just
position:absolute+calc().Hover sets a footer detail strip (project:task • duration •
status • cache-hit).
src/pages/RunDetail.tsx— header summary cards (tasks /duration / started / OK / cached / failed), the Flamegraph, then
a task table with CPU + peak-RSS columns and a
StatusBadgecomponent (cache-hit beats raw status).
Wiring
/runs/:idadded to the HashRouter.#/runs/<id>.Test plan
bun run formatcleanbun run lintcleanbun test packages/*/src/ apps/*/src/— 277 pass / 0 failbun x vite build— 38 modules, 53 KB / 18 KB gzipped JS,7 KB CSS
Dashboard 10-PR track is now complete
PRs #19 → #29:
vzn dashboardCLI + JSON APIpackages/run+apps/*)apps/dashboardscaffold (Vite + Solid + UnoCSS)apps/dashboard/dist; delete legacy UIGenerated by Claude Code