Skip to content

feat(desktop): keyboard navigation for clarify choices - #69799

Merged
OutThisLife merged 1 commit into
mainfrom
bb/salvage-64346-clarify-kbnav
Jul 23, 2026
Merged

feat(desktop): keyboard navigation for clarify choices#69799
OutThisLife merged 1 commit into
mainfrom
bb/salvage-64346-clarify-kbnav

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Salvages #64346 by @mapu-og (Mapurite; cherry-picked, authorship preserved).
Re-authored onto the merged ChoiceButton (#69769) and the sanitized choice
pipeline (#69497) — the original edited the pre-refactor inline <button>.

What it adds

A keyboard cursor over the clarify options on the live card:

  • ↑/↓ move a visual highlight across the choices and the trailing "Other"
    free-text row (wraps around).
  • 1-9 and A/B/C… pick a choice directly; the trailing number/letter
    jumps into the "Other" field.
  • Enter confirms the staged answer, or acts on the highlighted row (a choice
    responds immediately; "Other" focuses the textarea).
  • Full a11y: aria-current, aria-keyshortcuts (e.g. A 1), and
    data-highlighted on the active row.

The global key handler stands down whenever a focusable control (any field,
choice button, or the action bar) already has focus, so it never eats keystrokes
meant for the composer, the Other box, or a tabbed-to button.

Tests

clarify-tool.test.tsx — arrow cycling + aria wiring, number-select + Enter
confirm (asserts the clarify.respond payload), Other focus leaves typing keys
alone, and the handler yields while an action button is focused.

This is a feature (not a bugfix); it layers cleanly on top of the clarify
fixes. Stacked on #69796#69795; review/merge those first.

Supersedes #64346.

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on c63cd3c

ℹ️ Info

Desktop E2E visual evidence · View test artifacts · View job

1 visual diff.

inline evidence is publishing...

@alt-glitch alt-glitch added type/feature New feature or request P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) needs-decision Awaiting maintainer decision before any implementation labels Jul 23, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to open #65778: both add Desktop clarify keyboard navigation, but this patch uses active-surface arbitration while #65778 also changes settled-choice/history behavior. Please choose the intended UI semantics; they are not duplicate patches.

@OutThisLife
OutThisLife force-pushed the bb/salvage-69497-clarify-sanitize branch from 2927797 to b4c985b Compare July 23, 2026 03:30
@OutThisLife
OutThisLife force-pushed the bb/salvage-64346-clarify-kbnav branch from e79e3ad to f3c67c6 Compare July 23, 2026 03:30
@OutThisLife
OutThisLife force-pushed the bb/salvage-69497-clarify-sanitize branch from b4c985b to e3e3492 Compare July 23, 2026 03:51
@OutThisLife
OutThisLife force-pushed the bb/salvage-64346-clarify-kbnav branch from f3c67c6 to 4a4743a Compare July 23, 2026 03:52
@OutThisLife
OutThisLife force-pushed the bb/salvage-69497-clarify-sanitize branch from e3e3492 to 215550c Compare July 23, 2026 04:26
Base automatically changed from bb/salvage-69497-clarify-sanitize to main July 23, 2026 04:32
@OutThisLife
OutThisLife force-pushed the bb/salvage-64346-clarify-kbnav branch from 4a4743a to c63cd3c Compare July 23, 2026 04:41
@OutThisLife
OutThisLife enabled auto-merge (squash) July 23, 2026 04:42
@OutThisLife
OutThisLife merged commit 6096f73 into main Jul 23, 2026
27 checks passed
@OutThisLife
OutThisLife deleted the bb/salvage-64346-clarify-kbnav branch July 23, 2026 04:48
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…ch#69799)

Co-authored-by: Mapurite <272619650+mapu-og@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) needs-decision Awaiting maintainer decision before any implementation P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants