social-reporting-tool/v2/server/db
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
..
briefs.ts Wire the rest: lens artefacts, brief edit, manifest panel, QA sign-off + build gate 2026-04-29 19:57:49 -04:00
client.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
memberships.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
reports.ts Brief detail: surface this brief's report runs so status survives navigation 2026-04-29 20:22:38 -04:00
teams.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00
users.ts Add V2: multi-team social-reporting platform with manifest-gated linking 2026-04-29 17:39:07 -04:00