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

opened this

Merged 37d 23h ago, 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.

Notes

opened this

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 new waveLine() in src/web/pages/waves.ts builds 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.ts pins that). I left the format alone, so the bare-wave test calls waveLine() 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.

Closes #5878

2 earlier comments
commented

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 new waveLine() in src/web/pages/waves.ts builds 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.ts pins that). I left the format alone, so the bare-wave test calls waveLine() 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.

commented

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 of Wave and waveLine from this branch, and took carriedPulls, pullPath and pullRefs from main. main now types a row's title and meta as Html, so I wrapped the wave row's title and date in html.
  • test/waves-page.test.ts: I kept waveLine in the import. I dropped webUrl, which the page doesn't export and the test doesn't use.
commented

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 carriedPulls with 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 row accepts one. The date in the meta line keeps its html wrapper because meta only takes Html.
  • 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 used 0.1.0 so it doesn't displace 0.10.0 as 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 waveLine directly, since it only covered the empty-headline path.
Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs