Review report

bitcoin-core/gui-qml: PR #1050

1 minor finding · 2 suggestions

Findings

Link

[minor] · Popup switch can select the current-setting card for a changed prune target

Toggling pruning in the onboarding popup can leave the current-setting card checked even though completing onboarding saves a different prune mode or a rounded target.

Location: qml/components/StorageOptions.qml:68 (head).

Details and suggested fix

The popup switch writes pruneSetting.enabled directly, marking prune as touched and making keepingCurrentStorage false. Without a separately entered custom target, the card's fallback binding can still check it because the pending GB value equals reducedStorageTargetGB, while its title, description and badge describe the original configuration. For prune=1 with the default 2 GB value, enabling the switch checks the card labelled “Manual pruning” and “Your current setting”, but completing onboarding saves automatic pruning at 1907 MiB. For prune=4096, switching off and back on leaves the rounded 5 GB value selected and saves 4768 MiB instead. Clicking the current-setting card again restores the exact original configuration through keepCurrentStorage(), but it already appears selected. For existing positive prune settings, check this card only while keepingCurrentStorage is true, and represent other pending prune values through Custom.


Optional improvements

Link

[suggestion] · Redownload warning presents a conditional consequence as certain

The warning promises a full redownload for any existing positive prune setting, even when no blocks have been pruned and switching to full storage can retain the chain.

Location: qml/components/StorageOptions.qml:92 (head).

Details and suggested fix

The full-storage card shows “Requires downloading the full blockchain again.” whenever existingProfile && currentPruneTargetMiB > 0. Pinned Core's bitcoin/src/node/chainstate.cpp requires the pruning-related rebuild only when m_have_pruned && !options.prune. A configured automatic-pruning profile that has not removed block files, or a manual-pruning profile that has never pruned, does not meet that condition. The restart test also asserts that switching an unpruned prune=4096 profile to full storage preserves its tip. Use conditional wording such as “May require downloading the full blockchain again if older blocks have been pruned.” This preserves the warning without inspecting the block index; the runtime rebuild dialog still handles the case where rebuilding is required.


Link

[suggestion] · Header.animateColors has no remaining caller

The new animation toggle remains in the shared Header control after OptionButton stopped using Header, leaving an unused customization API.

Location: qml/controls/Header.qml:29 (head).

Details and suggested fix

OptionButton now uses direct Labels with their own Behavior on color guards. At head, animateColors appears only in Header's declaration and its three animation guards; no caller sets it. Remove the property and those guards. Its default is true, so this preserves every current caller's animation behavior while avoiding an unused API in the shared control.


Coverage details