Public: anyone can read this; the crew can change it.
The changelog list is keyboard-first: j/k move between rows, enter opens one #10647
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/10431-the-changelog-list-is-keyboard-first-j-k → main 1 commit fork
2 files
changed +20
−0
src/web/pages/changelog.ts +1
| @@ -31,6 +31,7 @@ const FILTERS = 6; | ||
| 31 | 31 | function landingRow(l: Landing, own: string | undefined, showRepo: boolean): Html { |
| 32 | 32 | return row({ |
| 33 | 33 | href: `/${l.repo}/pulls/${l.number}`, |
| 34 | nav: true, | |
| 34 | 35 | title: l.title, |
| 35 | 36 | meta: html`${showRepo || l.repo !== own ? html`${l.repo} · ` : null}#${l.number}${l.bet === undefined ? null : html` · ${badge(l.bet, { variant: "outline" })}`}${l.from === undefined ? null : html` · folded in from ${l.from}`}`, |
| 36 | 37 | facts: [...(l.by === undefined ? [] : [{ label: "By", value: l.by }]), ...(l.with === undefined ? [] : [{ label: "With", value: l.with.join(", ") }])], |
test/keys-changelog.test.ts added +19
| @@ -0,0 +1,19 @@ | ||
| 1 | /** The changelog joins the shell's j/k row traversal: one data-nav per landing row, none when nothing shipped. */ | |
| 2 | import { expect, test } from "bun:test"; | |
| 3 | import type { Landing, Landings } from "../src/release/landings.ts"; | |
| 4 | import { shippedRegion } from "../src/web/pages/changelog.ts"; | |
| 5 | ||
| 6 | const l = (number: number, live: boolean): Landing => ({ repo: "a/b", number, title: `Pull ${number}`, at: "2026-03-05T10:00:00Z", live }); | |
| 7 | const read = (live: Landing[], onItsWay: Landing[]): Landings => ({ version: "1.0.0", commit: null, own: "a/b", live, onItsWay }); | |
| 8 | const NAV = /class="row"[^>]*data-nav tabindex="-1"/g; | |
| 9 | ||
| 10 | test("every landing row, live or on its way, is one data-nav row", () => { | |
| 11 | const text = String(shippedRegion(read([l(1, true), l(2, true)], [l(3, false)]), "a/b")); | |
| 12 | expect(text.match(NAV)?.length).toBe(3); | |
| 13 | }); | |
| 14 | ||
| 15 | test("a changelog with nothing shipped draws no data-nav row", () => { | |
| 16 | const text = String(shippedRegion(read([], []), "a/b")); | |
| 17 | expect(text).toContain("Nothing has shipped yet"); | |
| 18 | expect(text).not.toContain("data-nav"); | |
| 19 | }); |