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

A wave's page lists each landed pull with its title, who merged it and when, in the order they landed #13574

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A wave's page now lists its pulls newest landed first, and each row says who merged it and when. The waves API answers with the same order and a mergedby field on each pull. The new test, the existing wave tests I ran, and tsc pass.

Notes

shipped production is serving it deploy 59903fa

opened this

A wave's page now lists its pulls newest landed first, and each row says who merged it and when. The waves API answers with the same order and a merged_by field on each pull. The new test, the existing wave tests I ran, and tsc pass. I did not run the full suite.

  • Order: merged pulls come newest first, with ties broken by higher pull number. Pulls that never landed follow, in the order the wave file names them. The sort is a new inLandingOrder in src/story/wave_pulls.ts, and the page and the API both use it, so they cannot disagree.
  • Who merged: carriedPulls now also returns mergedBy, read from pull.merged_by. A merged row reads merged by alice 2026-03-09; the "by" part is dropped when no merger was recorded.
  • Paging: the Pulls list shows 50 rows a page, with Newer and Older links using ?page=N, so a wave with hundreds of pulls pages by link and not by script.
  • Test: the new test in test/wave-pulls.test.ts seeds merge times and mergers on the wave's three pulls. It checks the page order and "merged by" text, and the API order and merged_by.
  • Type fix: test/tui-waves.test.ts needed mergedBy: null on two literals, because CarriedPull gained that field. It is a type-only change and no assertion changed.

What I did not do:

  • API paging: the waves API is not paged; it still returns at most 200 pulls, the existing cap.
  • Changelog page: I did not touch src/web/pages/changelog.ts. The wave view is the wave's own page in waves.ts, and the changelog only links to it.
  • OpenAPI summary: I did not update the route's summary text in src/contract/openapi/routes/getApiV1ReposOwnerNameWavesVersion.ts, so it still does not mention merged_by. The route's openapi test (test/openapi-oa-waves.test.ts) passes.

To try it, open /<owner>/<name>/waves/<version> and read the Pulls list, or fetch /api/v1/repos/<owner>/<name>/waves/<version>.

Closes #13488

13 earlier comments · 2 events
commented

A wave's page now lists its pulls newest landed first, and each row says who merged it and when. The waves API answers with the same order and a merged_by field on each pull. The new test, the existing wave tests I ran, and tsc pass. I did not run the full suite.

  • Order: merged pulls come newest first, with ties broken by higher pull number. Pulls that never landed follow, in the order the wave file names them. The sort is a new inLandingOrder in src/story/wave_pulls.ts, and the page and the API both use it, so they cannot disagree.
  • Who merged: carriedPulls now also returns mergedBy, read from pull.merged_by. A merged row reads merged by alice 2026-03-09; the "by" part is dropped when no merger was recorded.
  • Paging: the Pulls list shows 50 rows a page, with Newer and Older links using ?page=N, so a wave with hundreds of pulls pages by link and not by script.
  • Test: the new test in test/wave-pulls.test.ts seeds merge times and mergers on the wave's three pulls. It checks the page order and "merged by" text, and the API order and merged_by.
  • Type fix: test/tui-waves.test.ts needed mergedBy: null on two literals, because CarriedPull gained that field. It is a type-only change and no assertion changed.

What I did not do:

  • API paging: the waves API is not paged; it still returns at most 200 pulls, the existing cap.
  • Changelog page: I did not touch src/web/pages/changelog.ts. The wave view is the wave's own page in waves.ts, and the changelog only links to it.
  • OpenAPI summary: I did not update the route's summary text in src/contract/openapi/routes/getApiV1ReposOwnerNameWavesVersion.ts, so it still does not mention merged_by. The route's openapi test (test/openapi-oa-waves.test.ts) passes.

To try it, open /<owner>/<name>/waves/<version> and read the Pulls list, or fetch /api/v1/repos/<owner>/<name>/waves/<version>.

commented

<!-- look-pages 1a47814c625a --> Look pages for 1a47814, from the gate:

  • look pages (inferred): this pull changes src/web/pages/waves.ts; the forge pictures /preview-admin/sample/waves (src/web/pages/waves.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

A wave's pulls are now listed newest landed first, with who merged each, on the page, in the terminal and in the API. The gate and tsc --noEmit pass. I ran test/tui-waves.test.ts and test/wave-pulls.test.ts (all pass); the forge's full check has not run on this push yet.

What changed

  • Order: inLandingOrder in src/story/wave_pulls.ts puts landed pulls first, newest first. Pulls not yet landed follow in the order the wave names them.
  • Who merged: each landed pull reads merged by <user> <date>. mergedBy is now on every carried pull and in the API.
  • Paging: /trevato/forge/waves/<version> shows 50 pulls at a time, with Newer and Older links, so a wave with hundreds of pulls stays quick.
  • Terminal: this is the fix for the failed "both doors" rule. The wave screen in src/tui/screens/waves.ts uses the same order and the same merged by words as the page. A new test in test/tui-waves.test.ts covers it.
  • How-to: docs/features/wave-pulls-order.md says how to read a wave's pulls.
  • Test edits: the existing TUI test fixtures gained mergedBy: null for the new field; their assertions are unchanged.

What I chose not to do: the terminal does not page. It lists all of a wave's pulls and scrolls, as it did before.

How to try it: open a wave on the pull's preview, e.g. /trevato/forge/waves/<version>, and read its Pulls list.

Gate overrides: the commit message carries a Direction: line. Adding the how-to tripped the "pipeline first" rule, which wants a pipeline change alongside any new feature doc. I wrote that this is a small fix to an existing page rather than a new surface; if you disagree, that line is the one to challenge.

commented

I merged main into the branch and pushed the result. The only conflict was in src/web/pages/waves.ts.

  • Imports: I kept main's imports (MovedMilestone, widestMoved) and added inLandingOrder from this branch.
  • Pager: the 50-per-page pager stays.
  • Dropped line: I removed the const line = waveProgress(moved) line, since main had removed it too.

tsc --noEmit and the gate pass. I ran every test with "wave" in its name, 24 files and 141 tests, and all pass. scripts/fast.ts named 2275 of 3481 test files, too many to run here, so I ran only the wave tests. The forge's check will run the full set on this push.

Two things from the pull description still stand:

  • The terminal does not page. It lists all of a wave's pulls and scrolls.
  • The "Direction:" line on the how-to commit is the one to challenge if you disagree.
commented

<!-- look-pages ff6a60cfb812 --> Look pages for ff6a60c, from the gate:

  • look pages (inferred): this pull changes src/web/pages/waves.ts; the forge pictures /preview-admin/sample/waves (src/web/pages/waves.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The comment from @trevato is the gate's automated note on which page the forge pictures for this pull (/preview-admin/sample/waves). It asks for nothing, so I changed nothing and pushed nothing.

The inferred page is the right one, because the only web change is src/web/pages/waves.ts. I didn't add a Looks: or No look: override.

The branch is unchanged at ff6a60cfb. It has the pulls newest landed first with who merged each, the terminal showing the same, and the 50-per-page pager on the web page only.

commented

I fixed the two "feature note" failures and pushed, but I left the other two alone and I haven't seen the forge's check re-run.

Fixed: docs/features/wave-pulls-order.md had no row in docs/features/README.md, which broke "no feature note is an orphan" and "the index is one note to a row". I added the row under the waves notes. test/feature-orphans.test.ts now passes, 4 of 4.

Not touched:

  • Concurrency test: the crew-concurrency test timed out at 30 s.
  • Issue-listing cost test: "an issue listing costs the same for 5 rows as for 50" failed in the same shard.

Neither touches waves or the feature notes, so I think they are timing flakes in that shard rather than this branch. I didn't run either one here, so that's a guess. If they fail again on the next check, I'll look at them.

commented

<!-- look-pages 6190bb4760de --> Look pages for 6190bb4, from the gate:

  • look pages (inferred): this pull changes src/web/pages/waves.ts; the forge pictures /preview-admin/sample/waves (src/web/pages/waves.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The type-check failure is fixed and pushed.

test/wave-landed.test.ts came in from main. It builds a CarriedPull without the mergedBy field this pull added. I merged main into the branch, so the test is now on the branch. I set mergedBy: null in its pull helper (line 24). Production code is unchanged.

bun x tsc --noEmit is clean and test/wave-landed.test.ts passes (5 tests). I ran only that file and the type check, and left the full check to the forge. The gate's note about the waves look page is informational and didn't block.

Try it by opening a wave page on the preview at https://lab--13574--forge-trevato-apps.open-platform.sh. Each landed pull should show "merged by <user> <date>".

🤖 Generated with Claude Code

commented

<!-- look-pages d3a632e31d6e --> Look pages for d3a632e, from the gate:

  • look pages (inferred): this pull changes src/web/pages/waves.ts; the forge pictures /preview-admin/sample/waves (src/web/pages/waves.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The look-pages note asks for no code change, so I made none and pushed nothing.

It says the forge inferred a look of /preview-admin/sample/waves, because this pull changes src/web/pages/waves.ts. The /:owner/:name/waves route in that file serves that path.

I didn't open the preview to check what that page looks like. A Looks: <path> or No look: <why> line in a commit message would override the inferred page. I didn't add one, because the inferred page is the right one to picture.

Changes requested — before the latest push

The order, merged by and the API field work, in the page, the terminal and the API. Three things need fixing in one round:

  1. Drop the pager, or finish it properly. The issue asked for none. The terminal does not page either, so the two doors now differ. If you keep it, use the shared pager() in src/web/ui.ts, and test it.
  2. Add tests. A wave with more than 50 pulls, ?page=2, and a bad ?page all have no test. Neither does the tie-break in inLandingOrder, or the dropped by when mergedBy is null.
  3. Floor ?page. ?page=1.5 currently slices at fractional offsets.

The direction puts pipeline work before features. This is a small fix to an existing page, so I did not hold it on that, but the paging extra is the opposite of single-purpose.

The OpenAPI summary for merged_by is also not updated, which you said you skipped. Please add it, since the API rows are part of the issue.

commented

I took the first option on the pager: the wave page no longer pages. The page, the terminal and the API now list every pull in one list, as the issue asked. tsc, the gate and the wave, API and OpenAPI tests pass. I did not run the whole suite. scripts/fast.ts named a very large file set, so I ran the wave, API and OpenAPI test files instead.

  • Pager removed. I deleted PULLS_PER_PAGE, the hand-rolled pager and ?page in src/web/pages/waves.ts. That also closes the ?page=1.5 fractional-slice problem, since the parameter no longer exists. The 50-pull, ?page=2 and bad-?page tests you listed have nothing left to test.
  • New tests. test/wave-landing-order.test.ts covers the later landing coming first, the equal-time tie going to the higher number, unlanded pulls following in wave order, and the input array being left unchanged. test/wave-pulls.test.ts now also checks that the page leaves out "merged by" when mergedBy is null.
  • OpenAPI. The summary for GET …/waves/{version} now lists state, merged_at and merged_by. It says the pulls come newest-landed first, with those not landed after, and what merged_by holds. I also dropped the old "number is null" text, which the code never matched.
commented

<!-- look-pages a94a6551b07d --> Look pages for a94a655, from the gate:

  • look pages (inferred): this pull changes src/web/pages/waves.ts; the forge pictures /preview-admin/sample/waves (src/web/pages/waves.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
Changes requested — before the latest push

Earlier asks: pager removed (met), OpenAPI summary updated (met), order tests added (met), merged-by absent case tested (met). Two small things remain, both on lines that changed since my last review.

Fix first: docs/features/wave-pulls-order.md still says a wave with more than 50 pulls pages by link with Older and Newer. That pager was removed, so the how-to describes a door that does not exist. Delete that bullet.

Also, src/web/pages/waves.ts wraps the listCard call in a redundant html template. Revert it to the bare listCard call.

commented

On a wave's page, the Pulls list now puts landed pulls first, newest landed at the top, and each one says who merged it and when (merged by ada 2026-01-02). When no merger is recorded the line reads merged 2026-01-02. Pulls not yet landed come after, in the order the wave names them. The page and the terminal's wave screen both sort with inLandingOrder in src/story/wave_pulls.ts, so they show the same order. The API carries mergedBy on each pull, and the OpenAPI summary now documents it. The page has no pager.

This push makes the two changes from the last review:

  • docs/features/wave-pulls-order.md: the bullet about paging with Older/Newer is gone, since that pager was removed.
  • src/web/pages/waves.ts: the Pulls card is the bare listCard(...) call again, without the extra html wrapper. On that line the diff against main is now empty.

Checks: scripts/gate.ts --fix, tsc --noEmit and design-lint pass. scripts/fast.ts picked 2309 test files (the merge from main makes the diff broad), so I ran the 26 wave test files by hand instead: all 150 tests pass. That wider run was still going in the background when I pushed and I didn't read its result; the forge's full check covers it.

To try it, open /trevato/forge/waves/<version> on the preview, or the sample at /preview-admin/sample/waves, which the commit names as the page to picture.

🤖 Generated with Claude Code

Approved

Earlier asks are met: the pager is gone, so the page, terminal and API list every pull in one list. The OpenAPI summary now documents state, merged_at and merged_by. The how-to has no paging bullet and has its row in docs/features/README.md. The terminal uses the same inLandingOrder and the same merged-by words as the page. Output goes through the html template and plain(), and mergedBy is a username read by a LEFT JOIN with no user text in the SQL. The order function has its own tests, and the page and API test checks order and merged_by. Nothing in this head breaks a design principle.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs