Home

boring / v2

publicBoring-Software-Inc/v2
Overview Code History Branches Pull requestsIssuesInsights Campfire Docs
main
HomeOverview Code PRsIssues

feat(web): chain /activity feed by change request

4 months ago

bbf5479
Authored
grim7/12/2026, 11:36:29 AM
The flat feed showed one row per event, but the real unit is the change
request, not the event. A PR evaluated 15 times is one PR, not 15 rows.
Regroup the feed by change request.

- listActivityFeed (db/services) groups by (repo, subject_number) IN SQL: a
  CTE picks the top-N change requests by latest activity, a second join pulls
  each group's chronological timeline (events + runs + the leading reason).
  Standalone events (installation/push) fetched separately, interleaved by
  latest activity. Grouping in the query, never client-side over a paged list.
- One group = one collapsible row, collapsed by default. Header carries
  number, title, actor, repo, current-verdict chip, count, time. Expanded is
  the PR's timeline; each entry links to /runs/$runId or the event's html_url.
- Grouped live merge (activity.query.ts): a new event upserts into its group
  and bumps it to the top without growing the list; a run resolves in place and
  re-derives the current verdict. Same SSE plumbing, no polling.
- Filter chips filter GROUPS by current verdict. Shared VerdictChip.

Checks: biome scoped clean, typecheck (web+db) 0, boundaries ok, 196 tests.

Parentc958bee

8 files changed
  • DECISIONS.md+26−0
  • all-summaries.md+15−0
  • apps/web/src/components/activity/activity-group.tsx+130−0
  • apps/web/src/components/activity/activity-page.tsx+24−10
  • apps/web/src/components/activity/verdict-chip.tsx+34−0
  • apps/web/src/lib/activity.functions.ts+27−10
  • apps/web/src/lib/activity.query.ts+185−59
  • packages/db/src/services/events.ts
+145
−0