Insights SPA: rich pages, more endpoints, dep bumps (Vite 8 / UnoCSS 66)#144
Merged
Conversation
- apps/insights: vite 6→8, unocss 0.65→66 (calver renumber), Solid Router 0.15→0.16. SPA builds clean (17.5 KB gzipped JS). - apps/docs: astro 6.4.6→6.4.8, mermaid 11.6→11.15, sharp 0.34→0.35, unist-util-visit 5.0→5.1. - root: @anthropic-ai/sandbox-runtime 0.0.51→0.0.56, @types/bun 1.3.0→1.3.14, oxfmt 0.48→0.55, oxlint 1.63→1.70, oxlint-tsgolint 0.22→0.23. Lint + 923 tests green.
The SPA was a placeholder — one Overview list, no per-task drilldown, nothing about cache, no charts. Now it's a real dashboard. New SQL backed by /v1/* HTTP routes: - /v1/top-tasks — biggest time-burners (non-hit success totals) - /v1/failures — recent failed runs - /v1/cache/breakdown — bytes per project - /v1/cache/savings — estimated time the cache saved you (24h + all-time) - /v1/cache/entries — full entries listing, sortable by size/age/duration - /v1/tasks/:id — full per-task aggregate + 100 recent runs + latest cache entry Extended TaskHistoryRow with min/avg/max/total/lastSeenAt. RunSummaryRow now carries cpuMs + peakRssBytes (the columns were always there, just not surfaced). SPA pages: - Overview: 4-card hero (time saved 24h, hit rate, entries, total time saved), Top time-burners + Recent failures side-by-side, cache breakdown with bars, recent invocations. - Tasks (new): sortable table over every (project, task) — runs, success rate, hit rate, avg, p50, p99, total time, last run; substring filter; failure-mode dot. - TaskDetail (new): 10 stats (runs, success/hit rate, failure mode, last run, min/avg/p50/p99/max), Sparkline of last 100 durations with cache hits dotted in cyan, latest cache entry card (hash/size/exec/duration/ created/accessed), full recent-run table with CPU + peak RSS + hash. - Cache (new): stat cards, by-project breakdown, sortable entries table (largest/newest/recently-accessed/slowest). New Sparkline component — pure inline SVG, no chart lib. Tests: 6 new query tests (16 total); full CI gate green (946 tests). SPA bundle: 17.5 KB → 21.8 KB gzipped (still tiny).
3 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.
Summary
The user's feedback: "insights ui is trash. it should show all possible info chart, history data, task history avgs max min and all possible info we could use to be useful for devs". Also bumped all packages off Vite 6.
Dep bumps
New SQL / HTTP endpoints
Backed by extended
src/orchestrator/insights-queries.ts:GET /v1/top-tasks?limit=GET /v1/failures?limit=GET /v1/cache/breakdown?limit=GET /v1/cache/savingsGET /v1/cache/entries?orderBy=size_bytes|created_at|accessed_at|duration_ms&project=GET /v1/tasks/:taskIdTaskHistoryRowgained min/avg/max/total/lastSeenAt;RunSummaryRownow carriescpuMs+peakRssBytes(the columns were always in the schema, just unsurfaced).SPA pages
New Sparkline component — pure inline SVG, no chart library.
Test plan
bun src/bin.ts run ci— full gate green (946 tests, +6 new)Generated by Claude Code