qml: Stabilize onboarding settings and data directories - #883
Draft
johnny9 wants to merge 5 commits into
Draft
Conversation
Member
|
Please rebase. |
johnny9
force-pushed
the
onboarding-settings-combined
branch
from
September 1, 2026 23:42
c94ed83 to
0ac316d
Compare
Keep the datadir selected in onboarding separate from the path Core resolves after config parsing. Run pre-init preview and apply through a scratch ArgsManager seeded from the original argv so live gArgs reaches InitConfig without preloaded config or settings state. Finalize onboarding settings after InitConfig and chain-specific QSettings setup. Apply reset across Core and GUI stores transactionally, preserve strDataDir, honor final source precedence, and recover unreadable settings with the Qt reset-or-abort behavior. Only open and synchronize settings stores that are used or modified, preserving rollback without allowing unrelated stores to block startup. Add unit and functional coverage for datadir precedence, reset behavior, recovery, persistence, and rollback.
johnny9
force-pushed
the
onboarding-settings-combined
branch
from
September 5, 2026 17:30
0ac316d to
23c4492
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This combines #812 by @jarolrod with #864 and the review fixes for #812. Jarol's original commit keeps its authorship.
Pre-init onboarding was reading config and settings through the live
gArgs, then normal startup read them again. A redirected data directory could make the second read use a different profile. GUI reset also ran before Core knew the active data directory and network.This change builds the onboarding preview with a scratch
ArgsManager. It keeps the selected data directory separate from the profile resolved by Core, then applies settings afterInitConfig()and chain-specificQSettingssetup. Canceling onboarding does not change settings.Fixes
Reset now uses the final Core settings precedence, treats
-resetguisettings=0as false, preservesstrDataDir, and backs up both Core and GUI settings. If a later write fails, it restores the earlier state. For malformedsettings.jsonfiles, the backup keeps the original bytes. Settings stores are opened only when needed, and an apply is rejected if its target profile changed while onboarding was open.User-facing startup errors and translator context are included.
The Settings-page reset and
bitcoin.confactions tracked by #600 remain separate work.Tests
bitcoin-core-appbuild: passed.Fixes #773
Fixes #774
Fixes #775
Fixes #783
Fixes #846