fix(lite): skip the full-node first-run wizard in lite builds

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 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 17:31:27 -05:00
parent 235504657d
commit f511c0d509

View File

@@ -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();
}