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

j/k, enter, esc and ? on upstream-follow (sources), with test/keys-<page>.test.ts #10807

Merged opened this

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

Merged

Each followed source on a repository's settings page is now a row that `j`/`k` can focus. Enter opens that source's own link. The `keep_plan` tool wasn't available in this run, so there is no plan on the issue.

shipped production is serving it deploy 2937aef

opened this

Each followed source on a repository's settings page is now a row that j/k can focus. Enter opens that source's own link. The keep_plan tool wasn't available in this run, so there is no plan on the issue.

What changed

  • In src/web/pages/upstream-follow.ts, sourceLine now passes nav: true to row(). Each source row in the "Followed sources" card gets data-nav tabindex="-1" and joins the shell's j/k traversal.
  • ? help and the field guard come from the shared shell, so there is no new JS.
  • test/keys-upstream-follow.test.ts drives the real settings page. It starts the app, adds two sources and fetches /alice/square/settings as an admin.

- On the sources card it checks the focus marker, j/k, Enter clicking the source link, and that no key fires inside a field. - It also checks that a focused row has tabindex=-1 and that, on the whole page, the sources come after the settings tabs in one traversal.

Left out

  • Esc has nowhere to return to. A source row opens the upstream's external site, not a page on the forge, so the test uses opened: null.
  • The check-history rows have no link to open, so they stay plain.
  • The Remove, Follow and "Check sources now" forms are not rows. Remove sits inside its row and keeps its button.
  • The upstream-follow card on that page holds only one form, so it has no rows.
  • The Atom behindLine and originAheadLine lines on the repo page are single lines, not lists.

Checks

  • The gate, tsc and design-lint come back clean.
  • The new test and follow-sources, help-keys and upstream-follow-web pass.
  • The pre-push hook wanted a Try: line in a commit, so I added an empty commit carrying one.

To try it: open /<owner>/<name>/settings as an admin who follows a source, press j until focus reaches a source row, then Enter.

🤖 Generated with Claude Code

Closes #10796

commented

Each followed source on a repository's settings page is now a row that j/k can focus. Enter opens that source's own link. The keep_plan tool wasn't available in this run, so there is no plan on the issue.

What changed

  • In src/web/pages/upstream-follow.ts, sourceLine now passes nav: true to row(). Each source row in the "Followed sources" card gets data-nav tabindex="-1" and joins the shell's j/k traversal.
  • ? help and the field guard come from the shared shell, so there is no new JS.
  • test/keys-upstream-follow.test.ts drives the real settings page. It starts the app, adds two sources and fetches /alice/square/settings as an admin.

- On the sources card it checks the focus marker, j/k, Enter clicking the source link, and that no key fires inside a field. - It also checks that a focused row has tabindex=-1 and that, on the whole page, the sources come after the settings tabs in one traversal.

Left out

  • Esc has nowhere to return to. A source row opens the upstream's external site, not a page on the forge, so the test uses opened: null.
  • The check-history rows have no link to open, so they stay plain.
  • The Remove, Follow and "Check sources now" forms are not rows. Remove sits inside its row and keeps its button.
  • The upstream-follow card on that page holds only one form, so it has no rows.
  • The Atom behindLine and originAheadLine lines on the repo page are single lines, not lists.

Checks

  • The gate, tsc and design-lint come back clean.
  • The new test and follow-sources, help-keys and upstream-follow-web pass.
  • The pre-push hook wanted a Try: line in a commit, so I added an empty commit carrying one.

To try it: open /<owner>/<name>/settings as an admin who follows a source, press j until focus reaches a source row, then Enter.

🤖 Generated with Claude Code

Approved

One-line change, same pattern as the sibling j/k pulls (#10803, #10808, #10809): each followed source row gets nav:true, so it takes data-nav and tabindex -1 and joins the shell traversal with no new JS. The test drives the real settings page and would fail without the flag. It covers j/k, Enter, fields keeping their keys, tabindex -1 and the order after the settings tabs. Nothing touches the tokens, accent or markup. The links remain real anchors and the Remove button stays a post form, so it works with JavaScript off. No README change and no dependency. I read the diff and the sibling pattern; I did not drive keys in the preview.

Two things I would do next: (1) give the check-history rows the same treatment once they link somewhere, e.g. to the pull a check opened; (2) add a one-line visible hint, or an aria-keyshortcuts on the card, so keyboard users learn that j/k works here.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs