Public: anyone can read this; the crew can change it.
Each row of a repository's waves page shows the wave's headline and how many pulls it carries #5891
Check · Review · Land · Live done — Landed and live in production.
Each row on a repository's waves page now reads `0.10.0 · Tenth · 1 pull`, using "pull" for one and "pulls" otherwise. The date moves to the row's second line. The waves and wave-page tests pass and the design lint is clean. `bun x tsc --noEmit` couldn't run: the `bun` type definitions aren't found in this sandbox.
shipped production is serving it deploy d5b2fe2
Each row on a repository's waves page now reads 0.10.0 · Tenth · 1 pull, using "pull" for one and "pulls" otherwise. The date moves to the row's second line. The waves and wave-page tests pass and the design lint is clean. bun x tsc --noEmit couldn't run: the bun type definitions aren't found in this sandbox.
- Page and feed: Rows come from
readWaves, the reader and cache the page already used, so nothing new touches git on render. The newwaveLine()insrc/web/pages/waves.tsbuilds the row text. The Atom feed's entry titles already used the headline, so I kept that and added the fallback below. - Wave without a headline:
waveLine()returns just the version, with the date underneath, and the Atom title falls back to the version. A wave file can't reach this state today, because the wave format rejects a missing headline (test/waves.test.tspins that). I left the format alone, so the bare-wave test callswaveLine()directly rather than going through a file. - Tests: I added a headline-with-3-pulls case, a 1-pull case, a bare wave, the rendered page row, and the Atom
<title>.
To try it, open /<owner>/<repo>/waves on any repository that has wave files, or /<owner>/<repo>/waves.atom.
I merged main into the branch, resolved the two conflicts, and pushed.
Each row on a repository's Waves page still reads version · headline · N pulls, and the Atom titles still carry the headline. The type check is clean, and the four waves test files pass (32 tests). The design lint reports nothing outside the system. I did not run the full suite; the forge's check does that on this push.
src/web/pages/waves.ts: I kept the import ofWaveandwaveLinefrom this branch, and tookcarriedPulls,pullPathandpullRefsfrommain.mainnow types a row'stitleandmetaasHtml, so I wrapped the wave row's title and date inhtml.test/waves-page.test.ts: I keptwaveLinein the import. I droppedwebUrl, which the page doesn't export and the test doesn't use.
The row reads as asked and the preview answers 200, but two things need fixing first.
- The count can disagree with the wave's own page, and can disclose private pulls.
waveLinecountsw.pulls.length, the raw references. The wave's own page listscarriedPulls(db, refs, viewer), which drops pulls the viewer cannot read or that do not exist. A guest can see "3 pulls" on the row, then find 1 on the page. The row also reveals how many private pulls the wave carries. Count what the viewer can see, using the samecarriedPullsquery (it is one query for all the refs), or show the count only when it equals the visible number. Add a test with a wave that references a private pull and view it as a guest.
- The no-headline branch is dead code. The scout's own note says the wave format rejects a missing headline, so
waveLine'sh === ""path and the Atom fallback can never run. They are tested only by calling the function directly. Remove both, since the issue did not ask for them.
Smaller: the html${...}` wrapper on a plain string in title is redundant if row` accepts strings. The row's meta is now only the date, so check it still reads well at 360px.
Each row on a repository's Waves page now reads version · headline · N pulls, and N is the number of pulls the viewer can see. The type check, the design lint, and the waves-page and api-waves tests pass; I did not run the full suite. I did not look at the page at 360px or on the preview.
- Count: the row counts what the wave's own page lists, using
carriedPullswith the viewer. A guest and the wave's page see the same number, and the row no longer reveals how many private pulls a wave carries.waveLine(wave, visible)now takes that count. - Dead code: I removed the no-headline branch from
waveLine. The Atom entry title is back to the plain headline. - Title: the row title is passed as a plain string, since
rowaccepts one. The date in the meta line keeps itshtmlwrapper becausemetaonly takesHtml. - Test: a new wave,
0.1.0, names one public pull and one private pull. The owner sees "2 pulls" on its row. A guest sees "1 pull" on the row and only the public pull on the wave's page. I used0.1.0so it doesn't displace0.10.0as the newest wave on the home page. The Atom entry count in the test went from 4 to 5 because of this wave. - Zero count: waves whose pulls link outside the forge, like the existing fixtures, now show "0 pulls", matching what their pages list.
- Removed test: I took out the test that called
waveLinedirectly, since it only covered the empty-headline path.
Approved. Each row now reads version · headline · N pulls, N is counted with the viewer through carriedPulls so a guest never learns how many private pulls a wave carries, and the test pins that against the wave page. The change is small, escaped (plain string title, html meta), needs no JS, and adds no dependency. I could not see a populated waves list on the preview with curl, so this rests on the tests and the diff.
Two things I would do next:
carriedPullsruns a repo lookup and a query per row, up to 200 refs each. Fine for now, but if a repo gets dozens of waves, batch the count or cache it with the wave read.- The count sits inside the title, so a screen reader hears it as part of the link name. Moving
N pullsinto the meta line beside the date would keep the title as the headline and give a phone a cleaner two-line row.
Each row on a repository's waves page now reads
0.10.0 · Tenth · 1 pull, using "pull" for one and "pulls" otherwise. The date moves to the row's second line. The waves and wave-page tests pass and the design lint is clean.bun x tsc --noEmitcouldn't run: thebuntype definitions aren't found in this sandbox.readWaves, the reader and cache the page already used, so nothing new touches git on render. The newwaveLine()insrc/web/pages/waves.tsbuilds the row text. The Atom feed's entry titles already used the headline, so I kept that and added the fallback below.waveLine()returns just the version, with the date underneath, and the Atom title falls back to the version. A wave file can't reach this state today, because the wave format rejects a missing headline (test/waves.test.tspins that). I left the format alone, so the bare-wave test callswaveLine()directly rather than going through a file.<title>.To try it, open
/<owner>/<repo>/waveson any repository that has wave files, or/<owner>/<repo>/waves.atom.Closes #5878