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

Each line of a repository's waves list says the wave's date: `0.7.12 · 2026-10-20 · headline · 4 pulls` #6489

Merged opened this

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

Merged

scout/forge:scout/6478-each-line-of-a-repository-s-waves-list-s → main 1 commit fork

  • Merged. scout/6478-each-line-of-a-repository-s-waves-list-s was merged into main as f0fbf5f.

Review

Sign in to review this change.
4 files changed +33 −9
src/tui/screens/waves.ts +2 −2
@@ -26,9 +26,9 @@ export function waveRows(entries: WaveEntry[]) {
2626 return entries.map((e) =>
2727 e.ok
2828 ? {
29 title: e.wave.headline,
29 title: `${e.wave.version} · ${e.wave.date} · ${e.wave.headline}`,
3030 secondary: "",
31 meta: `${e.wave.version} ${e.wave.date}`,
31 meta: "",
3232 }
3333 : { title: e.file, secondary: `Not a wave: ${e.reason}`, meta: "" },
3434 );
src/web/pages/waves.ts +2 −3
@@ -25,9 +25,9 @@ import { localScope } from "../scope.ts";
2525 const WHAT_A_WAVE =
2626 "A wave is a release note in waves/<version>.md that names its highlights and the pulls merged since the last one.";
2727
28 /** A wave's row title: `<version> · <headline> · N pulls`, N being the pulls this viewer can see. */
28 /** A wave's row title: `<version> · <date> · <headline> · N pulls`, N being the pulls this viewer can see. */
2929 export function waveLine(w: Wave, visible: number): string {
30 return `${w.version} · ${w.headline} · ${visible} ${visible === 1 ? "pull" : "pulls"}`;
30 return `${w.version} · ${w.date} · ${w.headline} · ${visible} ${visible === 1 ? "pull" : "pulls"}`;
3131 }
3232
3333 // GET /:owner/:name/waves
@@ -52,7 +52,6 @@ export async function wavesPage(ctx: Ctx): Promise<Response> {
5252 href: fileHref(e.file),
5353 // The wave's own page lists these same pulls, so the two agree.
5454 title: waveLine(e.wave, carriedPulls(ctx.app.db, pullRefs(e.wave), ctx.auth.user).length),
55 meta: html`${e.wave.date}`,
5655 })
5756 : row({
5857 href: fileHref(e.file),
test/waves-line-date.test.ts added +24
@@ -0,0 +1,24 @@
1 import { expect, test } from "bun:test";
2 import { waveLine } from "../src/web/pages/waves.ts";
3 import { waveRows } from "../src/tui/screens/waves.ts";
4 import type { Wave } from "../src/story/wave.ts";
5
6 const wave = (version: string, date: string, headline: string): Wave => ({
7 version,
8 date,
9 headline,
10 highlights: [],
11 pulls: [],
12 });
13
14 test("waveLine puts the date right after the version", () => {
15 expect(waveLine(wave("0.7.12", "2026-10-20", "Headline"), 4)).toBe(
16 "0.7.12 · 2026-10-20 · Headline · 4 pulls",
17 );
18 expect(waveLine(wave("0.7.12", "2026-10-20", "Headline"), 1)).toContain("1 pull");
19 });
20
21 test("the terminal's row says the same line", () => {
22 const rows = waveRows([{ ok: true, file: "0.7.12.md", wave: wave("0.7.12", "2026-10-20", "Headline") }]);
23 expect(rows[0]!.title).toBe("0.7.12 · 2026-10-20 · Headline");
24 });
test/waves-page.test.ts +5 −4
@@ -105,8 +105,9 @@ describe("waves page", () => {
105105 expect(at("Tenth")).toBeGreaterThan(-1);
106106 expect(at("Tenth")).toBeLessThan(at("Ninth"));
107107 expect(at("Ninth")).toBeLessThan(at("Zeta"));
108 expect(body).toContain("0.10.0");
109 expect(body).toContain("2026-02-01");
108 expect(body).toContain("0.10.0 · 2026-02-01 · Tenth · 0 pulls");
109 expect(body).toContain("0.9.0 · 2026-01-01 · Ninth · 0 pulls");
110 expect(at("0.10.0 · 2026-02-01")).toBeLessThan(at("0.9.0 · 2026-01-01"));
110111 expect(body).toContain('href="/alice/pub/waves/0.10.0"');
111112 });
112113
@@ -225,9 +226,9 @@ describe("waves page", () => {
225226
226227 test("a row counts the pulls this viewer can see, as the wave's page lists them", async () => {
227228 const body = await (await get("/alice/pub/waves")).text();
228 expect(body).toContain("0.1.0 · Mixed · 2 pulls");
229 expect(body).toContain("0.1.0 · 2026-03-05 · Mixed · 2 pulls");
229230 const guest = await (await get("/alice/pub/waves", false)).text();
230 expect(guest).toContain("0.1.0 · Mixed · 1 pull<");
231 expect(guest).toContain("0.1.0 · 2026-03-05 · Mixed · 1 pull<");
231232 expect(guest).not.toContain("2 pulls");
232233 expect(guest).not.toContain("Secret work");
233234 const page = await (await get("/alice/pub/waves/0.1.0", false)).text();

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs