From f511c0d509001fb4bd56c993c4782bdddc23b8e8 Mon Sep 17 00:00:00 2001 From: DanS Date: Fri, 5 Jun 2026 17:31:27 -0500 Subject: [PATCH] fix(lite): skip the full-node first-run wizard in lite builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit isFirstRun() keys off the full-node `blocks/` data dir, which never exists in lite — so the daemon/blockchain setup wizard (download node, extract blockchain, daemon status) fired in lite, where none of it applies and it has zero lite-awareness. Gate the wizard on !isLiteBuild(); lite goes straight to the main UI, where the "No wallet open — create or open one in Settings" prompt guides new users to the lite create/open flow. Full-node behavior is unchanged (isFirstRun() && !isLiteBuild() == isFirstRun() there). Completes the lite daemon-wording sweep: the other full-node surfaces are already lite-gated — daemon settings via supportsFullNodeLifecycleActions(), RPC settings in the isLiteBuild() else-branch, and Console/Peers/Explorer hidden via isUiSurfaceAvailable. Verified: true first-run in lite (fresh HOME) no longer starts the wizard; clean launch + shutdown, no daemon noise. tests pass. Co-Authored-By: Claude Opus 4.8 --- src/app.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/app.cpp b/src/app.cpp index b4e0f5a..3634538 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -308,13 +308,16 @@ bool App::init() }); // Check for first-run wizard — also re-run if blockchain data is missing - // even when wizard was previously completed (e.g. data dir was deleted) - if (isFirstRun()) { + // even when wizard was previously completed (e.g. data dir was deleted). + // The wizard is full-node setup (daemon + blockchain); lite has neither, and isFirstRun() + // is always true in lite (no `blocks` dir), so skip it — lite users create/open a wallet in + // Settings, guided by the "No wallet open" prompt. + if (isFirstRun() && !isLiteBuild()) { wizard_phase_ = WizardPhase::Appearance; DEBUG_LOGF("First run detected — starting wizard\n"); // Don't start daemon yet — wait for wizard completion } else { - // Normal startup — connect to daemon + // Normal startup — connect to daemon (tryConnect() is a no-op in lite builds) tryConnect(); }