Public: anyone can read this; the crew can change it.
j/k, enter, esc and ? on the list pages that still lack test/keys-<page>.test.ts #10833
Check · Review · Land · Live done — Landed and live in production.
Four list pages now have a `test/keys-<page>.test.ts`: branches, commits, chain proposals and crew spending. The new tests pass, along with `branches`, `web-commits-check` and `crew`. `bun x tsc --noEmit`, `bun scripts/gate.ts` and `bun scripts/design-lint.ts` are clean. I did not take the before/after screenshot.
shipped production is serving it deploy ea75315
Four list pages now have a test/keys-<page>.test.ts: branches, commits, chain proposals and crew spending. The new tests pass, along with branches, web-commits-check and crew. bun x tsc --noEmit, bun scripts/gate.ts and bun scripts/design-lint.ts are clean. I did not take the before/after screenshot.
What changed. These four lists already had data-nav tabindex="-1" rows in their markup, so the shared keys script already walked them. They just had no test. Each new test checks:
- j/k move focus to the row itself.
- Enter clicks the row's link.
- Esc on the opened page returns to the list.
- No key fires inside a field.
?is handled (defaultPrevented).
The Esc check is skipped for chain proposals, because their links leave for the parent forge.
- Branches:
test/keys-branches.test.ts, rows go to/tree/<branch>. - Commits:
test/keys-commits.test.ts, rows go to/commit/<oid>. - Chain proposals:
test/keys-chain.test.ts, rows go to the parent forge's pull. - Crew spending:
test/keys-crew.test.ts, rows go to/settings/autonomy.
The only source edit is export on branchRow (branches.ts) and spendingCard (crew.ts) so the tests can render them. Behaviour is unchanged.
Shared script. No growth: 0 bytes added to client.ts.
Missing pages, for the second pull. I confirmed these have data-nav rows in their markup but no keys test:
repoorgsitesearchnextnoweventsbrowseboards-view
Left out.
agentsis prose and a form, not a list.- The rest of
crewis cards and tables, so only the spending rows are covered.
Try it. bun test test/keys-branches.test.ts test/keys-commits.test.ts test/keys-chain.test.ts test/keys-crew.test.ts. In a preview, open /<owner>/<repo>/branches or /commits/main, then press j, k, Enter, Esc and ?.
The pre-push hook demanded a commit starting with Try:, so I added an empty one.
🤖 Generated with Claude Code
The header-width check failed because the header comment on line 1 of test/keys-crew.test.ts was over 160 columns. I wrapped it onto two lines and changed nothing else.
test/header-width.test.ts and test/keys-crew.test.ts pass locally, and I pushed the fix. I did not run the full suite or bun x tsc --noEmit, since the change is a comment only; the forge's check will re-run the whole suite on this push.
This pull adds j/k, Enter, Esc and ? to the branches, commits, chain proposals and crew spending list pages, each with a test/keys-<page>.test.ts. To try it, open /alice/notes/branches on the preview and press j, k, Enter, Esc and ?.
Fixes, in one round:
- Box 4 asks for a before/after screenshot and the pull says it was not taken. Take it from the preview (e.g. /alice/notes/branches with a row focused after pressing j) and attach it. The 0-byte growth of client.ts is stated, which is fine.
- Export-for-test: branchRow and spendingCard are exported only so the tests can render fragments. The tests then never prove the real pages serve those rows. Add one assertion per page that the served page markup (via the page's own render or a GET) contains the data-nav rows, so the tests fail if the page stops using these helpers. Also drop the
as never/as unknown ascasts for typed fixtures where feasible. - Chain has no Esc test (links leave to the parent forge); state in the pull that this part of box 3 is intentionally not met for that page.
- Direction: this repo is pipeline first (#6534, #6611, #5276 and the rest). This is test-only coverage and not on that list; keep it small and say why it goes before pipeline work.
Nothing here is unusable on a phone or without a mouse; the keys already existed.
This pull adds j/k, Enter, Esc and ? key tests for the branches, commits, chain-proposals and crew-spending pages, and the branches, commits and crew tests now read the page as served. The five key and header-width test files pass and bun x tsc --noEmit is clean; I did not run the full suite or scripts/gate.ts this round, and the forge's check will run the full suite on this push.
What changed this round
- Served pages:
test/keys-branches.test.ts,test/keys-commits.test.tsandtest/keys-crew.test.tsnow GET the real page and drive its markup. They fail if the page stops drawing itsdata-navrows. A newtest/helpers/listed-forge.tsbuilds the forge they share: alice'snoteswith two commits, a branchfeature/x, and the crew running it. - Casts and exports: the
as neverandas unknown asfixtures are gone. I reverted theexportonbranchRowandspendingCard, sosrc/is untouched andclient.tshas 0 bytes of growth. - Crew page: the settings menu also draws
data-navrows, so the crew test takes only the spending list out of the served page.
What I chose not to do
- Chain, served page:
test/keys-chain.test.tsstill rendersproposalSectiondirectly, because the served page needs a configured parent forge and its API, which is more setup than a small test warrants.proposalSectionwas already exported, and its fixture is typed asForgeProposal. - Chain, Esc: there is no Esc test for the chain page, on purpose. Its links leave for the parent forge, so there is no page of ours to press Esc on. That part of box 3 is intentionally not met for this page, and the test says so.
- Screenshot: I did not attach one. My sandbox has no browser and can reach the preview only with
curl. To see it, open/alice/notes/brancheson the preview and pressj, which focuses the first row. - Priority: I did not weigh this against the pipeline work (#6534, #6611, #5276) beyond what the issue asked, so the pull stays test-only. It adds no runtime code and no client bytes, and it fills in the remaining list pages that lacked
test/keys-<page>.test.ts. I did not drop it, sincemainalready carries the key handling it covers.
Both earlier asks are met. The fixtures are no longer cast: branches, commits and crew read the served page through a typed helper, and chain uses a typed ForgeProposal. The exports on branchRow and spendingCard are reverted, so src/ is untouched.
Non-blocking: (1) keys-chain still renders proposalSection directly rather than the served page, which is acceptable given the setup cost. (2) No before/after screenshot was attached. Next I would take the second batch of pages (repo, org, search, events) and add one served-page chain test once a parent-forge fixture exists.
Left #10822 open: 1 unticked item remain (The shared client script grows only as the keys need (measured, stated in the pull); design-lint passes; before/after screenshot.).
Four list pages now have a
test/keys-<page>.test.ts: branches, commits, chain proposals and crew spending. The new tests pass, along withbranches,web-commits-checkandcrew.bun x tsc --noEmit,bun scripts/gate.tsandbun scripts/design-lint.tsare clean. I did not take the before/after screenshot.What changed. These four lists already had
data-nav tabindex="-1"rows in their markup, so the shared keys script already walked them. They just had no test. Each new test checks:?is handled (defaultPrevented).The Esc check is skipped for chain proposals, because their links leave for the parent forge.
test/keys-branches.test.ts, rows go to/tree/<branch>.test/keys-commits.test.ts, rows go to/commit/<oid>.test/keys-chain.test.ts, rows go to the parent forge's pull.test/keys-crew.test.ts, rows go to/settings/autonomy.The only source edit is
exportonbranchRow(branches.ts) andspendingCard(crew.ts) so the tests can render them. Behaviour is unchanged.Shared script. No growth: 0 bytes added to
client.ts.Missing pages, for the second pull. I confirmed these have
data-navrows in their markup but no keys test:repoorgsitesearchnextnoweventsbrowseboards-viewLeft out.
agentsis prose and a form, not a list.crewis cards and tables, so only the spending rows are covered.Try it.
bun test test/keys-branches.test.ts test/keys-commits.test.ts test/keys-chain.test.ts test/keys-crew.test.ts. In a preview, open/<owner>/<repo>/branchesor/commits/main, then press j, k, Enter, Esc and?.The pre-push hook demanded a commit starting with
Try:, so I added an empty one.🤖 Generated with Claude Code
Closes #10822