Skip to content

Add digit shortcuts for clarify card answers - #3307

Merged
esokullu merged 2 commits into
webbrain-one:mainfrom
esokullu:main
Nov 2, 2026
Merged

esokullu merged 2 commits into
webbrain-one:mainfrom
esokullu:main

Conversation

@esokullu

@esokullu esokullu commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

esokullu and others added 2 commits November 2, 2026 21:20
Every answer on a clarify, permission or confirmation card now carries
its number in a small square at the button's right edge, and typing that
digit picks it. These cards interrupt a run and are usually settled with
one click, so the keyboard is the faster path.

The number lives in a data attribute that the stylesheet draws through
::after, not in the button's text. A card restored from saved chat HTML
sends its own label back as the answer, so a digit inside that text
would change what WebBrain receives. The empty alt text after the slash
keeps the digit out of the button's accessible name, and
aria-keyshortcuts announces the shortcut instead.

A digit only counts as a shortcut where nothing else claims the
keyboard: no focus, the composer, or the card itself, and only while
that field is empty. Someone typing "2 pages please" into the composer
keeps the character, and so does an answer that starts with a digit in
the card's own field. The handler clicks the button instead of
answering directly, so a permission card's label bookkeeping and a
scheduled card's tab still go through one path. The skip-all-prompts
button is not an answer and gets no number.

The help panel's shortcut list gained the line in all 23 languages, and
the lists that had drifted are back in step with en.js. Fifteen locales
advertised Ctrl/Cmd+M for voice input, which neither build has a handler
for, and left out Escape, which both of them do. Dutch held a "..."
placeholder where the list belongs, and the Firefox German list claimed
a second Escape stops a recording, which only Chrome can do.

test/clarify-option-shortcuts.mjs runs the real card renderer, the real
submit path and the keydown handler in Chromium and Firefox: the
numbering, the square drawn from the attribute, the answer a digit
sends, and the two cases where the digit stays text.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Number the answers on clarify cards and answer them with a digit
@vercel

vercel Bot commented Nov 2, 2026

Copy link
Copy Markdown

@esokullu is attempting to deploy a commit to the esokullu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@esokullu
esokullu merged commit 1fa3b29 into webbrain-one:main Nov 2, 2026
0 of 2 checks passed
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