Skip to content

Insights SPA: rich pages, more endpoints, dep bumps (Vite 8 / UnoCSS 66)#144

Merged
Exelord merged 2 commits into
mainfrom
claude/insights-upgrade
Jun 21, 2026
Merged

Insights SPA: rich pages, more endpoints, dep bumps (Vite 8 / UnoCSS 66)#144
Exelord merged 2 commits into
mainfrom
claude/insights-upgrade

Conversation

@Exelord

@Exelord Exelord commented Jun 21, 2026

Copy link
Copy Markdown
Member

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

  • Vite 6 → 8.0.16, UnoCSS 0.65 → 66.7.2 (calver renumber), Solid Router 0.15 → 0.16.1
  • Astro 6.4.6 → 6.4.8, Mermaid 11.6 → 11.15, sharp 0.34 → 0.35
  • oxlint 1.63 → 1.70, oxfmt 0.48 → 0.55, oxlint-tsgolint 0.22 → 0.23
  • @anthropic-ai/sandbox-runtime 0.0.51 → 0.0.56, @types/bun 1.3.0 → 1.3.14

New SQL / HTTP endpoints

Backed by extended src/orchestrator/insights-queries.ts:

Route Returns
GET /v1/top-tasks?limit= Biggest time-burners ranked by total non-hit success duration
GET /v1/failures?limit= Recent failed runs
GET /v1/cache/breakdown?limit= Bytes-per-project breakdown
GET /v1/cache/savings Estimated time the cache saved you (24h + all-time)
GET /v1/cache/entries?orderBy=size_bytes|created_at|accessed_at|duration_ms&project= Full entries table
GET /v1/tasks/:taskId Full per-task: aggregate + 100 recent runs + latest cache entry

TaskHistoryRow gained min/avg/max/total/lastSeenAt; RunSummaryRow now carries cpuMs + peakRssBytes (the columns were always in the schema, just unsurfaced).

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 indicator.
  • TaskDetail (new) — 10 stat cards, Sparkline of last 100 durations with cache hits dotted in cyan, latest cache entry (hash/size/exec/duration/created/accessed), full recent-run table with CPU + peak RSS + hash.
  • Cache (new) — stat cards, by-project bytes breakdown bars, sortable entries table.

New Sparkline component — pure inline SVG, no chart library.

Test plan

  • bun src/bin.ts run ci — full gate green (946 tests, +6 new)
  • SPA builds clean with Vite 8 + UnoCSS 66 (21.8 KB gzipped JS, was 17.5 KB; still tiny vs the 30 MB DuckDB-WASM payload the previous SPA had)
  • 6 new tests cover getTopTimeBurners, getRecentFailures, getTaskDetail, getCacheSavings, listCacheEntries, getCacheBreakdown

Generated by Claude Code

claude added 2 commits June 21, 2026 18:42
- 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).
@Exelord Exelord merged commit 19f8856 into main Jun 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants