External signer setup

bitcoin-core/gui-qml: PR #1060

5 minor findings · 1 suggestion

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Findings

Link

[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).

Details and suggested fix

externalSignerRoutePending survives Regular or Watch-only selection, import and goBack(). Those actions remain usable during discovery because their enabled state depends only on importingWallet. When the check finishes, onCheckFinished() tests only the pending flag before pushing signer setup or naming, regardless of the current page. Base performed discovery synchronously before navigating, so it did not expose this interaction window. Tie the pending route to the type-page instance that requested it, invalidate it when the user chooses another route or goes Back, and apply completion only while that page remains current. Add a regression that sets holdChecks, selects another wallet type, then calls finishCheckForTest().


Link

[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).

Details and suggested fix

onChangeSignerRequested opens setup with returnsToForm: true, but Back only pops the page. Editing a different path updates the shared draft and drops the earlier Ready result. On returning, error() and deviceName() are empty, so the form says “Connect and unlock your device, then check again.” Its “Check again” handler calls check(), whose continueCheck() saves the retained draft before discovery, replacing the working saved path if validation and persistence succeed. When Back leaves this setup step with an unchecked, unsaved edit, call revertDraft() before returning to the form. Extend the existing Back test to edit the path first.


Link

[minor] · Failed signer-path saves have no error feedback in HWI setup

If a settings.json write 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).

Details and suggested fix

On failed persistence, the options layer rolls back the setting and publishes settingsError before clearing pending. The signer's settingsPendingChanged handler sees that error and calls finishCheck() without retaining it. The edited path consequently remains NotChecked; pathError() exposes validation errors only, and error() exposes discovery results only. The shared path section shows neither the save error nor the SettingsView footer that normally displays it. Expose the save failure through a separate model property such as checkError and display it in the path section, retaining the draft for retry. Add coverage for a failed write followed by a successful retry.


Link

[minor] · ExternalSignerModel::tr() loses two existing Spanish translations

Moving the two discovery errors to ExternalSignerModel::tr() makes them fall back to English with Spanish selected, because bitcoin_qml_es.ts still stores their translations only under WalletQmlController.

Location: qml/models/externalsignermodel.cpp:316 (head).

Details and suggested fix

Discover() now translates the invalid-command-output and multiple-device messages under ExternalSignerModel; the startDiscovery() failure callback also uses that context. Their Spanish translations remain under WalletQmlController, with no matching model context. qt6_add_translation compiles the checked-in catalog directly, so Qt cannot match these lookups to the existing translations. Preserve their context with QCoreApplication::translate("WalletQmlController", ...) and add a translator-enabled model test for both messages, following the existing path-validation translation tests.


Link

[minor] · Short link spans can lose LinkText hover and focus regions

LinkText can 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).

Details and suggested fix

linkStretchAt() samples every 8 pixels and returns null when no sample hits the anchor. Its finer edge scans run only after a hit. A short link, or a short fragment at the end of a wrapped line, can lie entirely between samples and contribute no linkAreas entry. That fragment then has no custom MouseArea or FocusBorder; if the whole link is missed, Tab focus has no visible outline. Native Text link activation still works. Derive the regions from text-layout anchor bounds rather than coarse hit testing, and add a regression with a short anchor positioned between sampling points.


Optional improvements

Link

[suggestion] · The ToastBanner commit message claims an already-present fix

Commit 2dd2c97bec0bd5ca85406eb91fda139e38afc597 adds 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).

Details and suggested fix

At 2dd2c97bec0bd5ca85406eb91fda139e38afc597, test/qml/tst_toastbanner.qml gains a fixture and test_shown_when_created_draws(), but the commit message describes production changes. Base ToastBanner.qml already binds opacity to visibility and starts dismissTimer in Component.onCompleted. Reword the commit as regression coverage for that existing fix, or fold it into 6244a030e0c5e4e4c2ec13d5c7632d2b2da6e30d, which adds the HWI warning that relies on it. Update the PR description to describe added coverage rather than a new banner behavior fix.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.

Background

Ralph's summary of historical context for the behaviour affected by this change. The historical record reviewed here is incomplete.

Unresolved disagreements

The early asynchronous-GUI discussion contained competing assessments of a simple worker/result-callback abstraction. One participant emphasized straightforward separation of blocking work from GUI updates; another raised cancellation, repeated requests, progress, and multiple outcomes as complications. The inspected reply disputed several objections but acknowledged cancellation and deletion-time waiting as limitations.

Those competing concerns explain why moving signer enumeration off the GUI thread also involves page lifetime, repeated requests, and shutdown ownership. The captured record does not establish a universally accepted abstraction or resolve the present implementation's behavior.

Source 1 · Source 2 · Source 3