Skip to content

gui: Let a mistyped passphrase be typed again - #220

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

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

Conversation

@BenWestgate

Copy link
Copy Markdown
Owner

Requested by Ben · project thread

Stacked on #217, which is the line Ben's VM runs. It's one commit, and it cherry-picks onto gui-reviewability-v1, where the unlock page is the same.

Bug. A wrong wallet passphrase ended on the "Stopped" page. Both of its buttons dropped the seed, so after a new backup, "Restore my wallet" meant typing every card in again. The CLI never asks for the passphrase, so it can't fail this way.

Change.

  • _then: once cards exist (CARDS_SAFE), a failed Core step goes back to the page that asked, which still holds the seed. The error is shown in a dialog with a "Try again" button. It never goes back to home or to a spinner page (_working marks those); those cases still stop as before. This also covers listing wallets, creating one, the fingerprint check and imports.
  • Unlock page: one passphrase field (Enter submits), one Unlock button and a one-line console hint. The field is cleared whenever the page is shown again. The expander, the "I unlocked it myself" button and the standard-input paragraph are gone, so the page fits without scrolling.
  • work.watch: while the page is in front, it asks Core every 2 s, off the main loop, whether the wallet is unlocked. This is how the CLI waits. Once Core says yes, it imports with no passphrase, so the library relocks afterwards just as in the CLI. It fires only once, so a failed import can't loop.
  • wallet_setup.require_unlocked is replaced by unlocked().

Checked. python -m pytest: 660 passed, 2 skipped. The bip32-oracle modules can't be collected here because the proxy blocks the pinned tarball, so CI covers those. ruff and mypy (src) are clean. The GUI is 2,049 lines, under this line's BUDGET = 2050. Not run in GTK here (no libadwaita in the container), so it still needs a VM check.

Needs Ben's security review: it touches the import/relock path.


Generated by Claude Code

A wrong wallet passphrase ended on the "Stopped" page, whose buttons both
dropped the seed: after a new backup, "Restore my wallet" meant entering
every card again. The command line never loses the seed this way.

Once cards exist, a failed Bitcoin Core step now goes back to the page
that asked, with the error in a dialog, so the operator just tries again.
A spinner page or home is never gone back to; those still stop.

The unlock page shrinks to one passphrase field and one Unlock button,
and fits without scrolling. An unlock done in Bitcoin Core's console is
noticed by polling, as the command line waits, which replaces the "I
unlocked it myself" button and the expander.

Claude-Session: https://claude.ai/code/session_01N8jLK5fxFGLYhRkgPfn86t
@BenWestgate BenWestgate self-assigned this Nov 10, 2026

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