Don't block cloud sign-in because the setup wizard is unfinished

Follow-up to the previous commit, found by driving the app: clicking Login /
Register on a fresh install pops "You are currently in Stealth Mode. To log
into the Cloud, you need to disable Stealth Mode first." — to a user who has
never touched the toggle, whose config says stealth_mode: false.

It is the same pre-wizard latch one step earlier. handle_web_request() gates the
login commands on get_stealth_mode(), which reports stealth while
firstguide/finish is unset, so the app blocks sign-in because the wizard is
unfinished — backwards, since signing in is how a user leaves that state.

Worse, the escape it offers does not work. "Quit Stealth Mode" writes
stealth_mode = false, which was ALREADY false, and never touches the latch: the
config is byte-identical afterwards and get_stealth_mode() still returns true.
The user clicks the button, believes stealth is off, signs in, and finds every
cloud feature still dead. That is the state the reporter of #15239 described.

So the login guard now reads the user's OWN setting via the new
get_stealth_mode_setting(), not the pre-wizard default. A user who deliberately
enabled Stealth mode still gets the dialog and the working Quit button; a user
who merely closed the wizard goes straight to the login page.

Measured on Xvfb with a fresh datadir (firstguide absent, stealth_mode false):
before, clicking Login produced a "Stealth Mode" window; after, it opens the
"Login" window directly. And with the previous commit's latch release, a real
Orca Cloud sign-in on that same unfinished-wizard profile now runs the whole
post-login flow — the sync prompt fires (sync_user_preset lands in the config),
the per-user preset folder is created, and Sync Presets syncs with no refusal.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Tommaso Bianchi
2026-08-15 22:18:34 +02:00
co-authored by Claude Opus 5
parent 7d313159df
commit 98135cf529
2 changed files with 10 additions and 1 deletions
+4
View File
@@ -91,6 +91,10 @@ public:
std::string get_language_code();
std::string get_hms_host();
bool get_stealth_mode();
// The user's OWN Stealth mode setting, without the pre-wizard default that get_stealth_mode()
// applies. Use this wherever "the wizard is unfinished" must not count as stealth — blocking
// sign-in above all, since signing in is how a user leaves that state in the first place.
bool get_stealth_mode_setting() { return get_bool("stealth_mode"); }
// Session state, not a setting: mirrors whether a cloud account is currently signed in, so
// get_stealth_mode() can tell "the user has not been asked yet" from "the user said no".
void set_cloud_logged_in(bool logged_in) { m_cloud_logged_in = logged_in; }
+6 -1
View File
@@ -5084,7 +5084,12 @@ std::string GUI_App::handle_web_request(std::string cmd)
});
return "";
}
if (app_config->get_stealth_mode() && stealth_blocked_login_commands.count(command_str)) {
// The user's own setting only. Blocking sign-in because the setup wizard is unfinished
// is backwards — signing in is how you leave that state — and it told a user who had
// never touched the toggle "You are currently in Stealth Mode", then offered a Quit
// button that writes stealth_mode=false when it was already false and leaves the
// pre-wizard default exactly where it was.
if (app_config->get_stealth_mode_setting() && stealth_blocked_login_commands.count(command_str)) {
CallAfter([this, command_str] {
MessageDialog dlg(mainframe,
_L("You are currently in Stealth Mode. To log into the Cloud, you need to disable Stealth Mode first."),