Settings & Onboard Rework #742

Manually merged
jarolrod merged 61 commits from settings-pr into qt6 2026-07-09 06:56:28 +00:00 AGit
jarolrod commented 2026-06-02 20:04:46 +00:00 (Migrated from github.com)

This PR wires the QML settings and onboarding flows to real Core backed settings instead of placeholder UI state. It adds persistent settings models, restart-required state, proxy configuration, display unit and money font support, third-party transaction URL support, onboarding storage validation, custom datadir handling, and test coverage for the new behavior.

  • Adds model-backed onboarding settings for storage location, storage amount, connection options, and pre-init datadir handling.
  • Adds storage validation for custom datadirs, available disk space, and prune-size constraints.
  • Adds restart-required state for settings that require restart, while applying live settings such as NAT-PMP immediately.
  • Completes default and Tor proxy settings with validation, persistence, disabled-value preservation, and restart notice behavior.
  • Adds global display unit handling, Qt-compatible display-unit migration, and amount formatting across wallet views.
  • Adds display settings for money font and third-party transaction URL templates.
  • Adds -resetguisettings support and reset behavior for GUI-owned settings.
  • Adds C++, QML, and functional test coverage for the new settings/onboarding behavior.

Closes #299
Closes #596
Closes #406
Closes #373
Closes #593
Closes #431
Closes #471
Closes #511
Closes #588
Closes #598
Closes #599
Closes #587
Closes #405
Closes #419
Closes #438
Closes #704

This PR also makes progress on #594, #600 but those should stay open for remaining UX or lifecycle follow up work.

This PR wires the QML settings and onboarding flows to real Core backed settings instead of placeholder UI state. It adds persistent settings models, restart-required state, proxy configuration, display unit and money font support, third-party transaction URL support, onboarding storage validation, custom datadir handling, and test coverage for the new behavior. - Adds model-backed onboarding settings for storage location, storage amount, connection options, and pre-init datadir handling. - Adds storage validation for custom datadirs, available disk space, and prune-size constraints. - Adds restart-required state for settings that require restart, while applying live settings such as NAT-PMP immediately. - Completes default and Tor proxy settings with validation, persistence, disabled-value preservation, and restart notice behavior. - Adds global display unit handling, Qt-compatible display-unit migration, and amount formatting across wallet views. - Adds display settings for money font and third-party transaction URL templates. - Adds `-resetguisettings` support and reset behavior for GUI-owned settings. - Adds C++, QML, and functional test coverage for the new settings/onboarding behavior. Closes #299 Closes #596 Closes #406 Closes #373 Closes #593 Closes #431 Closes #471 Closes #511 Closes #588 Closes #598 Closes #599 Closes #587 Closes #405 Closes #419 Closes #438 Closes #704 This PR also makes progress on #594, #600 but those should stay open for remaining UX or lifecycle follow up work.
johnny9 (Migrated from github.com) reviewed 2026-06-08 13:37:07 +00:00
johnny9 (Migrated from github.com) commented 2026-06-08 13:34:02 +00:00

All of the new cpp modules should have unit test coverage

All of the new cpp modules should have unit test coverage
johnny9 (Migrated from github.com) commented 2026-06-08 13:32:14 +00:00

No bitcoinqt dependancies should be present

No bitcoinqt dependancies should be present
johnny9 (Migrated from github.com) reviewed 2026-06-11 04:06:40 +00:00
johnny9 (Migrated from github.com) left a comment

[ 90%] Building CXX object CMakeFiles/bitcoinqml.dir/bitcoin/src/init/bitcoin-qt.cpp.o
In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:18,
from /usr/include/x86_64-linux-gnu/qt6/QtCore/QObject:1,
from /home/johnny/github/gui-qml/qml/appmode.h:8,
from /home/johnny/github/gui-qml/qml/bitcoin.cpp:19:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h: In instantiation of ‘struct QtPrivate::IsPointerToTypeDerivedFromQObject<QQuickCloseEvent*>’:
/usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:1102:60: required from ‘struct QMetaTypeId<QQuickCloseEvent*>’
/usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:1122:38: required from ‘struct QMetaTypeId2<QQuickCloseEvent*>’
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobject_impl.h:32:41: required from ‘struct QtPrivate::TypesAreDeclaredMetaType<QtPrivate::List<QQuickCloseEvent*> >’
/usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:306:86: required from ‘static typename std::enable_if<((QtPrivate::FunctionPointer::ArgumentCount == -1) && (! is_convertible_v<Func2, const char*>)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (QQuickWindow::)(QQuickCloseEvent); Func2 = {anonymous}::RunPreInitOnboarding(PreInitOnboardingContext&, const std::vector<std::__cxx11::basic_string >&, bool)::<lambda()>; typename std::enable_if<((QtPrivate::FunctionPointer::ArgumentCount == -1) && (! is_convertible_v<Func2, const char*>)), QMetaObject::Connection>::type = QMetaObject::Connection; typename QtPrivate::FunctionPointer::Object = QQuickWindow]’
/home/johnny/github/gui-qml/qml/bitcoin.cpp:389:21: required from here
/usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:842:23: error: invalid application of ‘sizeof’ to incomplete type ‘QQuickCloseEvent’
842 | static_assert(sizeof(T), "Type argument of Q_PROPERTY or Q_DECLARE_METATYPE(T*) must be fully defined");
| ^~~~~~~~~
gmake[2]: *** [CMakeFiles/bitcoinqml.dir/build.make:319: CMakeFiles/bitcoinqml.dir/qml/bitcoin.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....

build failure on ubuntu 24 LTS

[ 90%] Building CXX object CMakeFiles/bitcoinqml.dir/bitcoin/src/init/bitcoin-qt.cpp.o In file included from /usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:18, from /usr/include/x86_64-linux-gnu/qt6/QtCore/QObject:1, from /home/johnny/github/gui-qml/qml/appmode.h:8, from /home/johnny/github/gui-qml/qml/bitcoin.cpp:19: /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h: In instantiation of ‘struct QtPrivate::IsPointerToTypeDerivedFromQObject<QQuickCloseEvent*>’: /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:1102:60: required from ‘struct QMetaTypeId<QQuickCloseEvent*>’ /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:1122:38: required from ‘struct QMetaTypeId2<QQuickCloseEvent*>’ /usr/include/x86_64-linux-gnu/qt6/QtCore/qobject_impl.h:32:41: required from ‘struct QtPrivate::TypesAreDeclaredMetaType<QtPrivate::List<QQuickCloseEvent*> >’ /usr/include/x86_64-linux-gnu/qt6/QtCore/qobject.h:306:86: required from ‘static typename std::enable_if<((QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1) && (! is_convertible_v<Func2, const char*>)), QMetaObject::Connection>::type QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const QObject*, Func2, Qt::ConnectionType) [with Func1 = void (QQuickWindow::*)(QQuickCloseEvent*); Func2 = {anonymous}::RunPreInitOnboarding(PreInitOnboardingContext&, const std::vector<std::__cxx11::basic_string<char> >&, bool)::<lambda()>; typename std::enable_if<((QtPrivate::FunctionPointer<Func2>::ArgumentCount == -1) && (! is_convertible_v<Func2, const char*>)), QMetaObject::Connection>::type = QMetaObject::Connection; typename QtPrivate::FunctionPointer<Func>::Object = QQuickWindow]’ /home/johnny/github/gui-qml/qml/bitcoin.cpp:389:21: required from here /usr/include/x86_64-linux-gnu/qt6/QtCore/qmetatype.h:842:23: error: invalid application of ‘sizeof’ to incomplete type ‘QQuickCloseEvent’ 842 | static_assert(sizeof(T), "Type argument of Q_PROPERTY or Q_DECLARE_METATYPE(T*) must be fully defined"); | ^~~~~~~~~ gmake[2]: *** [CMakeFiles/bitcoinqml.dir/build.make:319: CMakeFiles/bitcoinqml.dir/qml/bitcoin.cpp.o] Error 1 gmake[2]: *** Waiting for unfinished jobs.... build failure on ubuntu 24 LTS
johnny9 (Migrated from github.com) reviewed 2026-06-12 16:17:18 +00:00
johnny9 (Migrated from github.com) left a comment

Left comments

Left comments
johnny9 (Migrated from github.com) commented 2026-06-12 03:43:44 +00:00

This typed QQuickWindow::closing connection does not build on Qt 6.4 because the signal argument type, QQuickCloseEvent, is only forward-declared by the public QQuickWindow header there. Since this handler only quits the local event loop and does not inspect the close event, please use the string-based signal/slot form:

QObject::connect(context.window, SIGNAL(closing(QQuickCloseEvent*)), &loop, SLOT(quit()));

That keeps this compatible with the repo’s Qt 6.2+ range.

This typed `QQuickWindow::closing` connection does not build on Qt 6.4 because the signal argument type, `QQuickCloseEvent`, is only forward-declared by the public `QQuickWindow` header there. Since this handler only quits the local event loop and does not inspect the close event, please use the string-based signal/slot form: QObject::connect(context.window, SIGNAL(closing(QQuickCloseEvent*)), &loop, SLOT(quit())); That keeps this compatible with the repo’s Qt 6.2+ range.
johnny9 (Migrated from github.com) commented 2026-06-12 16:16:20 +00:00

This only checks whether the saved custom datadir still exists and is a directory. If the directory still exists but becomes unwritable, startup skips the chooser and still applies it as -datadir; ApplyGuiDataDirSetting() also ignores EnsureDataDir() failure below.

Please revalidate the saved custom datadir before deciding to skip the chooser, and stop applying it if it can no longer be ensured:

diff --git a/qml/datadir.cpp b/qml/datadir.cpp
--- a/qml/datadir.cpp
+++ b/qml/datadir.cpp
@@ -263,9 +263,11 @@ bool ShouldShowDataDirChooser(const ArgsManager& args)
 
     QSettings settings;
     const QString data_dir = ReadGuiDataDir();
+    const QString validation_error = IsDefaultDataDir(data_dir) ? QString{} : ValidateCustomDataDir(data_dir);
     const QFileInfo data_dir_info(data_dir);
-    return !data_dir_info.exists() ||
+    return !validation_error.isEmpty() ||
+           !data_dir_info.exists() ||
            !data_dir_info.isDir() ||
            args.GetBoolArg("-choosedatadir", false) ||
            args.GetBoolArg("-resetguisettings", false) ||
@@ -290,8 +292,7 @@ bool ApplyGuiDataDirSetting(ArgsManager& args)
     const QString data_dir = ReadGuiDataDir();
     if (IsDefaultDataDir(data_dir)) return false;
 
-    QString ignored_error;
-    EnsureDataDir(data_dir, &ignored_error);
+    if (!EnsureDataDir(data_dir)) return false;
     return ApplyDataDirArg(args, data_dir);
 }
This only checks whether the saved custom datadir still exists and is a directory. If the directory still exists but becomes unwritable, startup skips the chooser and still applies it as `-datadir`; `ApplyGuiDataDirSetting()` also ignores `EnsureDataDir()` failure below. Please revalidate the saved custom datadir before deciding to skip the chooser, and stop applying it if it can no longer be ensured: ```diff diff --git a/qml/datadir.cpp b/qml/datadir.cpp --- a/qml/datadir.cpp +++ b/qml/datadir.cpp @@ -263,9 +263,11 @@ bool ShouldShowDataDirChooser(const ArgsManager& args) QSettings settings; const QString data_dir = ReadGuiDataDir(); + const QString validation_error = IsDefaultDataDir(data_dir) ? QString{} : ValidateCustomDataDir(data_dir); const QFileInfo data_dir_info(data_dir); - return !data_dir_info.exists() || + return !validation_error.isEmpty() || + !data_dir_info.exists() || !data_dir_info.isDir() || args.GetBoolArg("-choosedatadir", false) || args.GetBoolArg("-resetguisettings", false) || @@ -290,8 +292,7 @@ bool ApplyGuiDataDirSetting(ArgsManager& args) const QString data_dir = ReadGuiDataDir(); if (IsDefaultDataDir(data_dir)) return false; - QString ignored_error; - EnsureDataDir(data_dir, &ignored_error); + if (!EnsureDataDir(data_dir)) return false; return ApplyDataDirArg(args, data_dir); } ```
johnny9 (Migrated from github.com) commented 2026-06-12 16:16:31 +00:00

This live-applies NAT-PMP even though the settings UI/test framing treats connection changes as restart-required. It also means toggling NAT-PMP does not participate in connectionSettingsDirty(), so the restart notice can disappear even though the saved startup setting changed.

If NAT-PMP is meant to match the other connection startup settings here, please make it dirty/restart-required and remove the live map-port call:

diff --git a/qml/models/options_model.cpp b/qml/models/options_model.cpp
--- a/qml/models/options_model.cpp
+++ b/qml/models/options_model.cpp
@@ -157,7 +157,9 @@ bool OptionsQmlModel::connectionSettingsDirty() const
 {
     const QmlCoreSettings::Values& values = m_core_settings.values();
-    return values.listen != m_initial_core_values.listen || values.server != m_initial_core_values.server;
+    return values.listen != m_initial_core_values.listen ||
+           values.natpmp != m_initial_core_values.natpmp ||
+           values.server != m_initial_core_values.server;
 }
@@ -234,14 +236,6 @@ void OptionsQmlModel::applyRuntimeCoreChange(const QmlCoreSettings::Change& chan
     m_core_settings.writeToNode(m_node, m_args, change.setting_name);
     refreshCoreSettingStatuses();
     QmlCoreSettings::EmitCoreSettingSignals(*this, change);
-    if (change.setting_name == QStringLiteral("natpmp")) {
-        // Disabling NAT-PMP joins the mapport thread and can briefly block.
-        // Defer the live apply so the switch state and animation are not
-        // held behind that work.
-        QTimer::singleShot(200, this, [this, natpmp = change.after.natpmp] {
-            m_node.mapPort(natpmp);
-        });
-    }
     emitDirtySignals(before);
 }

If live NAT-PMP is intentional, then the issue/test naming should be adjusted to say NAT-PMP is deliberately live-applied rather than restart-required.

This live-applies NAT-PMP even though the settings UI/test framing treats connection changes as restart-required. It also means toggling NAT-PMP does not participate in `connectionSettingsDirty()`, so the restart notice can disappear even though the saved startup setting changed. If NAT-PMP is meant to match the other connection startup settings here, please make it dirty/restart-required and remove the live map-port call: ```diff diff --git a/qml/models/options_model.cpp b/qml/models/options_model.cpp --- a/qml/models/options_model.cpp +++ b/qml/models/options_model.cpp @@ -157,7 +157,9 @@ bool OptionsQmlModel::connectionSettingsDirty() const { const QmlCoreSettings::Values& values = m_core_settings.values(); - return values.listen != m_initial_core_values.listen || values.server != m_initial_core_values.server; + return values.listen != m_initial_core_values.listen || + values.natpmp != m_initial_core_values.natpmp || + values.server != m_initial_core_values.server; } @@ -234,14 +236,6 @@ void OptionsQmlModel::applyRuntimeCoreChange(const QmlCoreSettings::Change& chan m_core_settings.writeToNode(m_node, m_args, change.setting_name); refreshCoreSettingStatuses(); QmlCoreSettings::EmitCoreSettingSignals(*this, change); - if (change.setting_name == QStringLiteral("natpmp")) { - // Disabling NAT-PMP joins the mapport thread and can briefly block. - // Defer the live apply so the switch state and animation are not - // held behind that work. - QTimer::singleShot(200, this, [this, natpmp = change.after.natpmp] { - m_node.mapPort(natpmp); - }); - } emitDirtySignals(before); } ``` If live NAT-PMP is intentional, then the issue/test naming should be adjusted to say NAT-PMP is deliberately live-applied rather than restart-required.
johnny9 (Migrated from github.com) commented 2026-06-12 16:16:37 +00:00

The UI says %s is the placeholder for the transaction hash, but entries without %s still produce a link. Those links can never point at the selected transaction. Please skip malformed entries here so only URLs that actually include the txid are exposed.

        url = url.trimmed();
        if (!url.contains(QStringLiteral("%s"))) continue;
        const QUrl parsed{url, QUrl::StrictMode};
The UI says `%s` is the placeholder for the transaction hash, but entries without `%s` still produce a link. Those links can never point at the selected transaction. Please skip malformed entries here so only URLs that actually include the txid are exposed. ```suggestion url = url.trimmed(); if (!url.contains(QStringLiteral("%s"))) continue; const QUrl parsed{url, QUrl::StrictMode}; ```
johnny9 (Migrated from github.com) commented 2026-06-12 16:16:09 +00:00

This new post-onboarding wallet route opens the existing add-wallet intro in CreateWalletWizard.Context.Onboarding, but that page still shows the Back button. In this context Back sends the user back out of the create-wallet flow after pre-init onboarding has already committed startup settings and handed off to the main app.

diff --git a/qml/pages/wallet/CreateWalletWizard.qml b/qml/pages/wallet/CreateWalletWizard.qml
--- a/qml/pages/wallet/CreateWalletWizard.qml
+++ b/qml/pages/wallet/CreateWalletWizard.qml
@@ -87,13 +87,13 @@ PageStack {
 
             header: NavigationBar2 {
                 id: navbar
-                leftItem: NavButton {
+                leftItem: root.launchContext === CreateWalletWizard.Context.Onboarding ? null : NavButton {
                     objectName: "createWalletWizardBackButton"
                     iconSource: "image://images/caret-left"
                     text: qsTr("Back")
                     onClicked: root.finished()
                 }
                 rightItem: NavButton {
This new post-onboarding wallet route opens the existing add-wallet intro in `CreateWalletWizard.Context.Onboarding`, but that page still shows the Back button. In this context Back sends the user back out of the create-wallet flow after pre-init onboarding has already committed startup settings and handed off to the main app. ```diff diff --git a/qml/pages/wallet/CreateWalletWizard.qml b/qml/pages/wallet/CreateWalletWizard.qml --- a/qml/pages/wallet/CreateWalletWizard.qml +++ b/qml/pages/wallet/CreateWalletWizard.qml @@ -87,13 +87,13 @@ PageStack { header: NavigationBar2 { id: navbar - leftItem: NavButton { + leftItem: root.launchContext === CreateWalletWizard.Context.Onboarding ? null : NavButton { objectName: "createWalletWizardBackButton" iconSource: "image://images/caret-left" text: qsTr("Back") onClicked: root.finished() } rightItem: NavButton { ```
johnny9 (Migrated from github.com) commented 2026-06-12 03:36:37 +00:00

This change isn't compatible with Ubuntu 24.04 provided Qt 6.4.2. Lets move this change into a new PR that we merge in later once Ubuntu 26.04.1 LTS is released in August.

This change isn't compatible with Ubuntu 24.04 provided Qt 6.4.2. Lets move this change into a new PR that we merge in later once Ubuntu 26.04.1 LTS is released in August.
johnny9 (Migrated from github.com) commented 2026-06-12 16:17:11 +00:00

Selecting the custom storage option logs a QML deprecation warning because this handler relies on implicit signal-parameter injection:

Parameter "customStorage" is not declared. Injection of parameters into signal handlers is deprecated.

Please use a JavaScript function with formal parameters instead.

                        onStorageSelectionChanged: function(customStorage, customStorageAmount) {
                            root.customStorage = customStorage
                            root.customStorageAmount = customStorageAmount
                        }
Selecting the custom storage option logs a QML deprecation warning because this handler relies on implicit signal-parameter injection: ```text Parameter "customStorage" is not declared. Injection of parameters into signal handlers is deprecated. ``` Please use a JavaScript function with formal parameters instead. ```suggestion onStorageSelectionChanged: function(customStorage, customStorageAmount) { root.customStorage = customStorage root.customStorageAmount = customStorageAmount } ```
johnny9 (Migrated from github.com) commented 2026-06-12 16:16:45 +00:00

This overview balance still uses the default font, so the new money font setting is only applied in some wallet surfaces. Please apply optionsModel.moneyFont here as well.

                    text: root.balance + " " + optionsModel.displayUnitLabelForAmount(root.balanceSatoshi)
                    color: Theme.color.neutral7
                    font.family: optionsModel.moneyFont.family
                    font.weight: optionsModel.moneyFont.weight
                    font.pixelSize: 15
                    bold: true
This overview balance still uses the default font, so the new money font setting is only applied in some wallet surfaces. Please apply `optionsModel.moneyFont` here as well. ```suggestion text: root.balance + " " + optionsModel.displayUnitLabelForAmount(root.balanceSatoshi) color: Theme.color.neutral7 font.family: optionsModel.moneyFont.family font.weight: optionsModel.moneyFont.weight font.pixelSize: 15 bold: true ```
johnny9 (Migrated from github.com) commented 2026-06-12 16:15:46 +00:00

This assertion is good coverage, but under Qt 6.4 the current test bridge click fallback can make the switch look checked without exercising the same QML handler path as a real user click. I hit this locally as proxyEnableSwitch.checked == true while settingsProxy.proxySettingsDirty stayed false.

The bridge helper itself is not in this diff hunk, so anchoring this here. I think the fix is to prefer a real mouse press/release before falling back to raw toggle() / clicked() invocation:

diff --git a/qml/test/testbridge.cpp b/qml/test/testbridge.cpp
--- a/qml/test/testbridge.cpp
+++ b/qml/test/testbridge.cpp
@@ -55,6 +55,27 @@ QByteArray clickObject(QObject* obj)
     if (int idx = meta->indexOfMethod("trigger()"); idx >= 0) {
         if (meta->method(idx).invoke(obj, Qt::DirectConnection)) return okResponse();
     }
+
+    // Qt < 6.8 does not expose QQuickAbstractButton::click(). Prefer a real
+    // mouse press/release before falling back to raw signal emission so QML
+    // handlers such as Switch::onToggled run exactly as they do for users.
+    if (auto* item = qobject_cast<QQuickItem*>(obj)) {
+        QQuickWindow* window = item->window();
+        if (window && item->isVisible() && item->isEnabled() && item->width() > 0 && item->height() > 0) {
+            const QPointF center = item->mapToScene(
+                QPointF(item->width() / 2.0, item->height() / 2.0));
+            const QPoint pos = center.toPoint();
+
+            QMouseEvent press(QEvent::MouseButtonPress, pos, window->mapToGlobal(pos),
+                              Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
+            QMouseEvent release(QEvent::MouseButtonRelease, pos, window->mapToGlobal(pos),
+                                Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
+
+            QCoreApplication::sendEvent(window, &press);
+            QCoreApplication::sendEvent(window, &release);
+            return okResponse();
+        }
+    }
 
     // Fallback for Qt < 6.8 (no QQuickAbstractButton::click()): invoke both
     // toggle() (if checkable) and the clicked() signal. We can't tell which
@@ -72,25 +93,6 @@ QByteArray clickObject(QObject* obj)
     }
     if (invoked_any) return okResponse();
 
-    // Last resort for items without click()/trigger()/toggle()/clicked()
-    // (bare Item + MouseArea, etc.): synthesize a real mouse press + release
-    // at the item's center.
-    if (auto* item = qobject_cast<QQuickItem*>(obj)) {
-        QQuickWindow* window = item->window();
-        if (window && item->isVisible() && item->width() > 0 && item->height() > 0) {
-            const QPointF center = item->mapToScene(
-                QPointF(item->width() / 2.0, item->height() / 2.0));
-            const QPoint pos = center.toPoint();
-
-            QMouseEvent press(QEvent::MouseButtonPress, pos, window->mapToGlobal(pos),
-                              Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
-            QMouseEvent release(QEvent::MouseButtonRelease, pos, window->mapToGlobal(pos),
-                                Qt::LeftButton, Qt::NoButton, Qt::NoModifier);
-
-            QCoreApplication::sendEvent(window, &press);
-            QCoreApplication::sendEvent(window, &release);
-            return okResponse();
-        }
-    }
-
     QJsonObject resp;
This assertion is good coverage, but under Qt 6.4 the current test bridge click fallback can make the switch look checked without exercising the same QML handler path as a real user click. I hit this locally as `proxyEnableSwitch.checked == true` while `settingsProxy.proxySettingsDirty` stayed false. The bridge helper itself is not in this diff hunk, so anchoring this here. I think the fix is to prefer a real mouse press/release before falling back to raw `toggle()` / `clicked()` invocation: ```diff diff --git a/qml/test/testbridge.cpp b/qml/test/testbridge.cpp --- a/qml/test/testbridge.cpp +++ b/qml/test/testbridge.cpp @@ -55,6 +55,27 @@ QByteArray clickObject(QObject* obj) if (int idx = meta->indexOfMethod("trigger()"); idx >= 0) { if (meta->method(idx).invoke(obj, Qt::DirectConnection)) return okResponse(); } + + // Qt < 6.8 does not expose QQuickAbstractButton::click(). Prefer a real + // mouse press/release before falling back to raw signal emission so QML + // handlers such as Switch::onToggled run exactly as they do for users. + if (auto* item = qobject_cast<QQuickItem*>(obj)) { + QQuickWindow* window = item->window(); + if (window && item->isVisible() && item->isEnabled() && item->width() > 0 && item->height() > 0) { + const QPointF center = item->mapToScene( + QPointF(item->width() / 2.0, item->height() / 2.0)); + const QPoint pos = center.toPoint(); + + QMouseEvent press(QEvent::MouseButtonPress, pos, window->mapToGlobal(pos), + Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); + QMouseEvent release(QEvent::MouseButtonRelease, pos, window->mapToGlobal(pos), + Qt::LeftButton, Qt::NoButton, Qt::NoModifier); + + QCoreApplication::sendEvent(window, &press); + QCoreApplication::sendEvent(window, &release); + return okResponse(); + } + } // Fallback for Qt < 6.8 (no QQuickAbstractButton::click()): invoke both // toggle() (if checkable) and the clicked() signal. We can't tell which @@ -72,25 +93,6 @@ QByteArray clickObject(QObject* obj) } if (invoked_any) return okResponse(); - // Last resort for items without click()/trigger()/toggle()/clicked() - // (bare Item + MouseArea, etc.): synthesize a real mouse press + release - // at the item's center. - if (auto* item = qobject_cast<QQuickItem*>(obj)) { - QQuickWindow* window = item->window(); - if (window && item->isVisible() && item->width() > 0 && item->height() > 0) { - const QPointF center = item->mapToScene( - QPointF(item->width() / 2.0, item->height() / 2.0)); - const QPoint pos = center.toPoint(); - - QMouseEvent press(QEvent::MouseButtonPress, pos, window->mapToGlobal(pos), - Qt::LeftButton, Qt::LeftButton, Qt::NoModifier); - QMouseEvent release(QEvent::MouseButtonRelease, pos, window->mapToGlobal(pos), - Qt::LeftButton, Qt::NoButton, Qt::NoModifier); - - QCoreApplication::sendEvent(window, &press); - QCoreApplication::sendEvent(window, &release); - return okResponse(); - } - } - QJsonObject resp; ```
pseudoramdom (Migrated from github.com) reviewed 2026-06-16 23:06:02 +00:00
pseudoramdom (Migrated from github.com) left a comment

Partial review till 0ec1b80f8156b1c029402241d269aad10384e3d6 qml: persist custom data directory selection

Partial review till 0ec1b80f8156b1c029402241d269aad10384e3d6 `qml: persist custom data directory selection`
pseudoramdom (Migrated from github.com) commented 2026-06-16 23:04:54 +00:00

Should this be inside the try?
If the saved path is unwritable, invalid, or no longer usable, startup proceeds with a bad -datadir

Should this be inside the `try`? If the saved path is unwritable, invalid, or no longer usable, startup proceeds with a bad `-datadir`
pseudoramdom (Migrated from github.com) commented 2026-06-16 22:54:42 +00:00

016c79e75aa52e77f055945af4bfa4629e4de8c9
Can we repurpose IPAddressValueInput.qml?

016c79e75aa52e77f055945af4bfa4629e4de8c9 Can we repurpose `IPAddressValueInput.qml`?
pseudoramdom (Migrated from github.com) commented 2026-06-16 23:02:09 +00:00

Should this use FolderDialog instead?

Should this use `FolderDialog` instead?
pseudoramdom (Migrated from github.com) commented 2026-06-16 22:19:23 +00:00

35795a12129fe71427c2a9b565846b94abe60192
We should probably use InfoBanner here and not create one-off views for this.

35795a12129fe71427c2a9b565846b94abe60192 We should probably use `InfoBanner` here and not create one-off views for this.
pseudoramdom (Migrated from github.com) commented 2026-06-16 22:29:03 +00:00

There's no struct DirtySnapshot in 32afebfcd04a45a2968b7913c0e948dc11e07365. This commit won't compile I guess.
You might want to pull that from e92097a6ef0df5c8fa2e85b0344bc23c74657435?

There's no `struct DirtySnapshot` in 32afebfcd04a45a2968b7913c0e948dc11e07365. This commit won't compile I guess. You might want to pull that from e92097a6ef0df5c8fa2e85b0344bc23c74657435?
pseudoramdom (Migrated from github.com) commented 2026-06-16 22:41:19 +00:00

32afebfcd04a45a2968b7913c0e948dc11e07365
Should we check this before we update the m_proxy_address

32afebfcd04a45a2968b7913c0e948dc11e07365 Should we check this before we update the `m_proxy_address`
pseudoramdom (Migrated from github.com) commented 2026-06-16 22:59:18 +00:00

0ec1b80f8156b1c029402241d269aad10384e3d6
We deliberately persist the location even thought the user might not have completed the onboarding, yeah?

0ec1b80f8156b1c029402241d269aad10384e3d6 We deliberately persist the location even thought the user might not have completed the onboarding, yeah?
pseudoramdom (Migrated from github.com) commented 2026-06-16 22:45:53 +00:00

Would this be better?
void emitDirtySignals(const DirtySnapshot& before)

Would this be better? `void emitDirtySignals(const DirtySnapshot& before)`
epicleafies (Migrated from github.com) reviewed 2026-06-26 20:10:12 +00:00
epicleafies (Migrated from github.com) left a comment

Concept ACK. I wasn't able to build or test as the branch does not compile on Qt 6.4.2. Will re-review once it is buildable.

Two things stand out for the 6.4 baseline: the import QtCore swap is repo-wide, not just NetworkTraffic.qml (reply on that thread), and a new Repeater-in-ColumnLayout in ActivityDetails repeats the Quick Layouts crash class. The rest is one i18n suggestion, a nit, and replies extending existing threads. I traced the onboarding startup path: the InitConfig / parameter-interaction double-pass is idempotent by construction, so that is not a concern.

Concept ACK. I wasn't able to build or test as the branch does not compile on Qt 6.4.2. Will re-review once it is buildable. Two things stand out for the 6.4 baseline: the import QtCore swap is repo-wide, not just NetworkTraffic.qml (reply on that thread), and a new Repeater-in-ColumnLayout in ActivityDetails repeats the Quick Layouts crash class. The rest is one i18n suggestion, a nit, and replies extending existing threads. I traced the onboarding startup path: the InitConfig / parameter-interaction double-pass is idempotent by construction, so that is not a concern.
epicleafies (Migrated from github.com) commented 2026-06-26 19:03:54 +00:00

Suggestion: qsTr("Uses about %1GB. For simple wallet use.").arg(...) + root.storageSuffix() concatenates two separately-translated strings (storageSuffix() is qsTr(" %1GB available.")). Word order varies between languages, so the glued sentence mistranslates. Merge them into one qsTr with a second placeholder for the available-GB value. Same at line 77.

**Suggestion:** `qsTr("Uses about %1GB. For simple wallet use.").arg(...) + root.storageSuffix()` concatenates two separately-translated strings (`storageSuffix()` is `qsTr(" %1GB available.")`). Word order varies between languages, so the glued sentence mistranslates. Merge them into one `qsTr` with a second placeholder for the available-GB value. Same at line 77.
epicleafies (Migrated from github.com) commented 2026-06-26 19:03:54 +00:00

Nit: m_storage_capacity_bytes is assigned in applyStorageCheckResult (onboardingoptionsmodel.cpp:256) but never read. Either it is dead and the member plus assignment can go, or it is meant to drive UI and is unwired.

**Nit:** `m_storage_capacity_bytes` is assigned in `applyStorageCheckResult` (`onboardingoptionsmodel.cpp:256`) but never read. Either it is dead and the member plus assignment can go, or it is meant to drive UI and is unwired.
epicleafies (Migrated from github.com) commented 2026-06-26 19:03:54 +00:00

Blocker: A Repeater as a direct child of a ColumnLayout whose model populates after construction (root.txid arrives via the StackView push) hits the Qt 6.4 Quick Layouts use-after-free: QQuickLayout::effectiveSizePolicy_helper runs on a freed delegate. It SIGSEGVs only under a real windowing backend, so the offscreen suite stays green. PR #746 fixes the same crash class (originally #750) in AlertPopup.qml: the action buttons live in a Row positioner inside the layout, with the delegate using width instead of Layout.fillWidth. The same wrap applies here.

**Blocker:** A `Repeater` as a direct child of a `ColumnLayout` whose model populates after construction (`root.txid` arrives via the StackView push) hits the Qt 6.4 Quick Layouts use-after-free: `QQuickLayout::effectiveSizePolicy_helper` runs on a freed delegate. It SIGSEGVs only under a real windowing backend, so the offscreen suite stays green. PR #746 fixes the same crash class (originally #750) in `AlertPopup.qml`: the action buttons live in a `Row` positioner inside the layout, with the delegate using `width` instead of `Layout.fillWidth`. The same wrap applies here.
epicleafies (Migrated from github.com) commented 2026-06-26 19:03:54 +00:00

Blocker: This test and qml_test_resetguisettings.py are absent from .github/workflows/gui-functional-tests.yml, so the pre-init onboarding and reset-GUI-settings flows run in no CI job. Add both to the functional-test step. They refuse an external --socket-path and self-launch, so they go in without the shared-socket args.

**Blocker:** This test and `qml_test_resetguisettings.py` are absent from `.github/workflows/gui-functional-tests.yml`, so the pre-init onboarding and reset-GUI-settings flows run in no CI job. Add both to the functional-test step. They refuse an external `--socket-path` and self-launch, so they go in without the shared-socket args.
epicleafies (Migrated from github.com) reviewed 2026-06-26 20:10:14 +00:00
epicleafies (Migrated from github.com) commented 2026-06-26 20:10:14 +00:00

The same Qt.labs.settings 1.0 to import QtCore swap is in 11 other files, so this is repo-wide: controls/Theme.qml, pages/main.qml, components/BlockClock.qml, components/BlockClockDisplayMode.qml, components/ExternalPopup.qml, components/ThemeSettings.qml, pages/node/Peers.qml, pages/wallet/Activity.qml, pages/wallet/Send.qml, pages/wallet/RequestPayment.qml, pages/wallet/ActivityDetails.qml. The QtCore QML module is 6.5+ (absent on a 6.4.2 install), and QML resolves imports at load, so each of these (including the main window) fails to load on 6.4. BlockClockDisplayMode.qml and ExternalPopup.qml no longer use Settings at all, so there the import can be dropped rather than reverted.

The same `Qt.labs.settings 1.0` to `import QtCore` swap is in 11 other files, so this is repo-wide: `controls/Theme.qml`, `pages/main.qml`, `components/BlockClock.qml`, `components/BlockClockDisplayMode.qml`, `components/ExternalPopup.qml`, `components/ThemeSettings.qml`, `pages/node/Peers.qml`, `pages/wallet/Activity.qml`, `pages/wallet/Send.qml`, `pages/wallet/RequestPayment.qml`, `pages/wallet/ActivityDetails.qml`. The `QtCore` QML module is 6.5+ (absent on a 6.4.2 install), and QML resolves imports at load, so each of these (including the main window) fails to load on 6.4. `BlockClockDisplayMode.qml` and `ExternalPopup.qml` no longer use `Settings` at all, so there the import can be dropped rather than reverted.
epicleafies (Migrated from github.com) reviewed 2026-06-26 20:10:15 +00:00
epicleafies (Migrated from github.com) commented 2026-06-26 20:10:15 +00:00

On which modules specifically: onboarding_storage.cpp (Evaluate / ShouldRecommendPrune) has no direct C++ test, and the QML test only exercises the mock's reimplementation of that math, so a bug in the real Evaluate() would slip through. legacy_settings_migration.cpp is the branchiest new file (per-chain AppNameForChain, the legacy proxy %2-suffix parsing), and those paths look unexercised. A table-driven test that runs MigrateCoreSettings(Persist) twice and asserts each key maps correctly, the second run is a no-op, pre-existing settings are not overwritten, defaults are dropped, and a disabled-then-re-enabled proxy round-trips would cover the highest-risk behavior.

On which modules specifically: `onboarding_storage.cpp` (`Evaluate` / `ShouldRecommendPrune`) has no direct C++ test, and the QML test only exercises the mock's reimplementation of that math, so a bug in the real `Evaluate()` would slip through. `legacy_settings_migration.cpp` is the branchiest new file (per-chain `AppNameForChain`, the legacy proxy `%2`-suffix parsing), and those paths look unexercised. A table-driven test that runs `MigrateCoreSettings(Persist)` twice and asserts each key maps correctly, the second run is a no-op, pre-existing settings are not overwritten, defaults are dropped, and a disabled-then-re-enabled proxy round-trips would cover the highest-risk behavior.
epicleafies (Migrated from github.com) reviewed 2026-06-26 20:10:16 +00:00
epicleafies (Migrated from github.com) commented 2026-06-26 20:10:16 +00:00

Same validation path, one more gap: NormalizeLocalPath does not absolutize (it returns the input unchanged when it is not a file: URL), so a relative saved datadir would be applied as -datadir and resolved against the process CWD. Returning QDir(local).absolutePath() from NormalizeLocalPath closes it (checking against the __ANDROID__ content:// handling first).

Same validation path, one more gap: `NormalizeLocalPath` does not absolutize (it returns the input unchanged when it is not a `file:` URL), so a relative saved datadir would be applied as `-datadir` and resolved against the process CWD. Returning `QDir(local).absolutePath()` from `NormalizeLocalPath` closes it (checking against the `__ANDROID__` `content://` handling first).
epicleafies (Migrated from github.com) reviewed 2026-06-26 20:10:17 +00:00
epicleafies (Migrated from github.com) commented 2026-06-26 20:10:17 +00:00

Same handler-bypass hazard elsewhere in the bridge: cmdInvoke in testbridge.cpp resolves any method or signal by name and emits it with DirectConnection, so a test can fire clicked() directly and pass without the QML handler running. A header note that invoke of a signal bypasses handlers would steer tests away from it.

Same handler-bypass hazard elsewhere in the bridge: `cmdInvoke` in `testbridge.cpp` resolves any method or signal by name and emits it with `DirectConnection`, so a test can fire `clicked()` directly and pass without the QML handler running. A header note that `invoke` of a signal bypasses handlers would steer tests away from it.
epicleafies (Migrated from github.com) reviewed 2026-06-26 20:10:18 +00:00
epicleafies (Migrated from github.com) commented 2026-06-26 20:10:18 +00:00

Security note on the same loop: thirdPartyTransactionLinks only checks host.isEmpty(), not the scheme, so a configured file://host/... URL reaches Qt.openUrlExternally (through the ExternalPopup confirm). Allowlisting http/https here keeps non-web schemes out at the source. The exploitation path is weak (the URL is user-configured and the popup shows it first), so this is hardening, not a blocker; Core opens these with no scheme check or confirmation at all, so it would improve on Core. Separately, the URL is shown in ExternalPopup via a CoreText defaulting to Text.AutoText, so a URL containing markup renders as rich text on the popup; Text.PlainText on that display removes that.

Security note on the same loop: `thirdPartyTransactionLinks` only checks `host.isEmpty()`, not the scheme, so a configured `file://host/...` URL reaches `Qt.openUrlExternally` (through the ExternalPopup confirm). Allowlisting `http`/`https` here keeps non-web schemes out at the source. The exploitation path is weak (the URL is user-configured and the popup shows it first), so this is hardening, not a blocker; Core opens these with no scheme check or confirmation at all, so it would improve on Core. Separately, the URL is shown in `ExternalPopup` via a `CoreText` defaulting to `Text.AutoText`, so a URL containing markup renders as rich text on the popup; `Text.PlainText` on that display removes that.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:32:32 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:32:32 +00:00

its fine for now

its fine for now
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:33:41 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:33:41 +00:00

fine for now

fine for now
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:35:38 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:35:38 +00:00

The current bitcoinqml_unit_tests link list contains
bitcoinqml, wallet/core libraries, GMock, and Qt test libraries, but no
bitcoinqt. The QML options-model compatibility test no longer includes
<qt/bitcoinunits.h> and instead uses a small local legacy display-unit
enum to verify the same DisplayBitcoinUnit integer mapping. This keeps the
test coverage without introducing a dependency on the legacy Qt Widgets GUI.

The current bitcoinqml_unit_tests link list contains bitcoinqml, wallet/core libraries, GMock, and Qt test libraries, but no bitcoinqt. The QML options-model compatibility test no longer includes <qt/bitcoinunits.h> and instead uses a small local legacy display-unit enum to verify the same DisplayBitcoinUnit integer mapping. This keeps the test coverage without introducing a dependency on the legacy Qt Widgets GUI.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:35:59 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:35:59 +00:00

should be all addressed in the current stack

should be all addressed in the current stack
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:36:28 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:36:28 +00:00

addressed. The branch no longer uses QML import QtCore for
Settings. The affected QML files were moved back to
import Qt.labs.settings 1.0, which is the Qt 6.4-compatible import path

addressed. The branch no longer uses QML import QtCore for Settings. The affected QML files were moved back to import Qt.labs.settings 1.0, which is the Qt 6.4-compatible import path
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:36:57 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:36:57 +00:00

addressed. The typed connection was replaced with the string-based
signal/slot form:
QObject::connect(context.window, SIGNAL(closing(QQuickCloseEvent*)), &loop, SLOT(quit())).
The handler only needs to quit the pre-init onboarding event loop, so this
keeps the same behavior without requiring Qt 6.4 to instantiate the
incomplete QQuickCloseEvent type.

addressed. The typed connection was replaced with the string-based signal/slot form: QObject::connect(context.window, SIGNAL(closing(QQuickCloseEvent*)), &loop, SLOT(quit())). The handler only needs to quit the pre-init onboarding event loop, so this keeps the same behavior without requiring Qt 6.4 to instantiate the incomplete QQuickCloseEvent type.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:37:18 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:37:18 +00:00

addressed. qml/test/testbridge.cpp now tries real
press/release mouse events on visible, enabled QQuickItems before falling
back to raw signal/method invocation. This keeps functional tests aligned
with the same QML handler path users exercise.

addressed. qml/test/testbridge.cpp now tries real press/release mouse events on visible, enabled QQuickItems before falling back to raw signal/method invocation. This keeps functional tests aligned with the same QML handler path users exercise.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:37:42 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:37:42 +00:00

addressed. The onboarding create-wallet flow no longer exposes
the intro Back action after pre-init onboarding has committed startup
settings. Functional wallet helpers were also updated to tolerate the
resulting create-wallet entry shape.

addressed. The onboarding create-wallet flow no longer exposes the intro Back action after pre-init onboarding has committed startup settings. Functional wallet helpers were also updated to tolerate the resulting create-wallet entry shape.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:38:15 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:38:15 +00:00

addressed. ShouldShowDataDirChooser() now revalidates a saved
non-default GUI datadir with ValidateCustomDataDir() before skipping the
chooser. ApplyGuiDataDirSetting() now stops without soft-setting
-datadir if EnsureDataDir() fails. Unit tests cover both an unusable
saved datadir and an unwritable saved datadir.

addressed. ShouldShowDataDirChooser() now revalidates a saved non-default GUI datadir with ValidateCustomDataDir() before skipping the chooser. ApplyGuiDataDirSetting() now stops without soft-setting -datadir if EnsureDataDir() fails. Unit tests cover both an unusable saved datadir and an unwritable saved datadir.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:38:31 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:38:31 +00:00

addressed by clarifying and testing the intended behavior.
NAT-PMP remains live-applied because this matches Qt Widgets behavior:
accepting the settings change persists natpmp and calls mapPort() without
requiring restart. The code now documents that NAT-PMP is intentionally
live-applied, and the unit test verifies enable and disable both update the
setting, call mapPort(), and do not mark connection settings dirty or
restart-required.

addressed by clarifying and testing the intended behavior. NAT-PMP remains live-applied because this matches Qt Widgets behavior: accepting the settings change persists natpmp and calls mapPort() without requiring restart. The code now documents that NAT-PMP is intentionally live-applied, and the unit test verifies enable and disable both update the setting, call mapPort(), and do not mark connection settings dirty or restart-required.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:39:26 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:39:26 +00:00

addressed. thirdPartyTransactionLinks() now skips configured
URLs that do not contain %s before exposing generated links. The unit test
includes a valid URL missing %s and verifies only the placeholder URL is
returned.

Will evaluate the security comment.

addressed. thirdPartyTransactionLinks() now skips configured URLs that do not contain %s before exposing generated links. The unit test includes a valid URL missing %s and verifies only the placeholder URL is returned. Will evaluate the security comment.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:39:42 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:39:42 +00:00

addressed. WalletBadge now applies
optionsModel.moneyFont.family and optionsModel.moneyFont.weight to the
balance text, and tst_desktopwallets.qml verifies the binding.

addressed. WalletBadge now applies optionsModel.moneyFont.family and optionsModel.moneyFont.weight to the balance text, and tst_desktopwallets.qml verifies the binding.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:41:28 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:41:28 +00:00

addressed. The onStorageSelectionChanged handler now uses a
JavaScript function with formal customStorage and customStorageAmount
parameters.

addressed. The onStorageSelectionChanged handler now uses a JavaScript function with formal customStorage and customStorageAmount parameters.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:41:44 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:41:44 +00:00

addressed. SettingsRestartNotice.qml is now a small semantic
wrapper around the shared InfoBanner component instead of custom
Rectangle/Icon/CoreText banner markup.

addressed. SettingsRestartNotice.qml is now a small semantic wrapper around the shared InfoBanner component instead of custom Rectangle/Icon/CoreText banner markup.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:42:00 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:42:00 +00:00

addressed by reflowing the stack. DirtySnapshot,
dirtySnapshot(), and emitDirtySignals(const DirtySnapshot& before) are
introduced in the same commit that first uses them, so the intermediate
commit now compiles.

addressed by reflowing the stack. DirtySnapshot, dirtySnapshot(), and emitDirtySignals(const DirtySnapshot& before) are introduced in the same commit that first uses them, so the intermediate commit now compiles.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:42:27 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:42:27 +00:00

addressed. Proxy location changes now flow through
QmlCoreSettings::Session::changeProxyLocation(), which trims and validates
the location before mutating m_values.proxy_address. Invalid values return
an unaccepted change and leave the previous address intact.

addressed. Proxy location changes now flow through QmlCoreSettings::Session::changeProxyLocation(), which trims and validates the location before mutating m_values.proxy_address. Invalid values return an unaccepted change and leave the previous address intact.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:42:44 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:42:44 +00:00

addressed. The final options model uses
emitDirtySignals(const DirtySnapshot& before) and keeps the dirty-state
comparison grouped in DirtySnapshot.

addressed. The final options model uses emitDirtySignals(const DirtySnapshot& before) and keeps the dirty-state comparison grouped in DirtySnapshot.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:43:00 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:43:00 +00:00

addressed. The branch no longer carries both components. The
existing input was refactored/renamed into
qml/controls/ProxyLocationInput.qml, and the old
IPAddressValueInput.qml file and QRC entry are gone. The new name matches
Core proxy semantics better because valid proxy locations can include
hostnames, host-with-port values, IPv6 forms, and supported unix: paths,
not only IP addresses.

addressed. The branch no longer carries both components. The existing input was refactored/renamed into qml/controls/ProxyLocationInput.qml, and the old IPAddressValueInput.qml file and QRC entry are gone. The new name matches Core proxy semantics better because valid proxy locations can include hostnames, host-with-port values, IPv6 forms, and supported unix: paths, not only IP addresses.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:44:01 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:44:01 +00:00

addressed by the model split. Runtime OptionsQmlModel persists
runtime datadir settings immediately, which is expected for the settings
page. Pre-init onboarding uses OnboardingOptionsModel; its
selectCustomDataDir() only updates onboarding model state and preview
state. The path is ensured/applied during onboarding completion through
QmlOnboardingSettings::ApplyToArgs().

addressed by the model split. Runtime OptionsQmlModel persists runtime datadir settings immediately, which is expected for the settings page. Pre-init onboarding uses OnboardingOptionsModel; its selectCustomDataDir() only updates onboarding model state and preview state. The path is ensured/applied during onboarding completion through QmlOnboardingSettings::ApplyToArgs().
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:44:27 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:44:27 +00:00

addressed. StorageLocations.qml now uses FolderDialog with a
stable customDataDirFolderDialog object name. QML tests verify the folder
dialog is present and exposes selectedFolder.

addressed. StorageLocations.qml now uses FolderDialog with a stable customDataDirFolderDialog object name. QML tests verify the folder dialog is present and exposes selectedFolder.
jarolrod (Migrated from github.com) reviewed 2026-06-26 20:44:55 +00:00
jarolrod (Migrated from github.com) commented 2026-06-26 20:44:55 +00:00

addressed together with the datadir helper review. Startup now
asks ShouldShowDataDirChooser() before applying saved GUI datadir state,
and ApplyGuiDataDirSetting() refuses to apply a saved non-default path if
EnsureDataDir() fails. That prevents an unwritable, invalid, or otherwise
unusable saved path from being silently soft-set as -datadir.

addressed together with the datadir helper review. Startup now asks ShouldShowDataDirChooser() before applying saved GUI datadir state, and ApplyGuiDataDirSetting() refuses to apply a saved non-default path if EnsureDataDir() fails. That prevents an unwritable, invalid, or otherwise unusable saved path from being silently soft-set as -datadir.
epicleafies (Migrated from github.com) reviewed 2026-06-27 16:55:15 +00:00
epicleafies (Migrated from github.com) left a comment

Re-review at 682d2042. The previous compile blocker is fixed: the branch now builds clean on Qt 6.4.2 and the full offscreen suite is green (unit, QML, 29 functional pass / 2 skip / 0 fail). One new blocker, plus two findings from my earlier review that are still open (followed up on their threads). Couldn't manually test it because of the new blocker.

New blocker: on Qt 6.4, a first-run user launching headed SIGSEGVs at startup before any interactive page. It is fixed in 746, if that gets merged in first can rebase onto it.

Still open from my earlier review (details on each thread): the two new functional tests are not in the CI workflow and the ActivityDetails Repeater-in-Layout is the same now-confirmed crash class.

Re-review at 682d2042. The previous compile blocker is fixed: the branch now builds clean on Qt 6.4.2 and the full offscreen suite is green (unit, QML, 29 functional pass / 2 skip / 0 fail). One new blocker, plus two findings from my earlier review that are still open (followed up on their threads). Couldn't manually test it because of the new blocker. New blocker: on Qt 6.4, a first-run user launching headed SIGSEGVs at startup before any interactive page. It is fixed in 746, if that gets merged in first can rebase onto it. Still open from my earlier review (details on each thread): the two new functional tests are not in the CI workflow and the ActivityDetails Repeater-in-Layout is the same now-confirmed crash class.
epicleafies (Migrated from github.com) commented 2026-06-27 16:21:12 +00:00

Blocker: On Qt 6.4 (the minimum supported version), a first-run user launching headed SIGSEGVs at startup before reaching any interactive page. This PR moves onboarding into the pre-init window and lands the main window on desktopWallets for a no-wallet user, whose StackLayout eagerly instantiates the Send page and its AlertPopups at first layout, so the latent crash now fires at startup for every new user.

This is already fixed by #746 (commit b53ddbbf81 "qml: Fix Qt 6.4 use-after-free in AlertPopup actions", which wraps the actions in a Row positioner), but that fix has not landed on upstream/qt6 yet. So nothing needs to change in this PR right now, but it should rebase off 746 once it is merged.

Blocker: On Qt 6.4 (the minimum supported version), a first-run user launching headed SIGSEGVs at startup before reaching any interactive page. This PR moves onboarding into the pre-init window and lands the main window on desktopWallets for a no-wallet user, whose StackLayout eagerly instantiates the Send page and its AlertPopups at first layout, so the latent crash now fires at startup for every new user. This is already fixed by #746 (commit b53ddbbf81 "qml: Fix Qt 6.4 use-after-free in AlertPopup actions", which wraps the actions in a Row positioner), but that fix has not landed on upstream/qt6 yet. So nothing needs to change in this PR right now, but it should rebase off 746 once it is merged.
epicleafies (Migrated from github.com) commented 2026-06-27 16:55:02 +00:00

Still unresolved at 682d2042, both Repeaters (153 and 200) are unchanged. Following the AlertPopup pointer in this comment: AlertPopup.qml on this branch still carries the broken RowLayout + Repeater, not the #746 Row-positioner fix, and it actually SIGSEGVs at first-run startup now (see the new top-level finding). So this is the same live use-after-free, not a theoretical one. Same fix here: wrap the delegates in a Column positioner with explicit widths.

Still unresolved at 682d2042, both Repeaters (153 and 200) are unchanged. Following the AlertPopup pointer in this comment: AlertPopup.qml on this branch still carries the broken RowLayout + Repeater, not the #746 Row-positioner fix, and it actually SIGSEGVs at first-run startup now (see the new top-level finding). So this is the same live use-after-free, not a theoretical one. Same fix here: wrap the delegates in a Column positioner with explicit widths.
epicleafies (Migrated from github.com) commented 2026-06-27 16:55:01 +00:00

Still unresolved at 682d2042, neither test is in the workflow. I ran both on this head and both pass, so they only need wiring in.

Still unresolved at 682d2042, neither test is in the workflow. I ran both on this head and both pass, so they only need wiring in.
johnny9 (Migrated from github.com) reviewed 2026-06-28 21:11:28 +00:00
johnny9 (Migrated from github.com) left a comment

commits 662f07b455 through 682d204307 don't compile and require a small patch.

Patch to squash into 662f07b455 (qml: add display settings parity):

  diff --git a/qml/bitcoin.cpp b/qml/bitcoin.cpp
  --- a/qml/bitcoin.cpp
  +++ b/qml/bitcoin.cpp
  @@ -58,7 +58,6 @@
   #include <qml/networkstyle.h>
   #include <qml/util.h>
   #include <qml/walletqmlcontroller.h>
  -#include <qt/bitcoinunits.h>
   #ifdef ENABLE_TEST_AUTOMATION
   #include <qml/test/testbridge.h>
   #endif
  @@ -425,7 +424,6 @@ int QmlGuiMain(int argc, char* argv[])

       Q_INIT_RESOURCE(bitcoin_qml);
       qRegisterMetaType<interfaces::BlockAndHeaderTipInfo>("interfaces::BlockAndHeaderTipInfo");
  -    qRegisterMetaType<BitcoinUnit>("BitcoinUnit");

       QGuiApplication::styleHints()->setTabFocusBehavior(Qt::TabFocusAllControls);
       QGuiApplication app(argc, argv);

BitcoinUnit doesn't appear to be needed for qml for these changes.

commits 662f07b455 through 682d204307 don't compile and require a small patch. Patch to squash into 662f07b455 (qml: add display settings parity): ``` diff --git a/qml/bitcoin.cpp b/qml/bitcoin.cpp --- a/qml/bitcoin.cpp +++ b/qml/bitcoin.cpp @@ -58,7 +58,6 @@ #include <qml/networkstyle.h> #include <qml/util.h> #include <qml/walletqmlcontroller.h> -#include <qt/bitcoinunits.h> #ifdef ENABLE_TEST_AUTOMATION #include <qml/test/testbridge.h> #endif @@ -425,7 +424,6 @@ int QmlGuiMain(int argc, char* argv[]) Q_INIT_RESOURCE(bitcoin_qml); qRegisterMetaType<interfaces::BlockAndHeaderTipInfo>("interfaces::BlockAndHeaderTipInfo"); - qRegisterMetaType<BitcoinUnit>("BitcoinUnit"); QGuiApplication::styleHints()->setTabFocusBehavior(Qt::TabFocusAllControls); QGuiApplication app(argc, argv); ``` BitcoinUnit doesn't appear to be needed for qml for these changes.
hebasto commented 2026-06-29 15:06:54 +00:00 (Migrated from github.com)

Please rebase.

Please rebase.
pseudoramdom (Migrated from github.com) reviewed 2026-06-29 21:45:05 +00:00
pseudoramdom (Migrated from github.com) left a comment

Reviewed till db326f2a04 (qml: show core setting source status in rows)

Reviewed till db326f2a04 (qml: show core setting source status in rows)
pseudoramdom (Migrated from github.com) commented 2026-06-29 21:44:35 +00:00

Should we bundle all the check as one property in the model?

Should we bundle all the check as one property in the model?
pseudoramdom (Migrated from github.com) commented 2026-06-29 21:21:59 +00:00

In 32a9578bbc qml: expose core settings as entry models

Should this reject unknown keys before calling ensureEntry()

In 32a9578bbc qml: expose core settings as entry models Should this reject unknown keys before calling `ensureEntry()`
pseudoramdom commented 2026-06-30 22:20:26 +00:00 (Migrated from github.com)

Concept ACK f029c3e1fa93ffe962e09a8ca08981992c84a2ff
(Code review in progress)


Manually tested with isolated datadirs and GUI settings dirs:

  • Fresh wallet-enabled onboarding flow
  • Restart after completed onboarding
  • Fresh node-only onboarding flow with -disablewallet
  • Runtime startup with -qml_onboarded=1
  • -resetguisettings flow on an onboarded runtime profile
  • CLI-sourced startup settings flow. Tried with -listen, -natpmp, -server, -proxy
  • Config-file-sourced startup settings flow
  • Prune startup setting flow

Let me know if I missed any scenario to test.

Concept ACK f029c3e1fa93ffe962e09a8ca08981992c84a2ff (Code review in progress) --- Manually tested with isolated datadirs and GUI settings dirs: - Fresh wallet-enabled onboarding flow - Restart after completed onboarding - Fresh node-only onboarding flow with `-disablewallet` - Runtime startup with `-qml_onboarded=1` - `-resetguisettings` flow on an onboarded runtime profile - CLI-sourced startup settings flow. Tried with `-listen`, `-natpmp`, `-server`, `-proxy` - Config-file-sourced startup settings flow - Prune startup setting flow Let me know if I missed any scenario to test.
pseudoramdom commented 2026-06-30 22:57:07 +00:00 (Migrated from github.com)

I can still repro #704.
I ran with an existing regtest datadir copy containing wallets and no qml_onboarded marker. On first launch, onboarding is shown, but it runs through the full fresh-profile wizard instead of the abbreviated existing-profile flow described in the issue.
After completing onboarding, the existing wallets from the datadir are not surfaced in the app.

I can still repro #704. I ran with an existing regtest datadir copy containing wallets and no `qml_onboarded` marker. On first launch, onboarding is shown, but it runs through the full fresh-profile wizard instead of the abbreviated existing-profile flow described in the issue. After completing onboarding, the existing wallets from the datadir are not surfaced in the app.
johnny9 (Migrated from github.com) requested changes 2026-07-01 15:30:27 +00:00
johnny9 (Migrated from github.com) left a comment

Request changes. Left 4 blocking comments for existing-profile safety and config handling.

Request changes. Left 4 blocking comments for existing-profile safety and config handling.
johnny9 (Migrated from github.com) commented 2026-07-01 15:30:27 +00:00

disablewallet=1 from bitcoin.conf is still broken here. AppMode is resolved before config parsing, so a config-only disablewallet is missed. The wallet controller later sees the final setting and never initializes, while the main window keeps waiting for wallet startup forever. Please resolve wallet mode after InitConfig() so config-sourced disablewallet routes to the node UI instead of a permanent loading state.

`disablewallet=1` from `bitcoin.conf` is still broken here. `AppMode` is resolved before config parsing, so a config-only `disablewallet` is missed. The wallet controller later sees the final setting and never initializes, while the main window keeps waiting for wallet startup forever. Please resolve wallet mode after `InitConfig()` so config-sourced `disablewallet` routes to the node UI instead of a permanent loading state.
johnny9 (Migrated from github.com) commented 2026-07-01 15:30:27 +00:00

This is not safe for an existing profile. EnsureDataDir() always creates <datadir>/wallets here. Core uses that directory's existence to switch wallet discovery away from the datadir root, so a valid top-level wallet can disappear from the UI after onboarding even though the wallet files are still on disk. Please preserve the existing wallet discovery behavior instead of unconditionally creating wallets/ for an existing datadir.

This is not safe for an existing profile. `EnsureDataDir()` always creates `<datadir>/wallets` here. Core uses that directory's existence to switch wallet discovery away from the datadir root, so a valid top-level wallet can disappear from the UI after onboarding even though the wallet files are still on disk. Please preserve the existing wallet discovery behavior instead of unconditionally creating `wallets/` for an existing datadir.
johnny9 (Migrated from github.com) commented 2026-07-01 15:30:27 +00:00

This recommendation path is not safe for an existing profile. It compares free space against a fresh-chain requirement and then marks prune touched, so an existing full node can be turned into a pruned node just by completing onboarding, even without the user explicitly choosing pruning. Existing blocks/chainstate need to count toward capacity here, and prune should not be auto-persisted for an existing node.

This recommendation path is not safe for an existing profile. It compares free space against a fresh-chain requirement and then marks `prune` touched, so an existing full node can be turned into a pruned node just by completing onboarding, even without the user explicitly choosing pruning. Existing blocks/chainstate need to count toward capacity here, and prune should not be auto-persisted for an existing node.
johnny9 (Migrated from github.com) commented 2026-07-01 15:30:27 +00:00

This breaks Core's config-loading invariant. Preview soft-sets the resolved datadir before ReadConfigFiles(), and the same ordering is repeated in ApplyToArgs() below. If the default bitcoin.conf contains datadir=, the next config read comes from the new datadir instead of the original config source, so the rest of the config can be silently dropped and the wrong network can start. Please keep the original config source stable when datadir is changed from config.

This breaks Core's config-loading invariant. Preview soft-sets the resolved datadir before `ReadConfigFiles()`, and the same ordering is repeated in `ApplyToArgs()` below. If the default `bitcoin.conf` contains `datadir=`, the next config read comes from the new datadir instead of the original config source, so the rest of the config can be silently dropped and the wrong network can start. Please keep the original config source stable when `datadir` is changed from config.
jarolrod (Migrated from github.com) reviewed 2026-07-02 15:50:52 +00:00
jarolrod (Migrated from github.com) commented 2026-07-02 15:50:52 +00:00

I looked into this again. I don’t think this needs a code change in this PR.

CoreSettingsModel::entry() is only called from repo-owned QML with static keys. There is no user-provided or dynamic path that can pass arbitrary keys into this API.

If an unsupported key were introduced by a future QML change, it would also fail inertly rather than persist anything: the entry returns empty/default values, setters do not match any mutation path, and session writes reject names outside the supported session setting set.

So I agree this could be a useful defensive guardrail for catching future developer mistakes, but I don’t think it is a correctness issue in the current branch. I’m leaving it asis for now.

I looked into this again. I don’t think this needs a code change in this PR. `CoreSettingsModel::entry()` is only called from repo-owned QML with static keys. There is no user-provided or dynamic path that can pass arbitrary keys into this API. If an unsupported key were introduced by a future QML change, it would also fail inertly rather than persist anything: the entry returns empty/default values, setters do not match any mutation path, and session writes reject names outside the supported session setting set. So I agree this could be a useful defensive guardrail for catching future developer mistakes, but I don’t think it is a correctness issue in the current branch. I’m leaving it asis for now.
uqlidi (Migrated from github.com) requested changes 2026-07-04 02:03:41 +00:00
uqlidi (Migrated from github.com) commented 2026-07-04 02:02:39 +00:00

we need to enhance this part and do something like that:

enum class Key { Listen, Natpmp, Server, Prune, Proxy, Onion, Unknown };

CoreSettingEntryModel::Key CoreSettingEntryModel::keyFromString(const QString& k)
{
    static const QHash<QString, Key> map{
        {QStringLiteral("listen"), Key::Listen},
        {QStringLiteral("natpmp"), Key::Natpmp},
        {QStringLiteral("server"), Key::Server},
        {QStringLiteral("prune"),  Key::Prune},
        {QStringLiteral("proxy"),  Key::Proxy},
        {QStringLiteral("onion"),  Key::Onion},
    };
    return map.value(k, Key::Unknown);
}

and we will assign the type to m_keyType and use it instead of m_key
by this helper, we could do something like that. It's cleaner:

QVariant CoreSettingEntryModel::value() const
{
    const QmlCoreSettings::Values& values = m_model.values();
    switch (m_keyType) {
        case Key::Listen: return values.listen;
        case Key::Natpmp: return values.natpmp;
        case Key::Server: return values.server;
        case Key::Prune:  return values.prune_size_gb;
        case Key::Proxy:  return values.proxy_address;
        case Key::Onion:  return values.tor_address;
        case Key::Unknown: return {};
    }
    return {};
}

void CoreSettingEntryModel::setValue(const QVariant& value)
{
    switch (m_keyType) {
        case Key::Listen: m_model.changeListen(value.toBool());          break;
        case Key::Natpmp: m_model.changeNatpmp(value.toBool());          break;
        case Key::Server: m_model.changeServer(value.toBool());          break;
        case Key::Prune:  m_model.changePruneSizeGB(value.toInt());      break;
        case Key::Proxy:  m_model.changeProxyLocation(value.toString()); break;
        case Key::Onion:  m_model.changeTorLocation(value.toString());   break;
        case Key::Unknown: break;
    }
}

bool CoreSettingEntryModel::enabled() const
{
    const QmlCoreSettings::Values& values = m_model.values();
    switch (m_keyType) {
        case Key::Listen: return values.listen;
        case Key::Natpmp: return values.natpmp;
        case Key::Server: return values.server;
        case Key::Prune:  return values.prune;
        case Key::Proxy:  return values.proxy_enabled;
        case Key::Onion:  return values.tor_enabled;
        case Key::Unknown: return false;
    }
    return false;
}

void CoreSettingEntryModel::setEnabled(bool enabled)
{
    switch (m_keyType) {
        case Key::Listen: m_model.changeListen(enabled);       break;
        case Key::Natpmp: m_model.changeNatpmp(enabled);       break;
        case Key::Server: m_model.changeServer(enabled);       break;
        case Key::Prune:  m_model.changePrune(enabled);        break;
        case Key::Proxy:  m_model.changeProxyEnabled(enabled); break;
        case Key::Onion:  m_model.changeTorEnabled(enabled);   break;
        case Key::Unknown: break;
    }
}
we need to enhance this part and do something like that: ``` enum class Key { Listen, Natpmp, Server, Prune, Proxy, Onion, Unknown }; CoreSettingEntryModel::Key CoreSettingEntryModel::keyFromString(const QString& k) { static const QHash<QString, Key> map{ {QStringLiteral("listen"), Key::Listen}, {QStringLiteral("natpmp"), Key::Natpmp}, {QStringLiteral("server"), Key::Server}, {QStringLiteral("prune"), Key::Prune}, {QStringLiteral("proxy"), Key::Proxy}, {QStringLiteral("onion"), Key::Onion}, }; return map.value(k, Key::Unknown); } ``` and we will assign the type to `m_keyType` and use it instead of `m_key` by this helper, we could do something like that. It's cleaner: ```suggestion QVariant CoreSettingEntryModel::value() const { const QmlCoreSettings::Values& values = m_model.values(); switch (m_keyType) { case Key::Listen: return values.listen; case Key::Natpmp: return values.natpmp; case Key::Server: return values.server; case Key::Prune: return values.prune_size_gb; case Key::Proxy: return values.proxy_address; case Key::Onion: return values.tor_address; case Key::Unknown: return {}; } return {}; } void CoreSettingEntryModel::setValue(const QVariant& value) { switch (m_keyType) { case Key::Listen: m_model.changeListen(value.toBool()); break; case Key::Natpmp: m_model.changeNatpmp(value.toBool()); break; case Key::Server: m_model.changeServer(value.toBool()); break; case Key::Prune: m_model.changePruneSizeGB(value.toInt()); break; case Key::Proxy: m_model.changeProxyLocation(value.toString()); break; case Key::Onion: m_model.changeTorLocation(value.toString()); break; case Key::Unknown: break; } } bool CoreSettingEntryModel::enabled() const { const QmlCoreSettings::Values& values = m_model.values(); switch (m_keyType) { case Key::Listen: return values.listen; case Key::Natpmp: return values.natpmp; case Key::Server: return values.server; case Key::Prune: return values.prune; case Key::Proxy: return values.proxy_enabled; case Key::Onion: return values.tor_enabled; case Key::Unknown: return false; } return false; } void CoreSettingEntryModel::setEnabled(bool enabled) { switch (m_keyType) { case Key::Listen: m_model.changeListen(enabled); break; case Key::Natpmp: m_model.changeNatpmp(enabled); break; case Key::Server: m_model.changeServer(enabled); break; case Key::Prune: m_model.changePrune(enabled); break; case Key::Proxy: m_model.changeProxyEnabled(enabled); break; case Key::Onion: m_model.changeTorEnabled(enabled); break; case Key::Unknown: break; } } ```
jarolrod (Migrated from github.com) reviewed 2026-07-06 18:25:40 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 18:25:40 +00:00

I agree this is cleaner, but I want to have a discussion on the model itself at a later time. I have a few better options to implement on their own, we need to get this across the line now

I agree this is cleaner, but I want to have a discussion on the model itself at a later time. I have a few better options to implement on their own, we need to get this across the line now
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:01:07 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:01:07 +00:00

Addressed in the current branch.

thirdPartyTransactionLinks() now skips entries that do not contain %s, rejects non-HTTP(S) schemes, and only exposes generated links with a host. The external-link confirmation popup also renders the configured URL as Text.PlainText, so user-configured URL text is not interpreted as rich text.

Coverage was added in OptionsModelTests::thirdPartyTransactionLinksParseValidUrls() for valid HTTP(S) URLs, missing %s, malformed URLs, and non-web schemes.

Addressed in the current branch. `thirdPartyTransactionLinks()` now skips entries that do not contain `%s`, rejects non-HTTP(S) schemes, and only exposes generated links with a host. The external-link confirmation popup also renders the configured URL as `Text.PlainText`, so user-configured URL text is not interpreted as rich text. Coverage was added in `OptionsModelTests::thirdPartyTransactionLinksParseValidUrls()` for valid HTTP(S) URLs, missing `%s`, malformed URLs, and non-web schemes.
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:01:29 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:01:29 +00:00

Addressed in the current branch.

Both dynamic ActivityDetails repeater sections now live inside plain Column positioners instead of being direct layout-managed repeater delegates. Delegates are sized explicitly with the section width, matching the Qt 6.4-safe pattern used for the same crash class elsewhere.

I also added QML component coverage for the third-party-link section so we verify the section lays out with non-zero content and collapses when no links are configured.

Addressed in the current branch. Both dynamic `ActivityDetails` repeater sections now live inside plain `Column` positioners instead of being direct layout-managed repeater delegates. Delegates are sized explicitly with the section width, matching the Qt 6.4-safe pattern used for the same crash class elsewhere. I also added QML component coverage for the third-party-link section so we verify the section lays out with non-zero content and collapses when no links are configured.
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:02:59 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:02:59 +00:00

Addressed.

.github/workflows/gui-functional-tests.yml now runs both standalone tests:

  • test/functional/qml_test_preinit_onboarding.py
  • test/functional/qml_test_resetguisettings.py

These are invoked without shared socket arguments, matching the way the tests self-launch the app.

Addressed. `.github/workflows/gui-functional-tests.yml` now runs both standalone tests: - `test/functional/qml_test_preinit_onboarding.py` - `test/functional/qml_test_resetguisettings.py` These are invoked without shared socket arguments, matching the way the tests self-launch the app.
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:03:35 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:03:35 +00:00

Addressed by bringing the Qt 6.4-safe popup action layout into this branch.

AlertPopup.qml now uses a plain Row positioner for repeated action buttons instead of handing repeater delegates directly to a Quick Layout. This avoids the Qt 6.4 use-after-free class described here.

Addressed by bringing the Qt 6.4-safe popup action layout into this branch. `AlertPopup.qml` now uses a plain `Row` positioner for repeated action buttons instead of handing repeater delegates directly to a Quick Layout. This avoids the Qt 6.4 use-after-free class described here.
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:03:59 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:03:59 +00:00

leaving as is for now, but we can revisit soon

leaving as is for now, but we can revisit soon
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:04:18 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:04:18 +00:00

Addressed in the current branch.

Onboarding now preserves existing wallet discovery behavior. It only creates the network wallets/ subdirectory when the selected data directory or network data directory is newly created. Existing profiles that store wallets directly under the network datadir no longer get switched into wallets/ discovery by onboarding.

There is unit coverage for new-vs-existing datadir behavior and functional coverage for preserving an existing root wallet through pre-init onboarding.

Addressed in the current branch. Onboarding now preserves existing wallet discovery behavior. It only creates the network `wallets/` subdirectory when the selected data directory or network data directory is newly created. Existing profiles that store wallets directly under the network datadir no longer get switched into `wallets/` discovery by onboarding. There is unit coverage for new-vs-existing datadir behavior and functional coverage for preserving an existing root wallet through pre-init onboarding.
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:06:28 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:06:28 +00:00

Addressed.

The onboarding flow now tracks the source of the active datadir. Datadirs resolved from bitcoin.conf are treated as config-owned, not GUI-owned. Preview/apply only soft-set and persist -datadir when the path comes from GUI settings, legacy GUI settings, or an explicit user selection in onboarding.

This preserves Core’s config-loading source: a datadir= value from bitcoin.conf is not copied into QSettings and is not reapplied as a GUI-owned override.

Addressed. The onboarding flow now tracks the source of the active datadir. Datadirs resolved from `bitcoin.conf` are treated as config-owned, not GUI-owned. Preview/apply only soft-set and persist `-datadir` when the path comes from GUI settings, legacy GUI settings, or an explicit user selection in onboarding. This preserves Core’s config-loading source: a `datadir=` value from bitcoin.conf is not copied into QSettings and is not reapplied as a GUI-owned override.
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:06:40 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:06:40 +00:00

Addressed.

Existing profiles now bypass the automatic prune recommendation path. For an existing profile, onboarding reflects the effective prune state from config/settings/CLI and does not mark prune touched just because the fresh-chain storage recommendation would prefer pruning.

Storage validation for existing profiles also uses the existing-profile storage policy rather than fresh-chain download requirements.

Addressed. Existing profiles now bypass the automatic prune recommendation path. For an existing profile, onboarding reflects the effective prune state from config/settings/CLI and does not mark prune touched just because the fresh-chain storage recommendation would prefer pruning. Storage validation for existing profiles also uses the existing-profile storage policy rather than fresh-chain download requirements.
jarolrod (Migrated from github.com) reviewed 2026-07-06 19:06:56 +00:00
jarolrod (Migrated from github.com) commented 2026-07-06 19:06:56 +00:00

Addressed.

The app now refreshes AppMode.walletEnabled after Core config/settings have been loaded, so disablewallet=1 from bitcoin.conf or settings.json is reflected in initial QML routing.

The functional test covers:

  • command-line -disablewallet
  • disablewallet=1 from bitcoin.conf
  • disablewallet=true from settings.json
  • command-line -disablewallet=0 overriding bitcoin.conf
Addressed. The app now refreshes `AppMode.walletEnabled` after Core config/settings have been loaded, so `disablewallet=1` from `bitcoin.conf` or `settings.json` is reflected in initial QML routing. The functional test covers: - command-line `-disablewallet` - `disablewallet=1` from bitcoin.conf - `disablewallet=true` from settings.json - command-line `-disablewallet=0` overriding bitcoin.conf
johnny9 (Migrated from github.com) reviewed 2026-07-07 03:03:42 +00:00
johnny9 (Migrated from github.com) commented 2026-07-07 03:03:42 +00:00

-resetguisettings is applied too early.

Right now the app clears GUI settings before bitcoin.conf has been read and before the active datadir/profile is known. If the default bitcoin.conf redirects to B/ regtest, startup still resets the default/main profile first just by opening onboarding. Finishing onboarding later resets B, but canceling leaves only the wrong profile
modified.

Please defer the reset until after the active profile has been resolved, and add regression coverage for both canceling and completing onboarding when the default config
redirects to another datadir.

`-resetguisettings` is applied too early. Right now the app clears GUI settings before `bitcoin.conf` has been read and before the active datadir/profile is known. If the default `bitcoin.conf` redirects to `B/ regtest`, startup still resets the default/main profile first just by opening onboarding. Finishing onboarding later resets `B`, but canceling leaves only the wrong profile modified. Please defer the reset until after the active profile has been resolved, and add regression coverage for both canceling and completing onboarding when the default config redirects to another datadir.
johnny9 (Migrated from github.com) commented 2026-07-07 03:03:42 +00:00
  1. App starts with clean gArgs.

  2. There is no -conf, so Core’s default config location is used:
    ~/.bitcoin/bitcoin.conf

  3. That default config contains:

datadir=/tmp/B

  1. Pre-init onboarding runs before the normal main-window startup.
  2. During onboarding, ApplyToArgs(gArgs) reads that default config and applies datadir=/tmp/B into the live global args.
  3. Onboarding finishes.
  4. Then normal startup continues and calls InitConfig(gArgs) again.
  5. But now gArgs already has datadir=/tmp/B, so the default config lookup is no longer ~/.bitcoin/bitcoin.conf; it shifts to /tmp/B/bitcoin.conf.
  6. If /tmp/B/bitcoin.conf does not exist, or does not contain the same setup, startup no longer sees the config it used during onboarding.
  7. The app fails/returns during startup before creating the main window.
1. App starts with clean gArgs. 2. There is no -conf, so Core’s default config location is used: ~/.bitcoin/bitcoin.conf 3. That default config contains: datadir=/tmp/B 4. Pre-init onboarding runs before the normal main-window startup. 5. During onboarding, ApplyToArgs(gArgs) reads that default config and applies datadir=/tmp/B into the live global args. 6. Onboarding finishes. 7. Then normal startup continues and calls InitConfig(gArgs) again. 8. But now gArgs already has datadir=/tmp/B, so the default config lookup is no longer ~/.bitcoin/bitcoin.conf; it shifts to /tmp/B/bitcoin.conf. 9. If /tmp/B/bitcoin.conf does not exist, or does not contain the same setup, startup no longer sees the config it used during onboarding. 10. The app fails/returns during startup before creating the main window.
johnny9 (Migrated from github.com) reviewed 2026-07-07 03:28:33 +00:00
johnny9 (Migrated from github.com) commented 2026-07-07 03:28:33 +00:00

A first glance this doesn't seem to cause any issues but I think its worth double checking because its odd that the application doesn't come up after finishing onboarding.

A first glance this doesn't seem to cause any issues but I think its worth double checking because its odd that the application doesn't come up after finishing onboarding.
epicleafies commented 2026-07-07 15:46:41 +00:00 (Migrated from github.com)

Still finishing the rest of my review but I did find a blocker so posting it now.

On Linux, if the saved GUI-selected custom datadir still exists but is no longer readable, the app aborts at launch with an unhandled exception instead of re-showing the datadir chooser:

terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error'
what(): filesystem error: status: Permission denied [/bitcoin.conf]
Aborted (core dumped)

Repro:

  1. Fresh config dir, onboard choosing a custom data directory.
  2. chmod 000 (or any state where the directory exists but cannot be traversed, for example an external drive that remounts root-owned).
  3. Relaunch. Expected: the storage location chooser reappears. Actual: abort before any window, on every launch, until the user fixes permissions by hand or passes -choosedatadir.

Root cause: ResolveOnboardingStartupStatus correctly computes force_show_onboarding (ShouldShowDataDirChooser flags the directory as not writable), but then still reads the profile from it, because the gate is custom_datadir_exists = QFileInfo::exists(...) (qml/onboarding_settings.cpp, around line 406), and a mode-000 directory exists. It applies the datadir to the preview args and calls ReadConfigFiles, where fs::is_directory(conf_path) (src/common/config.cpp:134) stats /bitcoin.conf, gets EACCES, and throws. Nothing on the QML startup path catches std::filesystem_error, so the process terminates.

Suggested fix, two parts:

  1. Gate the profile read on the datadir being usable, not merely existing: the ValidateCustomDataDir result is already computed for force_show_onboarding two lines above, so can_read_profile should exclude a custom datadir that failed validation.
  2. Wrap the preview's config/settings read in a try/catch that turns fs::filesystem_error into status.error, so any remaining gap of this kind degrades to the onboarding error path instead of std::terminate.

The existing unit test covers the unwritable case (guiDataDirChooserShowsForUnwritableConfiguredDir) but not the unreadable one, which is why this survives a green suite; a sibling test with a mode-000 directory would pin the fix.

Still finishing the rest of my review but I did find a blocker so posting it now. On Linux, if the saved GUI-selected custom datadir still exists but is no longer readable, the app aborts at launch with an unhandled exception instead of re-showing the datadir chooser: terminate called after throwing an instance of 'std::filesystem::__cxx11::filesystem_error' what(): filesystem error: status: Permission denied [<custom-datadir>/bitcoin.conf] Aborted (core dumped) Repro: 1. Fresh config dir, onboard choosing a custom data directory. 2. chmod 000 <custom-datadir> (or any state where the directory exists but cannot be traversed, for example an external drive that remounts root-owned). 3. Relaunch. Expected: the storage location chooser reappears. Actual: abort before any window, on every launch, until the user fixes permissions by hand or passes -choosedatadir. Root cause: ResolveOnboardingStartupStatus correctly computes force_show_onboarding (ShouldShowDataDirChooser flags the directory as not writable), but then still reads the profile from it, because the gate is custom_datadir_exists = QFileInfo::exists(...) (qml/onboarding_settings.cpp, around line 406), and a mode-000 directory exists. It applies the datadir to the preview args and calls ReadConfigFiles, where fs::is_directory(conf_path) (src/common/config.cpp:134) stats <datadir>/bitcoin.conf, gets EACCES, and throws. Nothing on the QML startup path catches std::filesystem_error, so the process terminates. Suggested fix, two parts: 1. Gate the profile read on the datadir being usable, not merely existing: the ValidateCustomDataDir result is already computed for force_show_onboarding two lines above, so can_read_profile should exclude a custom datadir that failed validation. 2. Wrap the preview's config/settings read in a try/catch that turns fs::filesystem_error into status.error, so any remaining gap of this kind degrades to the onboarding error path instead of std::terminate. The existing unit test covers the unwritable case (guiDataDirChooserShowsForUnwritableConfiguredDir) but not the unreadable one, which is why this survives a green suite; a sibling test with a mode-000 directory would pin the fix.
johnny9 (Migrated from github.com) approved these changes 2026-07-08 09:16:18 +00:00
johnny9 (Migrated from github.com) left a comment

ACK ff0292f646

I re-reviewed the latest updates and confirmed the previous blockers have been addressed. The existing-profile onboarding, config-owned datadir handling, reset/
settings behavior, disablewallet startup routing, Activity details display unit, Qt 6.4 layout/startup regressions, and functional-test registration all look covered now.

I opened follow-up issues for remaining startup/reset edge cases that should not block this PR:

  • #773: Pre-init onboarding can reread config after mutating startup args
  • #774: -resetguisettings can reset the wrong profile before datadir resolution
  • #775: Unable to load unreadable custom datadir
ACK ff0292f6467cff2d4bc24e5681659d6c4723fa5b I re-reviewed the latest updates and confirmed the previous blockers have been addressed. The existing-profile onboarding, config-owned datadir handling, reset/ settings behavior, disablewallet startup routing, Activity details display unit, Qt 6.4 layout/startup regressions, and functional-test registration all look covered now. I opened follow-up issues for remaining startup/reset edge cases that should not block this PR: - #773: Pre-init onboarding can reread config after mutating startup args - #774: -resetguisettings can reset the wrong profile before datadir resolution - #775: Unable to load unreadable custom datadir
johnny9 commented 2026-07-08 09:29:44 +00:00 (Migrated from github.com)

On Linux, if the saved GUI-selected custom datadir still exists but is no longer readable, the app aborts at launch with an unhandled exception instead of re-showing the datadir chooser:

Created #775 to track this. Lets not block on this bug right now.

> On Linux, if the saved GUI-selected custom datadir still exists but is no longer readable, the app aborts at launch with an unhandled exception instead of re-showing the datadir chooser: > Created #775 to track this. Lets not block on this bug right now.
Sign in to join this conversation.
No description provided.