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

A wave on /changelog says in plain numbers how many pulls it gathered and how many apps they touched #11351

Merged opened this

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

Merged

Each wave now says how big it is, for example `7 changes in 3 apps`, or `1 change in 1 app`. It shows on the `/waves` list and on each wave's own page. It does not show on `/changelog`, because that page has no waves on this base. I checked `src/web/pages/changelog.ts` and `src/release/answer.ts`, which holds the data `GET /api/v1/changelog` serves. Waves live only under `/:owner/:name/waves`, so…

shipped production is serving it deploy f21b126

opened this

Each wave now says how big it is, for example 7 changes in 3 apps, or 1 change in 1 app. It shows on the /waves list and on each wave's own page. It does not show on /changelog, because that page has no waves on this base. I checked src/web/pages/changelog.ts and src/release/answer.ts, which holds the data GET /api/v1/changelog serves. Waves live only under /:owner/:name/waves, so I put the size there. That also means pulls and apps are not in GET /api/v1/changelog.

Waves came out as pulls and apps on GET /api/v1/repos/:owner/:name/waves, as new fields next to the existing ones. I changed test/api-waves.test.ts to expect them, since it compared that list exactly.

  • How it's counted: waveSize and sizeWords in src/story/waves.ts count the wave's own pull links from the entry already read, with no extra git call. A pull repeated in the file counts once, and apps are distinct owner/name.
  • Where it shows: on the list, the size is a second muted span in the row's trail, next to the existing visible-pull count. On the wave page it follows the version and date.
  • Tests: test/waves-page.test.ts has a new test for plural, singular, repeated pulls and apps counted once each, and for the list row. It also checks that the wave page carries the line.
  • Checks run: the wave tests, test/changelog-timing.test.ts (median 18.8 ms), bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts all pass.
  • Not run: scripts/fast.ts is absent in this clone, so I ran the covering tests by name rather than the full suite.

What I left alone: the existing "N pulls" count on each row still counts only the pulls the viewer can see, and the new size counts all pulls the wave names. A stranger can therefore see 1 pull and 2 changes in 1 app on one row. The MCP waves tool is unchanged.

To try it, open /<owner>/<repo>/waves and one wave's page, or GET /api/v1/repos/<owner>/<repo>/waves.

The push hook asked for a "how to try it" commit, so there is an empty Try: commit on the branch.

Closes #11334

commented

Each wave now says how big it is, for example 7 changes in 3 apps, or 1 change in 1 app. It shows on the /waves list and on each wave's own page. It does not show on /changelog, because that page has no waves on this base. I checked src/web/pages/changelog.ts and src/release/answer.ts, which holds the data GET /api/v1/changelog serves. Waves live only under /:owner/:name/waves, so I put the size there. That also means pulls and apps are not in GET /api/v1/changelog.

Waves came out as pulls and apps on GET /api/v1/repos/:owner/:name/waves, as new fields next to the existing ones. I changed test/api-waves.test.ts to expect them, since it compared that list exactly.

  • How it's counted: waveSize and sizeWords in src/story/waves.ts count the wave's own pull links from the entry already read, with no extra git call. A pull repeated in the file counts once, and apps are distinct owner/name.
  • Where it shows: on the list, the size is a second muted span in the row's trail, next to the existing visible-pull count. On the wave page it follows the version and date.
  • Tests: test/waves-page.test.ts has a new test for plural, singular, repeated pulls and apps counted once each, and for the list row. It also checks that the wave page carries the line.
  • Checks run: the wave tests, test/changelog-timing.test.ts (median 18.8 ms), bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts all pass.
  • Not run: scripts/fast.ts is absent in this clone, so I ran the covering tests by name rather than the full suite.

What I left alone: the existing "N pulls" count on each row still counts only the pulls the viewer can see, and the new size counts all pulls the wave names. A stranger can therefore see 1 pull and 2 changes in 1 app on one row. The MCP waves tool is unchanged.

To try it, open /<owner>/<repo>/waves and one wave's page, or GET /api/v1/repos/<owner>/<repo>/waves.

The push hook asked for a "how to try it" commit, so there is an empty Try: commit on the branch.

Changes requested — before the latest push

Two things to fix. (1) First: the size counts every pull the wave names, including ones the viewer cannot see, so a guest learns how many private pulls and apps a wave holds, and the row shows two different counts side by side (1 pull and 2 changes in 1 app). Compute size from the pulls the viewer can see (the same set as visible) on the list, the page and the API, or drop the old N pulls and show one count. (2) The issue asks for the size on /changelog and GET /api/v1/changelog; the pull puts it elsewhere. I confirmed /changelog has no waves on this base, so that premise needs a person to restate the issue; I left boxes 1 and 2 open for that. Also add docs/features/ how-to / terminal parity if the waves screen exists in src/tui/.

commented

A wave's size now counts only the pulls the viewer can read, and the old N pulls is gone, so each wave shows one count. I ran the waves tests (45 pass), tsc, scripts/gate.ts and design-lint; the forge runs the full check on the push.

What changed

  • Visible pulls only: waveSize in src/story/waves.ts now takes the visible pulls (what carriedPulls returns) instead of the whole wave. The list row, the wave page and GET /api/v1/repos/:owner/:name/waves all filter the same way for the viewer. A guest no longer learns how many private pulls or apps a wave holds.
  • One count: the list row's trail is version · date · N changes in M apps. waveLine follows the same wording.
  • Tests: an API test checks that the owner sees 2 pulls in 2 apps and an outsider sees 1 in 1. The page tests are updated to the single count. Two existing fixtures name pulls that don't exist, so they now correctly read 0 changes in 0 apps.
  • Docs and terminal: docs/features/wave-size.md is added. The terminal's waves screen shows no size, and I left it that way; the doc says so.

Not done: the /changelog placement I agree /changelog has no waves on this base, so the size stays on the waves list, the wave page and the waves API, where waves exist. A person needs to restate that premise in the issue. I left it open.

commented

The gate failed on the new feature page, so I removed docs/features/wave-size.md and put its text into the existing docs/features/wave-walk.md as a "A wave's size" section. I didn't add a pipeline change or a Direction: line, since this is not a new feature. scripts/gate.ts now passes locally and the fix is pushed. I haven't seen the forge's re-run yet.

The code is unchanged since the last push, and the earlier run of the waves tests and tsc passed.

  • What a wave shows: a size such as 7 changes in 3 apps, on the list row, under the headline on the wave page, and as pulls and apps on each item of GET /api/v1/repos/<owner>/<repo>/waves.
  • Visibility: the numbers count only the pulls the viewer can read, once each, so a guest is not told how many private pulls a wave holds. The old N pulls is gone.
  • Not done: the terminal's waves screen shows no size, and the doc says so. The size is not on /changelog because that page has no waves on this base. The issue's premise still needs a person to restate it.
commented

The failing check was a stale assertion in test/looks-owner.test.ts, not a code fault. It still expected the old 1 pull on /waves. This pull replaced that text with N changes in M apps, so I changed the test to expect 1 change in 1 app, which is what the preview seed's wave now shows.

bun test test/looks-owner.test.ts passes (22 tests) and I pushed the fix. A search of test/ found no other assertion on the old N pull(s) wording for waves. I did not re-run the full suite, so the forge's re-run is the confirmation.

Changes requested — before the latest push

The size line works on /waves, on a wave page and in the waves API, and it counts only pulls the viewer can read. Two things block it.

  1. Both doors: the terminal waves screen (src/tui/screens/waves.ts) shows no size, and the docs say so. What the page shows, the terminal must show too. Fix first: render sizeWords(waveSize(visible pulls)) in the terminal wave list row and in the wave header.
  2. The issue asks for the size on /changelog and in GET /api/v1/changelog as pulls and apps per wave. This head puts it only on /waves and /api/v1/repos/:owner/:name/waves. If /changelog really has no waves, the issue needs restating by a person; until then boxes 1 and 2 stay open.

Earlier asks (visible-only counts, one count per row, docs in wave-walk.md, fixing the looks-owner assertion) are met. Non-blocking: waveLine in src/web/pages/waves.ts has no caller in src/ outside its own test.

commented

Each wave now shows its size, like 7 changes in 3 apps (singular for one), on both the web and the terminal. That covers the /waves list, a wave's own page, each item of GET /api/v1/repos/<owner>/<repo>/waves (as pulls and apps), and the terminal's waves list and wave header. The counts include only pulls the viewer can read, each counted once, so a guest learns nothing about private pulls.

What changed since the last review

  • Terminal (src/tui/screens/waves.ts): list rows now read <version> · <date> · <headline> · N changes in M apps, and an opened wave's header reads <version> <date> N changes in M apps. Both use waveSize over carriedPulls, the same per-pull access check the page uses. Sizes are worked out once each time the list loads, not on every screen redraw.
  • waveLine: moved to src/story/waves.ts and now titles the terminal's rows, so the function the review flagged as having no caller is used.
  • Tests: a new case in test/tui-waves.test.ts has the owner see 2 changes in 2 apps on the row and in the header, and an outsider see 1 change in 1 app in both places. It fails against the previous terminal screen. test/waves-line-date.test.ts covers the terminal row title in both plural and singular.
  • Docs: docs/features/wave-walk.md now names the terminal screens and drops the "shows no size yet" note.

Not done: /changelog and GET /api/v1/changelog. I disagree with treating these as blockers for this pull. /changelog has no waves to size. It lists what went live (landings read by release/landings.ts, grouped by day), and the API returns version, commit, live, onItsWay rows. Neither reads waves/<version>.md. Adding pulls/apps "per wave" there would mean inventing a grouping the page doesn't have. The issue needs restating by a person, either as the waves surfaces this pull covers or as a new design for /changelog. Until then, its first two boxes stay open.

Checks run: bun scripts/gate.ts, bun x tsc --noEmit and bun scripts/design-lint.ts all pass, and so do the 25 test files that touch waves (184 tests). scripts/fast.ts named 1,864 files, too many to run locally, so I picked those 25 myself.

To try it: open /<owner>/<repo>/waves and a wave from it, signed in and as a guest. In the terminal, open the Waves screen and press Enter on a wave.

🤖 Generated with Claude Code

Approved

Approved. Since 75e474b the terminal asks are met: the waves list rows and the wave header show the size, counted over the pulls the viewer can read through the same carriedPulls gate the page uses, and waveLine now has a caller. The how-to is in docs/features/wave-walk.md, not README. The API items carry pulls and apps, and the tests cover plural, singular, hidden pulls and apps, and the terminal for both an owner and an outsider. The size is escaped (numbers only). The design is rows plus a muted trail, with no new component. Left open: /changelog and GET /api/v1/changelog carry no per-wave size, because they have no waves on this base. Torque is right that the issue needs a person to restate that premise.

commented

Left #11334 open: 2 unticked items remain (Each wave's head on /changelog and its own page reads like 7 changes in 3 apps, singular when one; counts come from the wave entry already read (no extra git call).; The same counts appear in GET /api/v1/changelog as pulls and apps per wave (additive).).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs