mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
External signer setup #1060
No reviewers
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml!1060
Loading…
Reference in a new issue
No description provided.
Delete branch "external-signer-setup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
External signer wallets can be set up from Add wallet before HWI is configured, and the signer status says whether the problem is HWI or the device. Fixes #671. Fixes #672. Fixes #1018.
Add wallet: External signer is always offered when the build supports it. Without a working HWI it opens a "Set up HWI" step to install, choose and check it. A working HWI skips the step; the wallet name step can go back to it.
External signer settings: the signer command and the device are shown separately, so device problems no longer read as a broken HWI path. Paths with spaces are rejected, since Bitcoin Core can't run them. A signer given with
-signeris used and can be checked, but not edited.Checking: HWI runs only when you ask, off the main thread, and the path is locked while it runs. Settings and Add wallet share one path and result. Loading wallets no longer runs HWI.
Builds without external signer support: the option and its settings are hidden.
Shared:
LinkTextfor a link inside a sentence; status icons no longer keep an old color; the alert icon shows "!" instead of "i"; banners shown when their page opens now appear; wizard pages that fit no longer scroll into empty space.Tests: setup and settings states, checking, the shared path, the build gate,
LinkTextand the status icons.Known limitations: signing on the device still runs on the main thread (#977).
Add wallet
Set up HWI
External signer settings
Earlier concerns remain unresolved; see the Run archive linked from the Review report.
🟠 Minor · Late signer checks override a newer wallet-creation route
If the user changes wallet type or goes Back while signer discovery runs, its late completion still pushes a signer page over the new flow; real-device timing and occurrence were not measured.
Location: qml/pages/wallet/WalletCreationFlow.qml:139 (head).
🟠 Minor · Back from signer setup lets device retry save the retained edit
After editing the executable and returning with Back, the naming form describes an unchecked path as a device problem; its “Check again” action saves that retained edit if validation succeeds.
Location: qml/pages/wallet/WalletCreationFlow.qml:334 (head).
🟠 Minor · Failed signer-path saves have no error feedback in HWI setup
If a
settings.jsonwrite fails during HWI setup, the check returns to “Not checked” without displaying the save error, leaving the user unable to tell why checking did not run.Location: qml/models/externalsignermodel.cpp:62 (head).
🟠 Minor ·
ExternalSignerModel::tr()loses two existing Spanish translationsMoving the two discovery errors to
ExternalSignerModel::tr()makes them fall back to English with Spanish selected, becausebitcoin_qml_es.tsstill stores their translations only underWalletQmlController.Location: qml/models/externalsignermodel.cpp:316 (head).
🟠 Minor · Short link spans can lose
LinkTexthover and focus regionsLinkTextcan omit the hand cursor and focus outline for a sub-8-pixel link span between sampling points; no current caller producing such a fragment was found.Location: qml/controls/LinkText.qml:65 (head).
🔵 Suggestion · The
ToastBannercommit message claims an already-present fixCommit
2dd2c97bec0bd5ca85406eb91fda139e38afc597adds only regression coverage; its claimed initial-opacity and creation-time dismissal changes already exist at the comparison base.Location: test/qml/tst_toastbanner.qml:61 at 2dd2c97bec0b (commit) (commit).
Review coverage was incomplete.
Reviewed:
73594a9e17ac· Review reportFollow-up review of the incomplete shared-dialog, signer, resource and runtime coverage found a minor Icon teardown error and an introduced clang-tidy diagnostic in the test-motion startup path. The exact-head Qt 6.10 suite passes all 790 checks on the configured minimal platform. Targeted dialog cancellation, disabled-link keyboard and startup-error loop probes also pass. This is a scoped review; real-device HWI, full application IPC lifecycle, sanitizers and native macOS/Windows remain untested.
With ENABLE_TEST_AUTOMATION enabled, LLVM 22 clang-tidy rejects this new local with performance-no-automatic-move when it is returned below. Remove const from test_mode so the return can move the QString, then rerun the matching tidy check.
Destroying this icon before the deferred reset runs leaves root null, so this callback emits a QML TypeError. A teardown probe reproduces this on Qt 6.4.2 and 6.10.2, while the previous Icon implementation passes. Guard root before writing _sourceChanging and add a teardown test that fails on the warning.
As shown in the three screenshots below, wallet selection and Settings use “External signer”, but the setup wizard uses “HWI executable” and “Check HWI”, while Settings uses “Signer executable” and “Check device”.
Could we align the labels for the shared executable setting and check action?
Screenshots
Starting with no signer configured, I select “External signer”, choose an executable and press “Check HWI”. Once “Use this device” appears, I press Back without clicking it.
Selecting “External signer” again now skips setup and opens the wallet-name form. Back from there only returns to wallet-type selection, so I cannot revisit or change the executable within the wizard.
Could we retain a way to return to setup and change the executable?
I'll push fixes and rebase once 1052 merges.
This was introduced in 1052 so I included it in my most recent review.
Three issues remain:
-signer, making the path read-only also disables retries in Settings and setup.Qt.callLater()callback can run after destruction and emit a TypeError.Keep QML declarative by moving shared paths, validation, action availability and checking state into a C++ signer model. Both pages should bind to it and forward user actions.
Make these changes:
canCheckseparately fromcanEdit.Thanks for fixing the issues I raised earlier. I noticed one more thing while testing on Windows.
With a signer already configured, clicking "External signer" leaves me on "Choose a wallet type" with no indication that the app is checking the device. This is easiest to see with a device or emulator that takes a few seconds to respond. If I select "Regular" during that pause, the regular wallet form opens. When the device responds, the wizard switches to "External signer wallet" on its own.
Could the wizard open the external signer page right away and show that it's checking the device? If I go back from that page and choose "Regular", I'd expect the regular wallet form to stay open when the check finishes.