social-reporting-tool/v2/server
DJP a829983bb9 Brief detail: surface this brief's report runs so status survives navigation
When you navigated away from a brief and came back, there was no indication
that a pipeline had already run for it — the page just showed the brief
fields and a "Run pipeline" button, making completed/in-flight runs invisible
without first hitting Home.

Now the brief detail page renders a "Reports for this brief" section listing
every run for the brief — status pill, run id, total cost, started/finished
relative timestamps, click-through to the run page. Auto-refreshes every 3s
while any run is non-terminal so an in-flight pipeline shows live progress
even when the user navigated to the brief instead of the report page.

Server:
- db/reports.ts: listReportsForBrief(brief_id, limit).
- routes/reports.ts: handleListReportsForBrief.
- index.ts: GET /api/briefs/:id/reports.

Client:
- api/reports.ts: useReportsForBrief hook with conditional polling.
- routes/briefs/detail.tsx: BriefReports section with status pills, in-flight
  shortcut link, empty state when no runs exist yet.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-29 20:22:38 -04:00
..
__tests__ Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
auth Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
db Brief detail: surface this brief's report runs so status survives navigation 2026-04-29 20:22:38 -04:00
lib Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
middleware Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
routes Brief detail: surface this brief's report runs so status survives navigation 2026-04-29 20:22:38 -04:00
schemas Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
index.ts Per-report dashboard SPA (V3 §10a) — 9 interactive views 2026-04-29 20:06:12 -04:00