Public: anyone can read this; the crew can change it.
A pull's opened, reviewed and merged posts fold into one timeline post that shows its latest state #5814
Check · Review · Land · Live done — Landed and live in production.
A pull's `pull.opened`, `pull.reviewed` and `pull.merged` events in the feed window now fold into one post. The post takes the id, time and actor of the newest event, so it ranks where that event would. It reads by the latest state, e.g. `merged a pull request: <title> · opened 3 hours ago, 2 reviews`.
shipped production is serving it deploy b4d876b
A pull's pull.opened, pull.reviewed and pull.merged events in the feed window now fold into one post. The post takes the id, time and actor of the newest event, so it ranks where that event would. It reads by the latest state, e.g. merged a pull request: <title> · opened 3 hours ago, 2 reviews.
The new test and the existing feed, home-feed and MCP suites pass. The type check could not run here because the bun types are missing in the sandbox, so I did not run it, and I did not run design-lint (nothing in src/web/ changed).
- Where: the fold is in
src/feed/items.ts(foldPulls). It is incandidatesFor, so the web feed, the HTTP feed and MCPfeedall fold the same way. Chips and the cursor are untouched, since the fold happens before them. - Failed runs: a
run.finishedfailure is not a pull event, so it keeps its own post. - Single events: a pull with only one event in the window reads exactly as before.
- Test:
test/feed-fold.test.tspages 30 folded pulls (each opened, reviewed twice and merged) at 7 per page. It finds each pull exactly once, all reading "merged … opened …, 2 reviews", plus the one failed-run post. It also covers the single-event case. I did not add a separate test for the MCP path.
I did not fold across the window's edge: only events inside the 300 the feed reads are counted, so an old open or review beyond it is not mentioned. Times read "3 hours ago", not "3 h ago", because they reuse the feed's existing ago wording.
Folds a pull's opened/reviewed/merged posts into one in candidatesFor, after the audience filter, so web, HTTP and MCP all read the same and nothing private leaks through the fold. Failed runs keep their post, single-event pulls are unchanged, and the paging test (30 pulls, 7 per page) would fail without the change. The preview answers 200. It is a small single-purpose change and fits the home-feed catch-up direction (#5735).
Two things I would do next:
- Add a test that the folded post does not count reviews the viewer cannot see (a private repo viewed by a guest), and one for MCP feed, since only the web path is covered.
- Make the folded suffix scannable on a 360px phone: "merged a pull request: <title> · opened 3 hours ago, 2 reviews" gets long. Check it wraps without layout shift, and consider a shorter form such as "3 h ago".
A pull's
pull.opened,pull.reviewedandpull.mergedevents in the feed window now fold into one post. The post takes the id, time and actor of the newest event, so it ranks where that event would. It reads by the latest state, e.g.merged a pull request: <title> · opened 3 hours ago, 2 reviews.The new test and the existing feed, home-feed and MCP suites pass. The type check could not run here because the
buntypes are missing in the sandbox, so I did not run it, and I did not rundesign-lint(nothing insrc/web/changed).src/feed/items.ts(foldPulls). It is incandidatesFor, so the web feed, the HTTP feed and MCPfeedall fold the same way. Chips and the cursor are untouched, since the fold happens before them.run.finishedfailure is not a pull event, so it keeps its own post.test/feed-fold.test.tspages 30 folded pulls (each opened, reviewed twice and merged) at 7 per page. It finds each pull exactly once, all reading "merged … opened …, 2 reviews", plus the one failed-run post. It also covers the single-event case. I did not add a separate test for the MCP path.I did not fold across the window's edge: only events inside the 300 the feed reads are counted, so an old open or review beyond it is not mentioned. Times read "3 hours ago", not "3 h ago", because they reuse the feed's existing
agowording.Closes #5808