Skip to content

Add arrow-key destination selection - #37

Merged
bradflaugher merged 1 commit into
mainfrom
feat/arrow-key-destination-selection
Jun 11, 2026
Merged

bradflaugher merged 1 commit into
mainfrom
feat/arrow-key-destination-selection

Conversation

@bradflaugher

Copy link
Copy Markdown
Owner

Summary

Keyboard shortcuts for changing the routing destination, especially on desktop:

  • While typing: / move a highlighted selection through the ranked score rows; the engine hint mirrors the selection so you can see where Enter will go. Enter routes to the highlighted engine, overriding the model's pick. Esc reverts to the model's choice.
  • Stale-selection safety: any new keystroke re-classifies and resets the selection, so a choice made against an old ranking can never fire.
  • Native caret preserved: arrows keep their default text-input behavior whenever the scores panel isn't showing.
  • Routing overlay (?q= links / mobile chooser): arrows move the selection between override buttons, the engine-name display follows, and Enter confirms via the same delegation path as a tap.
  • Documented in the ? help overlay and README.

Test plan

  • 7 new Playwright tests: selection movement + hint mirroring, wrap-around, Enter-override (walks the selection to Wirecutter and asserts navigation to nytimes.com), Esc revert, stale-selection reset, caret preservation, and overlay arrow navigation.
  • Full suite green: chromium 95 passed / 4 skipped; firefox + webkit + mobile-safari 92 passed / 7 skipped (desktop-only tests skipped on mobile by design).
  • npm run lint clean.

🤖 Generated with Claude Code

While typing on desktop, Up/Down now move a highlighted selection
through the ranked score rows; the engine hint mirrors the selection
and Enter routes there, overriding the model's pick. Esc reverts to
the model's choice, and any new keystroke re-classifies and drops the
selection so a stale choice can never fire against a fresh ranking.
Arrow keys keep their native caret behavior when no scores are shown.

The routing overlay (?q= links / mobile chooser) gets the same
treatment: arrows move the selection between override buttons and
Enter confirms via the existing click delegation path.

Documented in the `?` help overlay and README; covered by 7 new
Playwright tests (selection movement, wrap-around, Enter override,
Esc revert, stale-selection reset, caret preservation, overlay
navigation).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bradflaugher
bradflaugher merged commit 00b8687 into main Jun 11, 2026
7 checks passed
@bradflaugher
bradflaugher deleted the feat/arrow-key-destination-selection branch June 11, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant