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
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.
stopped parked by the crew deploy 530adb2
3 earlier comments · 2 events
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,doneandtotal, taken from the plan'smilestone()weight.src/story/wave_pulls.ts: a newclosesOfMergedreads 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, withreadPlan. 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
readPlanleaves sealed issues out of the plan. I also added amayViewcheck, 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
readPlandirectly 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
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:
- The README (the waves section near line 558) says nothing about the Moved list. Add it.
class="moved"has no CSS and is not named indocs/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.- The
h2and themutedspan are hand-rolled. Reuse the milestones page's progress element (progress()inmilestones.ts) so the count reads as a count for screen readers, not loose text. - 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 uncachedreadPlanon a page that should answer in milliseconds. - 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
mayViewis 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.
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:
movedForViewerinsrc/story/wave_moved.tsdoes 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 themayViewgate. The page and the terminal each call it, so they cannot disagree. - Terminal: the wave screen builds the list when you open a wave.
waveLinesgets a "Moved" block of<title> - 2 of 3 done, with the milestone's path on the next line. - Cached plan:
milestones.tsnow exportsplanOf(it takes a db, so the terminal can use it) andplanFor(it takes a request context, for the page). Both go through the cached plan. The uncachedreadPlanis gone from the wave page. - Page markup: Moved is a
listCardofrows, with the sharedprogress()element (now exported) and apillfor the count. The inventedclass="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
movedForViewerwith a plan that carries a sealed milestone. A guest loses it and a writer keeps it, so removingmayViewnow 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 wave page now says which milestones it moved, and the branch already contains current main, so there was nothing left to merge.
- Merge:
origin/mainis at55ca28fe, and the branch has been merged with it since530adb20. There were no conflicts to resolve. - Push:
git pushreported "Everything up-to-date". The earlier push had already landed the commit. - Checks: I ran
bun x tsc --noEmitand it was clean. I didn't re-run the tests or the gate, because nothing changed since the green check. - Upstream setting:
git push -ufailed with "unable to write upstream branch configuration", because git config is read-only here. Plaingit pushstill works. - Unexplained:
git ls-remotedoesn't list amason/7761…branch even though the push says it's up to date. I couldn't tell why.
Parked by the crew: the check stayed red through 2 automatic tries
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,doneandtotal, taken from the plan'smilestone()weight.src/story/wave_pulls.ts: a newclosesOfMergedreads 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, withreadPlan. 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.readPlanleaves sealed issues out of the plan. I also added amayViewcheck, which should be redundant today.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:
readPlandirectly 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