qml: audit the design system and adopt shared components

bitcoin-core/gui-qml: PR #1052

4 minor findings · 1 suggestion

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

Findings

Link

[minor] · Wallet password prompts retain the previous reveal state

After a user reveals a password once, reopening the same WalletPassphrasePopup leaves the next password visible as it is typed, without another reveal action.

Location: qml/components/WalletPassphrasePopup.qml:45 (head).

Details and suggested fix

The new PasswordTextField keeps passwordVisible independently of its text. The popup clears the text on show, hide and close, but never resets visibility. Persistent callers such as send review reopen the same instance, so revealing, cancelling and starting another send leaves the next prompt in TextInput.Normal, exposing newly entered characters to nearby viewers or screen sharing. The base field was always masked. Reset passphraseField.passwordVisible to false before each opening and on close. Extend the reopen test to reveal the password first and assert that the reopened field uses TextInput.Password; its current text-only assertion misses this state.


Link

[minor] · The GUI reset promise excludes the new appearance preferences

Although preserving appearance preferences is intentional, -resetguisettings still promises to reset all GUI settings while retaining the palette, text size and reduce-motion choice; the base theme was reset.

Location: qml/globalsettings.h:39 (head).

Details and suggested fix

GlobalSettings writes these preferences under a separate <app>-global identity, while ResetGuiSettings() clears the default per-network settings and legacy GUI settings. Theme.qml therefore reloads the retained values after a reset. This follows the documented network-independent policy, but someone using the command to recover an unwanted display configuration is still told it resets everything. Update the command help and reset documentation to state that appearance and accessibility preferences are preserved and can be changed in Display settings.


Link

[minor] · Compact settings routes load a hidden page

At compact widths, shell settings routes leave the requested page hidden; the only compact app path found is the debug mobile preview, so release impact is unconfirmed.

Location: qml/components/SettingsView.qml:148 (head).

Details and suggested fix

When compact Settings shows its sidebar, selectSection() loads the requested section without switching the split view to Detail. Both DesktopWallets.settingsLoader.applyPendingRoute() and MainWindow's openSettings() still use it, so an explicit menu or wallet-settings route can appear to do nothing after Back to the list or on an initially compact view. The narrowing handler only protects an already-open view changing width. Have explicit shell navigation call showSectionPage(), which also calls showDetail(), while retaining selectSection() for initialization and visibility restoration. Add a compact shell-route test after returning to the sidebar. Normal desktop windows have an 800 px minimum, above the 640 px compact threshold.


Link

[minor] · Switch thumbs ignore reduced and off motion modes

OptionSwitch retains an ungated thumb animation, so switches still slide with Reduce motion enabled and animate asynchronously with -test-motion=off, contrary to the new motion contract.

Location: qml/controls/OptionSwitch.qml:40 (head).

Details and suggested fix

The thumb's Behavior on x contains an unconfigured SmoothedAnimation; unlike the adjacent color behaviors, it never reads Theme.motion. This affects shared switches, including the Reduce motion setting itself. The animation predates the PR, but it remains outside the new reduced/off handling. Disable the x behavior when Theme.motion.reduced is true and use a Theme duration for full motion. Add a test that toggles the switch in reduced and off modes and checks the final thumb position immediately.


Optional improvements

Link

[suggestion] · Busy alerts still permit enabled action clicks

An enabled AlertPopup action can still close and trigger while busy, although no current caller producing that state was found.

Location: qml/controls/AlertPopup.qml:90 (head).

Details and suggested fix

accept() and cancel() guard busy, but the action buttons call trigger(), which checks only action.enabled before calling close() and emitting triggered(). The inherited closePolicy blocks automatic dismissal, not that explicit call. Current busy users, including WalletPassphrasePopup and WalletMigrationPopup, avoid the problem by disabling their actions themselves. Add a busy guard to trigger() so the shared control enforces the same rule for clicks as for Escape and Return, and add a test that clicks an otherwise-enabled action while busy.


Coverage details

Earlier concerns

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