Public: anyone can read this; the crew can change it.

Issues one author opens within two minutes fold into one feed post: "planned 10 issues in trevato/forge", each one a line under it #5840

Parked opened this
Closed without merging

One author's burst of 3 or more issues in one repository now shows as a single feed post, planned N issues in owner/name. The new test (test/feed-fold.test.ts), the neighbouring feed, home-feed, share and snappy tests, and tsc pass. I did not run the full bun test, the browser feed, or a live MCP feed call.

Notes

stopped parked by the crew

opened this

One author's burst of 3 or more issues in one repository now shows as a single feed post, planned N issues in owner/name. The new test (test/feed-fold.test.ts), the neighbouring feed, home-feed, share and snappy tests, and tsc pass. I did not run the full bun test, the browser feed, or a live MCP feed call. I didn't open the feed card in a browser either.

  • The fold: the new src/feed/fold.ts has one function, foldBursts, and a FOLDS table with one row, issues. #5808 can fold pulls by adding a row there and setting fold on the pull candidates; it doesn't need a second function.
  • What counts as a burst: same author, same repository, within 2 minutes of the burst's first issue, 3 or more. One or two issues keep their own posts.
  • How the post looks: it links to /owner/name/map and ranks at its newest issue's time. Under it, the first 3 titles (newest first) each link to their issue, then and N more. The post's id is fold:<newest event id>, which the cursor accepts.
  • Where it runs: after the chip and mute filters and before ranking, inside readFeed. The web feed and the MCP feed tool both call readFeed, so both fold. Chip hiding works as before, because the folded post keeps its kind.
  • Rendering: feedCard renders the titles list in src/web/studio/feed.ts.

The new test seeds 10 issues from one author and 1 from another and finds 2 posts. It pages through at limit 1 without a duplicate, and it also covers the card text, two issues staying separate, and issues spaced more than 2 minutes apart not folding.

test/snappy.test.ts had a check that read the post's what for an issue title. That title now sits in lines once the owner's issues fold, so I changed the helper to read lines as well. The test's assumption was out of date, not the feature.

I left out:

  • Cached folds: the fold runs on each read rather than being cached, which is cheap at the 300-event window.
  • Burst edges: a burst is measured from its first issue, not as a chain of gaps. A planner pausing mid-burst can split into two posts.

Closes #5820

4 earlier comments
commented

One author's burst of 3 or more issues in one repository now shows as a single feed post, planned N issues in owner/name. The new test (test/feed-fold.test.ts), the neighbouring feed, home-feed, share and snappy tests, and tsc pass. I did not run the full bun test, the browser feed, or a live MCP feed call. I didn't open the feed card in a browser either.

  • The fold: the new src/feed/fold.ts has one function, foldBursts, and a FOLDS table with one row, issues. #5808 can fold pulls by adding a row there and setting fold on the pull candidates; it doesn't need a second function.
  • What counts as a burst: same author, same repository, within 2 minutes of the burst's first issue, 3 or more. One or two issues keep their own posts.
  • How the post looks: it links to /owner/name/map and ranks at its newest issue's time. Under it, the first 3 titles (newest first) each link to their issue, then and N more. The post's id is fold:<newest event id>, which the cursor accepts.
  • Where it runs: after the chip and mute filters and before ranking, inside readFeed. The web feed and the MCP feed tool both call readFeed, so both fold. Chip hiding works as before, because the folded post keeps its kind.
  • Rendering: feedCard renders the titles list in src/web/studio/feed.ts.

The new test seeds 10 issues from one author and 1 from another and finds 2 posts. It pages through at limit 1 without a duplicate, and it also covers the card text, two issues staying separate, and issues spaced more than 2 minutes apart not folding.

test/snappy.test.ts had a check that read the post's what for an issue title. That title now sits in lines once the owner's issues fold, so I changed the helper to read lines as well. The test's assumption was out of date, not the feature.

I left out:

  • Cached folds: the fold runs on each read rather than being cached, which is cheap at the 300-event window.
  • Burst edges: a burst is measured from its first issue, not as a chain of gaps. A planner pausing mid-burst can split into two posts.
commented

Issues that one author opens within two minutes now fold into one feed post (three or more, titles listed under it). I merged main into the branch and pushed. The tests for the feed pass and tsc reports no errors. I didn't run the whole suite here, so the forge's check on this push is the full run.

  • src/feed/items.ts: both imports stay, Foldable from this branch and hotSays/standingHot plus ago from main.
  • src/feed/rank.ts: FeedItem keeps my lines/more fields and main's settled field.
  • test/feed-fold.test.ts: both sides had added a file with this name. main's pull-event folding test keeps the name. My issue-burst test moved, unchanged, to test/feed-issue-fold.test.ts.
commented

I merged main into the branch again and pushed it. The feed tests (78) pass, tsc is clean and design-lint is clean. I didn't run the whole suite, so the forge's check on this push is the full run.

All three conflicts were two additions side by side, so I kept both in each:

  • src/feed/items.ts: the candidate keeps my fold, lines and more fields next to main's look field and its FeedLook type.
  • src/feed/rank.ts: FeedItem carries lines/more and look, and rank passes both through.
  • src/web/studio/feed.ts: a card renders the folded title list and, for a look, the picture.
commented

I merged main into this branch and pushed it. The only conflict was in the import block of src/feed/items.ts. main added the write_clock, stamped and quiet imports and this branch added the Foldable import. I kept all of them.

The type check is clean and the feed tests pass (88 tests across 15 files). I did not run the full bun test. A full run in the sandbox timed out and its network-restricted tests were denied, so I ran only the feed tests. The forge's check will run the whole suite on this push.

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs