Public: anyone can read this; the crew can change it.
j/k, enter, esc and ? on returns, with test/keys-<page>.test.ts #10803
Check · Review · Land · Live done — Landed and live in production.
`/board/returns` now has j/k focus and Enter opening the row. Esc and `?` come from the shared shell. I didn't use `keep_plan`: the change was one line and a test. I ran `bun x tsc --noEmit`, `bun scripts/design-lint.ts` and `bun scripts/gate.ts` and they were clean. I ran the new test and `test/returns.test.ts` (9 pass) but not the full suite, since `scripts/fast.ts` could only say the diff was t…
shipped production is serving it deploy 8911334
/board/returns now has j/k focus and Enter opening the row. Esc and ? come from the shared shell. I didn't use keep_plan: the change was one line and a test. I ran bun x tsc --noEmit, bun scripts/design-lint.ts and bun scripts/gate.ts and they were clean. I ran the new test and test/returns.test.ts (9 pass) but not the full suite, since scripts/fast.ts could only say the diff was too broad to name.
What changed
- The "What cost the most" rows are the only links on the page, so I marked them
nav: trueinsrc/web/pages/returns.ts. j/k move between them, Enter opens the issue, and Esc on that issue goes back to/board/returns. - No client JavaScript was added, so the issue's script-size measurement is zero. I did not take the before/after screenshot.
test/keys-returns.test.tsrenders the real page with two costly issues and runs the shell script over it in happy-dom. It checks:
- the data-nav links point at the issues;
- the focus marker follows j/k;
- Enter clicks the focused link;
- Esc on the opened issue returns to the list;
- j and Enter do nothing while a field has focus.
Left out
- "Where it went", "What did not land", "By pillar", "Reported from outside" and "A run" are figures with no destination, so there is nothing for Enter to open. I did not add links just to make them focusable.
?help was not tested, because it is the shared shell's and already covered bytest/help-keys.test.ts.
Push note
- The pre-push hook wanted a "Try:" commit, so I added an empty one: open
/board/returns, press j, Enter, then Esc.
To try it
- Open
/board/returns, press j to focus a costly issue, Enter to open it, Esc to come back.
🤖 Generated with Claude Code
One line (nav: true on the costliest rows) plus a test over the real page. It adds no JavaScript, no new style and no new component, so the design principles are untouched. Both doors: the terminal is not affected, since this adds no capability. The README is not touched. The preview redirects a signed-out request (303), so I could not see the rows there. I read the served-HTML contract from the test. Next, in order: 1) Give the figure-only sections (where it went, by pillar) a destination when one exists, so the keyboard reaches them too. 2) Add a one-line ? assertion in this test, so the help overlay lists j/k on this page if the shell ever stops covering it.
/board/returnsnow has j/k focus and Enter opening the row. Esc and?come from the shared shell. I didn't usekeep_plan: the change was one line and a test. I ranbun x tsc --noEmit,bun scripts/design-lint.tsandbun scripts/gate.tsand they were clean. I ran the new test andtest/returns.test.ts(9 pass) but not the full suite, sincescripts/fast.tscould only say the diff was too broad to name.What changed
nav: trueinsrc/web/pages/returns.ts. j/k move between them, Enter opens the issue, and Esc on that issue goes back to/board/returns.test/keys-returns.test.tsrenders the real page with two costly issues and runs the shell script over it in happy-dom. It checks:- the
data-navlinks point at the issues; - the focus marker follows j/k; - Enter clicks the focused link; - Esc on the opened issue returns to the list; - j and Enter do nothing while a field has focus.Left out
?help was not tested, because it is the shared shell's and already covered bytest/help-keys.test.ts.Push note
/board/returns, press j, Enter, then Esc.To try it
/board/returns, press j to focus a costly issue, Enter to open it, Esc to come back.🤖 Generated with Claude Code
Closes #10795