Skip to content

gui: Let Enter move on from every text field - #222

Draft
BenWestgate wants to merge 1 commit into
claude/project-thread-p319g5from
claude/project-thread-ju4kv7
Draft

BenWestgate wants to merge 1 commit into
claude/project-thread-p319g5from
claude/project-thread-ju4kv7

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Requested by Ben · project thread

Bug. On "Restore my wallet ▸ Enter your cards", Enter did nothing, even when every character checked out. No GUI text field on this line handled Enter (bails-v1-pin + #190/#191/#113/#217). gui-reviewability-v1 wires Enter per page, and only on its two card fields.

Change. One helper in _page, with no per-page wiring. Enter in a text field moves focus to the next field that is shown, switched on and editable, the way the CLI moves to its next prompt. From the last field, Enter presses the first page action that is shown and switched on. By default that is the primary (last) action. Card entry passes (Continue, Suggest a repair), so Enter on a card that doesn't check out asks for a repair, as the CLI does. Enter does nothing unless its page is the one in front.

Covers card entry (restore, check, repair, replace, seed), read-back, wallet record (fingerprint, then date), new wallet (name, passphrase, repeat, then Create), unlock, the YES gate, and the custom layout spin rows.

Decisions (Ben, 2026-11-17). Enter on the last card may show the master seed right away, the same way ms32 secret prints it once the last card is typed. BUDGET goes from 2063 to 2090; the GUI is now at 2,089 lines.

Review follow-up. This addresses the external review Ben pasted. Findings 2 and 3:

  • Fields and actions must be mapped, sensitive and, for fields, editable and focusable.
  • A page-in-front guard was added.
  • The walkthrough now presses the real Return key through the X server (xdotool) on every page listed above.
  • The walkthrough checks that a typed spin-row number is committed before Continue reads it.
  • It checks that hidden or switched-off fields and actions are skipped, and that a page behind another page ignores Enter.

Checked. Run against #217's head 6bcbfa0:

  • tools/gui_walkthrough.py on Xvfb (needs xdotool): 59 checks pass. Removing the page guard fails the guard check, and removing the helper stalls the walkthrough.
  • python -m pytest: 659 passed, 2 skipped. The bip32-oracle modules couldn't run here because the proxy blocks the pinned tarball, so CI covers them.
  • ruff and mypy are clean.

Stacked on #217. This touches share entry, so it stays a draft until Ben's security sign-off.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N8jLK7DpgY81q3JWXK4Zvz

@BenWestgate BenWestgate self-assigned this Nov 10, 2026
@BenWestgate
BenWestgate force-pushed the claude/project-thread-ju4kv7 branch from 46ca687 to 9d6cad8 Compare November 17, 2026 20:50
@BenWestgate
BenWestgate force-pushed the claude/project-thread-p319g5 branch from 6bcbfa0 to dfb6905 Compare November 17, 2026 20:54
Enter in a field did nothing, so a card that "checks out" still needed a
click on Continue. The CLI takes Enter as the answer to every prompt.

_page now wires every text field it holds, once: Enter moves to the next
field that is shown, switched on and editable, and from the last presses
the first page action that is shown and switched on (the last action by
default). Enter does nothing unless its page is the one in front. Card
entry falls back to "Suggest a repair", as the CLI offers a correction
for a card that does not check out. Covers card entry, read-back, wallet
record, new wallet, unlock, the YES gate and the custom layout numbers.

The walkthrough now presses the real Enter key through the X server
(xdotool) on every one of those pages.

Claude-Session: https://claude.ai/code/session_01N8jLK7DpgY81q3JWXK4Zvz
@BenWestgate
BenWestgate force-pushed the claude/project-thread-ju4kv7 branch from 9d6cad8 to 19053a6 Compare November 17, 2026 21:11

This branch has not been deployed

No deployments
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