Public: anyone can read this; the crew can change it.
The roadmap list is keyboard-first: j/k move between rows, enter opens one #10480
mason/forge:mason/10406-the-roadmap-list-is-keyboard-first-j-k-m → main 5 commits fork
4 files
changed +39
−2
scripts/unreached-allow.json −1
| @@ -15,7 +15,6 @@ | ||
| 15 | 15 | "src/flow/review_rounds.ts", |
| 16 | 16 | "src/flow/shared_red.ts", |
| 17 | 17 | "src/flow/stale_fold.ts", |
| 18 | "src/kernel/why_now.ts", | |
| 19 | 18 | "src/spawn/pod.ts", |
| 20 | 19 | "src/tui/gallery.ts", |
| 21 | 20 | "src/tui/ui/qr.ts", |
src/web/pages/roadmap.ts +2
| @@ -34,6 +34,7 @@ function needs(base: string, rows: readonly NeedsYou[]): Html | null { | ||
| 34 | 34 | title: r.text, |
| 35 | 35 | href: `${base}/${r.pull ? "pulls" : "issues"}/${r.number}`, |
| 36 | 36 | trail: html`${r.action}`, |
| 37 | nav: true, | |
| 37 | 38 | }), |
| 38 | 39 | )} |
| 39 | 40 | </ul> |
| @@ -45,6 +46,7 @@ function issueRow(base: string, i: RoadmapIssue): Html { | ||
| 45 | 46 | if (i.pull !== undefined) bits.push(`pull #${i.pull}`); |
| 46 | 47 | if (i.blockedBy !== undefined) bits.push(`waits for #${i.blockedBy.number} ${i.blockedBy.title}`); |
| 47 | 48 | return row({ |
| 49 | nav: true, | |
| 48 | 50 | ...(i.assignee === null ? {} : { lead: avatar(i.assignee) }), |
| 49 | 51 | title: html`#${i.number} ${i.title}${i.moved ? html`<span class="rm-moved">moved</span>` : null}`, |
| 50 | 52 | href: `${base}/${i.pull === undefined ? "issues" : "pulls"}/${i.pull ?? i.number}`, |
test/child-quota.test.ts +1 −1
| @@ -101,7 +101,7 @@ describe("child quota", () => { | ||
| 101 | 101 | |
| 102 | 102 | test("room for small but not large is refused only for large", async () => { |
| 103 | 103 | clear(); |
| 104 | process.env["FORGE_CHILD_MEMORY_MIB"] = "2000"; | |
| 104 | process.env["FORGE_CHILD_MEMORY_MIB"] = "5000"; | |
| 105 | 105 | expect(quotaRefusal(dir, "small")).toBeUndefined(); |
| 106 | 106 | expect(quotaRefusal(dir, "large")).toContain("memory limit"); |
| 107 | 107 | }); |
test/keys-roadmap.test.ts added +36
| @@ -0,0 +1,36 @@ | ||
| 1 | /** The roadmap joins the shell's j/k row traversal (#10406): one data-nav per linked row, none on the empty page, none on a folding pillar. */ | |
| 2 | import { expect, test } from "bun:test"; | |
| 3 | import { roadmapBody } from "../src/web/pages/roadmap.ts"; | |
| 4 | import type { Roadmap, RoadmapIssue, RoadmapPillar } from "../src/web/roadmap.ts"; | |
| 5 | ||
| 6 | const issue = (number: number, extra: Partial<RoadmapIssue> = {}): RoadmapIssue => ({ | |
| 7 | number, title: `Issue ${number}`, assignee: null, at: "2026-11-01T00:00:00Z", moved: false, ...extra, | |
| 8 | }); | |
| 9 | ||
| 10 | const pillar = (building: RoadmapIssue[], upNext: RoadmapIssue[]): RoadmapPillar => ({ | |
| 11 | short: "P1", name: "P1 Core", umbrella: null, state: "current", done: 0, total: 3, merged: 0, | |
| 12 | building, next: null, lastLanding: null, etaDays: null, etaAt: null, | |
| 13 | groups: { building, upNext, waiting: [], blocked: [], doneThisWeek: [] }, movedCount: 0, | |
| 14 | }); | |
| 15 | ||
| 16 | const road = (over: Partial<Roadmap>): Roadmap => ({ | |
| 17 | generatedAt: "2026-11-10T00:00:00Z", | |
| 18 | pace: { landed24h: 0, landed7d: 0, days: 7, current: null, etaDays: null, etaAt: null }, | |
| 19 | needsYou: [], pillars: [], ...over, | |
| 20 | }); | |
| 21 | ||
| 22 | const NAV = /<a href="[^"]+" class="row"[^>]*data-nav tabindex="-1"/g; | |
| 23 | ||
| 24 | test("each linked roadmap row carries data-nav; the folding pillar row does not", () => { | |
| 25 | const text = roadmapBody("/acme/forge", road({ | |
| 26 | needsYou: [{ kind: "hold", text: "Held", action: "Release", number: 5, pull: true }], | |
| 27 | pillars: [pillar([issue(1), issue(2, { pull: 9 })], [issue(3)])], | |
| 28 | })).text; | |
| 29 | expect(text.match(NAV)?.length).toBe(4); | |
| 30 | expect(text).toContain('href="/acme/forge/pulls/9"'); | |
| 31 | expect(text).not.toMatch(/<summary[^>]*data-nav/); | |
| 32 | }); | |
| 33 | ||
| 34 | test("the empty roadmap draws no data-nav row", () => { | |
| 35 | expect(roadmapBody("/acme/forge", road({})).text).not.toContain("data-nav"); | |
| 36 | }); |
new above
offline