fabro/apps/fabro-web/app/lib
Bryan Helmkamp 581ab41d28
feat(web): add Overview summary panel and promote PR to header pill (#299)
## Summary

Promotes the most useful per-run state into the Overview tab so users no
longer have to tab-hop to read the basics of a run.

- **Adds a horizontal summary panel** above the workflow graph (right
column only — does not span the stages sidebar) with five columns:
**Created by · Changes · Sandbox · Cost · Artifacts**. Quiet-uppercase
labels (`text-[10px] uppercase tracking-[0.08em] text-fg-muted`) over
regular-weight values. Skeleton loaders while queries are in flight; em
dash in muted color for missing/zero data.
- **Promotes the PR chip** out of the meta strip into a
`SECONDARY_BUTTON_CLASS`-style pill next to the Actions menu, visible on
every tab. Pill renders only when a PR exists.
- Lifts `formatBytesAsMemory`, `formatCpuCores`, `formatUsdMicros` to
`lib/format.ts` so the panel can reuse them.
- New `RunSummaryPanel` is split into a smart wrapper (owns the SWR
hooks) + a presentational `RunSummaryPanelView` (prop-driven) for clean
test seams.
- All 7 `Principal` kinds (user / agent / system / slack / webhook /
worker / anonymous) map to glyph + label; user kind uses login-initial
avatar.

## Screenshots

Captured against a real local Fabro server (`fabro server start`) on
demo runs — these only exercise the Created-by column (the other cells
display em dashes because the demo runs have no PR / diff / billing /
artifacts data). The em-dash states **are** the intended empty-state
design.

### Overview tab — full page

![Overview tab](https://files.catbox.moe/2idmv5.png)

### Header + tabs + summary panel close-up

![Header and panel](https://files.catbox.moe/bugbmy.png)

### Summary panel detail

![Summary panel](https://files.catbox.moe/4sbcl0.png)

> The PR pill (mint icon + `#number` next to Actions) is unverified
visually because no demo run on this server has an associated PR — but
the rendering path is the same `SECONDARY_BUTTON_CLASS` markup as the
Actions button and is conditioned on `run.pullRequestUrl && run.number
!= null`. See the [HTML
prototype](https://github.com/fabro-sh/fabro/blob/feat/run-overview-summary-panel/.context/run-overview-options.html)
for the locked design.

## Test plan

- [x] `cd apps/fabro-web && bun run typecheck` clean (only pre-existing
assistant-ui errors)
- [x] `bun test` — +12 new passes, no new failures (387 pass / 5 fail /
2 errors vs baseline 375 / 6 / 3)
- [x] Manual: load `/runs/<id>` against a real server, confirm panel +
em dashes render correctly
- [ ] Manual on a run **with** a PR: verify the pill appears next to
Actions and opens the PR in a new tab
- [ ] Manual on a run **with** rich data (diff / billing / sandbox
resources / artifacts): verify each column populates correctly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-17 16:52:48 -04:00
..
api-client.test.ts fix(api): type interview answer submissions 2026-05-08 09:18:35 -07:00
api-client.ts fix(api): type interview answer submissions 2026-05-08 09:18:35 -07:00
board-events.test.tsx refactor: remove compatibility shims (#281) 2026-05-16 15:29:25 -04:00
board-events.ts feat(pr): support GitHub pull request associations (#270) 2026-05-16 12:47:27 -04:00
chats-runtime.test.ts feat(fabro-web): port /chats/new + /chats/:id from prototype (#289) 2026-05-16 17:10:16 -04:00
chats-runtime.ts feat(fabro-web): port /chats/new + /chats/:id from prototype (#289) 2026-05-16 17:10:16 -04:00
chats-script.ts feat(fabro-web): port /chats/new + /chats/:id from prototype (#289) 2026-05-16 17:10:16 -04:00
chats-store.test.tsx feat(fabro-web): port /chats/new + /chats/:id from prototype (#289) 2026-05-16 17:10:16 -04:00
chats-store.tsx feat(fabro-web): port /chats/new + /chats/:id from prototype (#289) 2026-05-16 17:10:16 -04:00
chats-types.ts feat(fabro-web): port /chats/new + /chats/:id from prototype (#289) 2026-05-16 17:10:16 -04:00
cross-tab-sse.test.ts fix(web): recover cross-tab SSE coordination after fallback 2026-05-04 15:52:18 -04:00
cross-tab-sse.ts refactor: remove compatibility shims (#281) 2026-05-16 15:29:25 -04:00
demo-mode.test.tsx feat: wire web UI to real server with demo mode toggle 2026-04-08 04:46:08 -04:00
demo-mode.tsx feat: wire web UI to real server with demo mode toggle 2026-04-08 04:46:08 -04:00
format.ts feat(web): add Overview summary panel and promote PR to header pill (#299) 2026-05-17 16:52:48 -04:00
graph-theme.ts refactor(web): drop light mode, go dark-only 2026-04-20 09:27:08 -04:00
live-events.test.tsx feat(web): build live events page in settings 2026-05-10 14:05:10 -04:00
live-events.ts refactor: remove compatibility shims (#281) 2026-05-16 15:29:25 -04:00
mutations.ts refactor: remove compatibility shims (#281) 2026-05-16 15:29:25 -04:00
pierre-diffs-worker.ts fix(web): virtualize run file diffs consistently 2026-05-05 16:41:39 -04:00
queries.ts feat(web): add Children tab to Run detail page (#294) 2026-05-17 10:21:40 -04:00
query-keys.test.ts feat(web): add Sandbox tab and route to run detail 2026-05-09 21:48:31 -04:00
query-keys.ts feat(web): add Children tab to Run detail page (#294) 2026-05-17 10:21:40 -04:00
run-actions.test.ts feat(api): unify public run shape 2026-05-10 20:48:55 -04:00
run-actions.ts feat(api): unify public run shape 2026-05-10 20:48:55 -04:00
run-events.test.tsx refactor: remove compatibility shims (#281) 2026-05-16 15:29:25 -04:00
run-events.ts refactor: remove compatibility shims (#281) 2026-05-16 15:29:25 -04:00
run-settings-snapshot.ts refactor: remove compatibility shims (#281) 2026-05-16 15:29:25 -04:00
sse.ts refactor: remove compatibility shims (#281) 2026-05-16 15:29:25 -04:00
stage-sidebar.test.ts feat(api): expose stage handlers on run stages 2026-05-08 13:36:02 -07:00
stage-sidebar.ts feat(web): add specialized stage renderers for non-agent handlers 2026-05-09 18:35:19 -04:00
test-utils.tsx feat(fabro-web): port /chats/new + /chats/:id from prototype (#289) 2026-05-16 17:10:16 -04:00
time.ts Read billing and stages from RunProjection with live runtimes (#213) 2026-05-05 09:32:33 -04:00
unknown.ts refactor(web): narrow event property reads via shared helpers 2026-04-30 22:45:38 -04:00