qml: clarify onboarding storage options for existing datadir

bitcoin-core/gui-qml: PR #1050

1 minor finding · 1 suggestion

Findings

Link

[minor] · Low free space blocks lowering the prune target during onboarding

With low free space, the pre-existing popup cap now prevents lowering an existing pruned profile's target because Reduce storage preserves the saved target instead of offering 2 GB.

Location: qml/models/onboardingoptionsmodel.cpp:215 (head).

Details and suggested fix

After a completed storage check, free space below the assumed chainstate size plus 1 GB makes maximum zero, so the popup rejects every positive target, including lower ones. For a profile with chain data, that chainstate is already on disk. The cap predates this PR, but the Reduce storage card previously bypassed it by selecting 2 GB; it now calls keepCurrentStorage() for positive saved prune targets. Users can therefore no longer use that card to lower a larger target when space is tight. Accept targets at or below the saved target for profiles with existing chain data instead of charging for chainstate again. Users can keep their setting and change it later in runtime Storage settings, which has no free-space cap. No affected user report was found, so the frequency of this condition is unconfirmed.


Optional improvements

Link

[suggestion] · Changing the data directory silently discards network choices

Switching data directories after editing Network settings intentionally resets those choices, but the Connection page gives no notice or active-proxy summary before Start.

Location: qml/models/onboardingoptionsmodel.cpp:194 (head).

Details and suggested fix

A user can enable a proxy or Tor on the Connection step, go back to Storage location, and select another directory or switch away and back. clearTouchedSettings() lets the next preview replace those choices with the selected profile's values. The profile reset is appropriate, but the Connection page only offers a Network settings link, leaving the changed state hidden before Start. Losing a general proxy can permit direct connections when neither the selected profile nor startup arguments supply one; an onion-only proxy does not protect clearnet traffic. Show a notice on the Connection page when directory selection resets edited network settings. This preserves profile scoping and lets the user reopen Network settings to restore the intended choice.


Coverage details