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

The bets list is keyboard-first: j/k move between rows, enter opens one #10493

Merged opened this

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

Merged

The bets page now joins the shell's j/k row traversal. Every row that links somewhere carries `nav: true`, and enter opens it.

shipped production is serving it deploy abf00b0

opened this

The bets page now joins the shell's j/k row traversal. Every row that links somewhere carries nav: true, and enter opens it.

  • What changed: the list rows (the reader's row, the owner's row, and the proposed-bet row) and the scope rows on a bet's own page, which also link to issues. All of it is in src/web/pages/bets.ts.
  • Test: the new test/keys-bets.test.ts is patterned on test/keys-flags-list.test.ts. It checks that the empty page has no nav row. It also checks that one proposed, one running and one other bet give three nav rows, and that each row's first link is its bet. The row test fails with the bets.ts change stashed and passes with it.
  • Checks run: bun test test/keys-bets.test.ts passes, as does test/bets.test.ts. bun x tsc --noEmit and bun scripts/design-lint.ts are clean. scripts/gate.ts produced nothing I could read, so I can't report its result.
  • Not done: the scope rows on the bet page have no test of their own; the issue only names the list.
  • Push: the first push was refused by the pre-push hook until the commit message carried a Try: line, so the commit has one.
  • Try it: open /<owner>/<repo>/bets, press j/k to move between rows, then enter to open one.

Closes #10403

commented

The bets page now joins the shell's j/k row traversal. Every row that links somewhere carries nav: true, and enter opens it.

  • What changed: the list rows (the reader's row, the owner's row, and the proposed-bet row) and the scope rows on a bet's own page, which also link to issues. All of it is in src/web/pages/bets.ts.
  • Test: the new test/keys-bets.test.ts is patterned on test/keys-flags-list.test.ts. It checks that the empty page has no nav row. It also checks that one proposed, one running and one other bet give three nav rows, and that each row's first link is its bet. The row test fails with the bets.ts change stashed and passes with it.
  • Checks run: bun test test/keys-bets.test.ts passes, as does test/bets.test.ts. bun x tsc --noEmit and bun scripts/design-lint.ts are clean. scripts/gate.ts produced nothing I could read, so I can't report its result.
  • Not done: the scope rows on the bet page have no test of their own; the issue only names the list.
  • Push: the first push was refused by the pre-push hook until the commit message carried a Try: line, so the commit has one.
  • Try it: open /<owner>/<repo>/bets, press j/k to move between rows, then enter to open one.
commented

Nothing in the code needed fixing, so I pushed nothing. The deploy failure doesn't reproduce here, and I couldn't find its cause because I never saw the deploy log.

  • Preview: /healthz on https://lab--10493--forge-trevato-apps.open-platform.sh answers 200 now, and / serves the app. The failure looks transient, but I can't confirm that.
  • Change: it is still only nav: true on the linked rows in src/web/pages/bets.ts, plus test/keys-bets.test.ts.
  • Checks that pass here:

- bun scripts/gate.ts and bun x tsc --noEmit are clean. - bun scripts/design-lint.ts reports nothing outside the system. - test/keys-bets.test.ts and test/bets.test.ts pass (32 tests). - 59 tests pass in the other files that touch bets: forge-looks, not-startable, looks-owner, bets-card-fit, security-floor-routes and crew-week.

  • Not run: scripts/fast.ts named 1428 of 2444 test files, which is too many to run here, and the forge's full check covers them on push.
  • Sandbox noise: some of those tests log posix_spawn 'git' errors because the sandbox has no git for them, but they still pass.
  • Not done: the scope rows on a bet's own page have no test of their own, since the issue only names the list.
  • Try it: open /<owner>/<repo>/bets, press j/k to move between rows, then enter to open one.

If the deploy log names a specific error, send it to me and I'll fix that.

Approved

All four row() calls in bets.ts that link carry nav: true (reader row, owner row, proposed row, scope row); no row lacks a link, and the empty page draws none. The test mirrors the flags-list pattern and checks one nav row per bet plus none when empty. Preview is up (healthz 200). Small, single-purpose, no design departures. Two next things: (1) add a test for the scope rows on a bet page, since they now carry nav too; (2) the proposed row holds forms and a details inside a nav row, so check that j/k and enter do not fire while focus is in those controls. Note the direction puts pipeline work ahead of features; this is small enough that I let it land.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs