Skip to content

Qt: Redesign the wallet setup dialog - #2016

Open
reubenyap wants to merge 2 commits into
claude/mystifying-merkle-59b813from
claude/wallet-setup-redesign
Open

reubenyap wants to merge 2 commits into
claude/mystifying-merkle-59b813from
claude/wallet-setup-redesign

Conversation

@reubenyap

@reubenyap reubenyap commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Summary

Replaces the single long "Create or Recover Wallet" form (about 230 words of instructions, with every input for both paths shown at once) with a three-page setup dialog.

  • Welcome: two choices, create a new wallet or restore one.
  • Create: what the recovery phrase is and three tips for keeping it safe. The 12-word option and the extra passphrase sit under a collapsed "Advanced options".
  • Restore: a numbered 12/24-word grid. Each number has its own column, so words never run into it. Pasting the phrase into a box fills it and the boxes after it, and typing a space moves to the next box. Words autocomplete from the BIP39 list, words not on it are flagged, and the checksum is checked before the dialog closes. The extra passphrase is one field with a show/hide toggle.
  • Wallet creation date: only shown when blocks are already on disk. The restore rescan only covers blocks already on disk, so on a fresh install the date can't speed anything up. Its minimum reads "Not sure" and leaves -wcdate unset, which starts the scan at the same block as the old default. Dates after today aren't accepted.
  • Validation: all checks run inside the dialog, so askRecover sets the startup args once, from accepted input only. Passphrases over the wallet's 256-byte limit are refused before the dialog closes, and so are pastes that don't fit the boxes left and words hidden by the 12-word choice.
  • RAP addresses: the RAP address count prompt is gone because RAP addresses are being retired. -defaultrapaddressnumber still works from the command line or firo.conf.

Stacked on #2015

The base is #2015's branch, so this diff is only the redesign commit. Merge #2015 first.

Testing

  • Built test_firo-qt on Linux (WSL, depends toolchain) and ran it on the minimal platform. WalletUiTests::emptyRecoverySeed and WalletUiTests::recoveryRetryUsesFinalInput pass. Both were updated for the new widgets, and the retry test now pastes the phrase into the first box. WalletUiTests::themeTintColors fails the same way on Wallet: Stop restore args leaking past their use #2015's head.
  • Rendered each page at the default 680×700 size to check the layout. Numbers never overlap words. On a fresh install the restore page fits without scrolling. With the date row and a passphrase both shown, it scrolls.
  • Not built or run on Windows or macOS. GUI tests aren't built for MinGW.

🤖 Generated with Claude Code

The Create or Recover Wallet dialog showed about 230 words of
instructions and every input for both paths at once, greyed out when
they didn't apply, with the recovery phrase typed into one line.

Split it into three pages:
- Welcome: two choices, create a new wallet or restore one.
- Create: what the recovery phrase is and how to keep it safe, with
  the 12-word option and the extra passphrase under a collapsed
  "Advanced options".
- Restore: a numbered 12/24-word grid. Each number has its own
  column, so words never run into it. Pasting the phrase into a box
  fills it and the boxes after it, and typing a space moves to the
  next box. Words autocomplete from the BIP39 list, and words not on
  it are flagged. The extra passphrase is one field with show/hide.

The wallet creation date only shows when blocks are already on disk:
the restore rescan only covers blocks already on disk, so on a fresh
install the date does nothing. Its minimum reads "Not sure" and leaves
-wcdate unset, which scans from where recovery phrases began, as the
old default did. Dates after today are no longer accepted.

Checks now run in the dialog before it closes, so askRecover sets the
startup args once, from accepted input only. Passphrase fields stop at
256 characters (wallet creation rejects longer ones).

The RAP address count is gone; RAP addresses are being retired.
-defaultrapaddressnumber still works from the command line or
firo.conf.

Tests: update emptyRecoverySeed and recoveryRetryUsesFinalInput for
the new widgets; the retry test pastes the phrase into the first box.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codeant-ai

codeant-ai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR bd5ba84 Oct 20, 2026 · 05:33 05:42

@codeant-ai

codeant-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 083994a4-78ad-43d5-941d-25f0065d639d

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T05:39:25.086710Z bd5ba84 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@codeant-ai codeant-ai Bot added the size:XL This PR changes 500-999 lines, ignoring generated files label Oct 20, 2026
@codeant-ai

codeant-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown

CodeAnt-AI Description

Redesign wallet setup with guided creation and recovery

What Changed

  • Wallet setup now guides users through separate welcome, creation, and restoration pages, with creation options tucked under Advanced options.
  • Recovery uses numbered word fields with autocomplete, supports pasting a phrase into the first field, and checks word spelling and phrase validity before continuing.
  • Passphrase fields appear only when selected, are limited to 256 characters, and restored-wallet passphrases can be shown or hidden.
  • The optional wallet creation date appears only when blocks are already on disk, cannot be set in the future, and defaults to “Not sure.” The RAP address count prompt has been removed.

Impact

✅ Clearer wallet creation and recovery steps
✅ Fewer recovery phrase entry errors
✅ Avoids misleading scan-date choices on fresh installs

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: bd5ba84cf9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/qt/recover.cpp Outdated
Comment thread src/qt/forms/recover.ui Outdated
Comment thread src/qt/recover.cpp Outdated
@codeant-ai

codeant-ai Bot commented Oct 20, 2026

Copy link
Copy Markdown

CodeAnt Nitpicks

2 code suggestions

1. mnemonic_check accepts 18-word phrases, but wordCount() only allows 12 or 24, so existing 18-word wallets cannot be restored.

Incomplete implementation · src/qt/recover.cpp:344


2. QCompleter is associated with one widget at a time; assigning it to every field leaves completion bound to the last word box, so other fields cannot complete reliably.

Api mismatch · src/qt/recover.cpp:71

@codeant-ai

codeant-ai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

CodeAnt PR Risk: High Risk

  • The PR should not merge yet because wallet restoration may miss funds received through RAP addresses.
  • The restore form removes the RAP-address count control, and the restore path no longer sets the corresponding scan option.

Assessed commit: 3eee59904043

Review follow-ups for the wallet setup dialog:
- A paste with more words than the boxes left is refused instead of
  silently dropping the extra words. Words that reach past box 12
  switch the grid to 24 boxes rather than landing in hidden ones.
- Restoring in 12-word mode is refused while boxes 13 to 24 still
  hold words, so a 24-word phrase entered under the wrong length
  can't restore from its first 12 words.
- Passphrase length is checked in UTF-8 bytes against the 256-byte
  limit CreateWalletFromFile enforces. The 256-character field limit
  it replaces let multibyte passphrases through to fail at startup.

Tests: extend recoveryRetryUsesFinalInput to cover all three.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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

size:XL This PR changes 500-999 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant