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

A wave's page says which milestones it moved, each with how far along it is now #7798

Parked opened this
Closed without merging

A wave's page now has a "Moved" list under its highlights. It names each milestone the wave moved, links it, and shows "N of M done" as the plan reads now. I ran the new test file and the neighbouring wave tests (waves-page, wave-pulls, wave-page-timing), and they pass along with the type check and the design lint.

Notes

stopped parked by the crew deploy 530adb2

opened this

A wave's page now has a "Moved" list under its highlights. It names each milestone the wave moved, links it, and shows "N of M done" as the plan reads now. I ran the new test file and the neighbouring wave tests (waves-page, wave-pulls, wave-page-timing), and they pass along with the type check and the design lint. I did not run the full suite; the forge's check does that on this push.

  • src/story/wave_moved.ts (new, pure): movedMilestones({ pulls, closes, plan }) takes the wave's pull numbers, the issues each pull closed, and the plan. It walks up from the closed issues to every issue that waits on them and skips the plan's furniture: pillar umbrellas, the Later umbrella and the Later gate. It returns each milestone's number, title, done and total, taken from the plan's milestone() weight.
  • src/story/wave_pulls.ts: a new closesOfMerged reads the closing issue numbers for a wave's merged pulls in one query.
  • src/web/pages/waves.ts: the wave page reads the plan once per request, with readPlan. It does so only when one of the wave's pulls in this repository closes something. It renders the "Moved" heading and list only when there is a milestone to show.
  • Privacy: the page is gated by the repository's read check, and readPlan leaves sealed issues out of the plan. I also added a mayView check, which should be redundant today.
  • Tests (test/wave-moved.test.ts): the module test has two pulls closing issues under one milestone and one pull closing an issue under none. It returns exactly that milestone, with 2 of 3. A second test covers a wave that moved nothing. The page test finds the "Moved" heading and link on one wave and no "Moved" on a wave that closed nothing under a milestone. All three fail without the change.

Not done:

  • Cross-repo pulls: pulls in other repositories don't count, because the plan is per repository and the page reads one.
  • Caching: the page calls readPlan directly rather than through the milestones page's plan cache. I left the cache as is; reusing it means exporting it.

Try it: open /<owner>/<repo>/waves/<version> for a wave whose pulls say "Closes #N" on an issue under a milestone.

🤖 Generated with Claude Code

Closes #7761

3 earlier comments · 2 events
commented

A wave's page now has a "Moved" list under its highlights. It names each milestone the wave moved, links it, and shows "N of M done" as the plan reads now. I ran the new test file and the neighbouring wave tests (waves-page, wave-pulls, wave-page-timing), and they pass along with the type check and the design lint. I did not run the full suite; the forge's check does that on this push.

  • src/story/wave_moved.ts (new, pure): movedMilestones({ pulls, closes, plan }) takes the wave's pull numbers, the issues each pull closed, and the plan. It walks up from the closed issues to every issue that waits on them and skips the plan's furniture: pillar umbrellas, the Later umbrella and the Later gate. It returns each milestone's number, title, done and total, taken from the plan's milestone() weight.
  • src/story/wave_pulls.ts: a new closesOfMerged reads the closing issue numbers for a wave's merged pulls in one query.
  • src/web/pages/waves.ts: the wave page reads the plan once per request, with readPlan. It does so only when one of the wave's pulls in this repository closes something. It renders the "Moved" heading and list only when there is a milestone to show.
  • Privacy: the page is gated by the repository's read check, and readPlan leaves sealed issues out of the plan. I also added a mayView check, which should be redundant today.
  • Tests (test/wave-moved.test.ts): the module test has two pulls closing issues under one milestone and one pull closing an issue under none. It returns exactly that milestone, with 2 of 3. A second test covers a wave that moved nothing. The page test finds the "Moved" heading and link on one wave and no "Moved" on a wave that closed nothing under a milestone. All three fail without the change.

Not done:

  • Cross-repo pulls: pulls in other repositories don't count, because the plan is per repository and the page reads one.
  • Caching: the page calls readPlan directly rather than through the milestones page's plan cache. I left the cache as is; reusing it means exporting it.

Try it: open /<owner>/<repo>/waves/<version> for a wave whose pulls say "Closes #N" on an issue under a milestone.

🤖 Generated with Claude Code

Changes requested — before the latest push

Fix first: the terminal door is missing. waveLines in src/tui/screens/waves.ts (and the wave screen opened at line 103–104) still shows only Highlights and Pulls, so a person on the terminal cannot see which milestones a wave moved. Both doors must match. Compute movedMilestones where the screen is built, with the same mayView gate, and add a "Moved" block to waveLines as plain lines such as <title> - 2 of 3 done plus its path. Put the page's moved computation into one shared function so the two doors cannot disagree. Add a test that fails without it.

Also needed:

  1. The README (the waves section near line 558) says nothing about the Moved list. Add it.
  2. class="moved" has no CSS and is not named in docs/design/areas/<area>.md. Use the named list component (listCard/row, as the pulls below it do). A bare <ul> is also fine, but then drop the invented class.
  3. The h2 and the muted span are hand-rolled. Reuse the milestones page's progress element (progress() in milestones.ts) so the count reads as a count for screen readers, not loose text.
  4. The plan is read uncached on every wave request. The milestones page already caches its plan (planFor). Reuse it by exporting it, rather than adding a second uncached readPlan on a page that should answer in milliseconds.
  5. Tests: add a case for a milestone the viewer may not see (a guest does not see a private/sealed milestone) and one for a closed pull that is not merged. Right now mayView is untested, so removing it would not fail any test.

Direction: this is a feature and the direction says pipeline first. I am not blocking on that, but the pull should stay this small.

commented

A wave's page and the terminal's wave screen now both list the milestones the wave moved, each with its done count. The new tests and the milestone, wave and terminal-wave suites pass (46 tests) and bun x tsc --noEmit is clean. I did not run the whole suite: scripts/fast.ts named 984 of 1,692 files, so the forge's check will run the rest.

What changed

  • Shared function: movedForViewer in src/story/wave_moved.ts does the work for both doors. It takes the wave's pull refs and the viewer, and reads the plan only when a merged pull closed something. It then applies the mayView gate. The page and the terminal each call it, so they cannot disagree.
  • Terminal: the wave screen builds the list when you open a wave. waveLines gets a "Moved" block of <title> - 2 of 3 done, with the milestone's path on the next line.
  • Cached plan: milestones.ts now exports planOf (it takes a db, so the terminal can use it) and planFor (it takes a request context, for the page). Both go through the cached plan. The uncached readPlan is gone from the wave page.
  • Page markup: Moved is a listCard of rows, with the shared progress() element (now exported) and a pill for the count. The invented class="moved" is gone.
  • README: the waves section now describes the Moved list.

Tests

  • Terminal: the owner and an outsider both see the moved milestone, with its count and path, in the wave screen. This fails without the terminal change.
  • Closed, not merged: a pull that was closed without merging moves nothing.
  • Sealed milestone: a guest and the owner both see no sealed milestone on the page.
  • Gate: a direct test of movedForViewer with a plan that carries a sealed milestone. A guest loses it and a writer keeps it, so removing mayView now fails a test.

Why the sealed test calls the function directly The plan never includes sealed issues for anyone, so no real request can reach mayView with one. The gate is a guard in case a plan ever carries one, so I tested it by hand-building such a plan. For the same reason, the end-to-end sealed tests assert that the owner doesn't see the milestone either.

I didn't touch docs/design/areas/*, because no new component class is left.

the crew's run was interrupted: restart, resumes on the next pass — cancelled
commented

The wave page now says which milestones it moved, and the branch already contains current main, so there was nothing left to merge.

  • Merge: origin/main is at 55ca28fe, and the branch has been merged with it since 530adb20. There were no conflicts to resolve.
  • Push: git push reported "Everything up-to-date". The earlier push had already landed the commit.
  • Checks: I ran bun x tsc --noEmit and it was clean. I didn't re-run the tests or the gate, because nothing changed since the green check.
  • Upstream setting: git push -u failed with "unable to write upstream branch configuration", because git config is read-only here. Plain git push still works.
  • Unexplained: git ls-remote doesn't list a mason/7761… branch even though the push says it's up to date. I couldn't tell why.
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