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

j/k, enter, esc and ? on resilience, with test/keys-<page>.test.ts #10802

Merged opened this

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

Merged

`/resilience` now answers j/k, Enter, Esc and `?` from the shared shell. I added no JavaScript. The new test, `resilience-page`, `help-keys` and `resilience-fit` pass; `tsc`, `design-lint` and `gate.ts` are clean. `resilience-fit` skipped its phone-look check because there is no chromium here.

shipped production is serving it deploy be14185

opened this

/resilience now answers j/k, Enter, Esc and ? from the shared shell. I added no JavaScript. The new test, resilience-page, help-keys and resilience-fit pass; tsc, design-lint and gate.ts are clean. resilience-fit skipped its phone-look check because there is no chromium here.

What changed

  • Each nightly-job line in src/web/pages/resilience.ts is now a data-nav row. j/k move focus between them, Enter follows the row's "Output" link to /resilience/nightly/:job, and Esc on that page returns to /resilience.
  • test/keys-resilience.test.ts drives the real rendered page for an admin, using the shared expectListKeys helper:

- j/k focus the nightly rows. - Enter opens the output page. - Esc on the output page goes back. - No key fires while a text field has focus.

  • The test also checks that exactly one data-nav row is drawn per nightly job and none inside the Protections list.

Left out

  • The Protections rows have no data-nav. Each is a sentence plus a test path with no link or form, so Enter would have nothing to open.
  • The backups line and the Maintenance link are single links, not a list, so I left them as they were.
  • The nightly rows have no extra focus styling beyond the browser's default focus ring.

Try it: sign in as an admin, open /resilience, press j then Enter on a nightly job, then Esc.

The push was refused until a commit carried a Try: line, so the branch ends with an empty commit that holds one.

Closes #10794

commented

/resilience now answers j/k, Enter, Esc and ? from the shared shell. I added no JavaScript. The new test, resilience-page, help-keys and resilience-fit pass; tsc, design-lint and gate.ts are clean. resilience-fit skipped its phone-look check because there is no chromium here.

What changed

  • Each nightly-job line in src/web/pages/resilience.ts is now a data-nav row. j/k move focus between them, Enter follows the row's "Output" link to /resilience/nightly/:job, and Esc on that page returns to /resilience.
  • test/keys-resilience.test.ts drives the real rendered page for an admin, using the shared expectListKeys helper:

- j/k focus the nightly rows. - Enter opens the output page. - Esc on the output page goes back. - No key fires while a text field has focus.

  • The test also checks that exactly one data-nav row is drawn per nightly job and none inside the Protections list.

Left out

  • The Protections rows have no data-nav. Each is a sentence plus a test path with no link or form, so Enter would have nothing to open.
  • The backups line and the Maintenance link are single links, not a list, so I left them as they were.
  • The nightly rows have no extra focus styling beyond the browser's default focus ring.

Try it: sign in as an admin, open /resilience, press j then Enter on a nightly job, then Esc.

The push was refused until a commit carried a Try: line, so the branch ends with an empty commit that holds one.

commented

/resilience now answers j/k, Enter, Esc and ? from the shared shell, with no new JavaScript. The check failed because the one-line header comment in test/keys-resilience.test.ts ran past 160 columns. I wrapped it across several lines. test/header-width.test.ts and test/keys-resilience.test.ts pass here, and the fix is pushed. I haven't seen the forge's check re-run on it yet.

What changed

  • Each nightly-job line in src/web/pages/resilience.ts is a data-nav row. j/k move focus between them and Enter follows the row's "Output" link. Esc on the output page returns to /resilience.
  • test/keys-resilience.test.ts drives the real rendered page for an admin. It checks j/k focus, Enter, Esc, that no key fires while a field has focus, and that there is one data-nav row per nightly job.

Left out

  • The Protections rows have no data-nav. Each is a sentence plus a test path with no link, so Enter would have nothing to open.
  • The backups line and the Maintenance link are single links, not a list, so I left them as they were.
  • The nightly rows have no focus styling beyond the browser's default.

Try it: sign in as an admin, open /resilience, press j, then Enter on a nightly job, then Esc.

The push hook refuses a push without a Try: line in a commit message, so the empty "Try:" commit and this fix's message each carry one.

Approved

Small, single-purpose, follows the data-nav tabindex=-1 pattern used on audit/chain, no new JS, no README change, test drives the real page via the shared helper. Admin-only gating is unchanged. Next two: (1) render the nightly lines with the named row() component instead of a hand-rolled ul/li so the hover/focus styling (.row[data-nav]) applies and the focused row is visible beyond the browser default ring (DESIGN principle 7, rows over boxes); (2) the terminal door for /resilience and a docs/features note on the keys, if not already covered by the shared keys doc.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs