You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ce0d3af
Browse filesBrowse the repository at this point in the historyBrowse files
fix: scope the shouldSkipOnboardingAtStartup discriminator to a genuine first-run completion
cubic (3986532221) correctly flagged this as a regression introduced by the round-7
shouldSkipOnboardingAtStartup fix, not a pre-existing follow-up: `setupComplete()` is a global
flag set by ANY model selection (`markSetupComplete()`, called from `DialogModel` on every pick),
not only a first-run/impatient-picker completion. A RETURNING user (e.g. an existing Big Pickle
user) who did an ordinary `/model` switch while app.tsx's startup effect was still settling made
`setupComplete()` true too, falling through to the `onboardingReady()` branch and firing
`onboarding_started`/`onboarding_completed`/`scan_gate_shown` telemetry plus `openScanGate()` for
a routine model change — not a genuine first run.
Fix: `firstRunOpenedThisLaunch` (altimate-onboarding.tsx) is a new one-way latch, set only when
the first-run picker actually opens THIS launch — app.tsx's own startup fallthrough, or the
prompt gate's equivalent (component/prompt/index.tsx now calls `markFirstRunActive()` there too,
closing the gap cubic named explicitly). app.tsx's `shouldSkipOnboardingAtStartup` call site now
passes `setupComplete() && firstRunOpenedThisLaunch()` instead of the bare global flag — true
only for a genuine same-launch first-run completion, so a returning user's routine switch reads
false and keeps skipping exactly as before this whole discriminator existed.
Tests: two new tests in local.test.ts exercise the real production signals
(markSetupComplete/markFirstRunActive/firstRunOpenedThisLaunch) against the actual discriminator
computation app.tsx performs — a returning user's routine switch must skip (no telemetry, no
scan gate), a genuine first-run completion must not skip. Confirmed the second test fails when
the `firstRunOpenedThisLaunch` latch is temporarily removed, then passes again restored.
Removed the corresponding item from tracking issue #1303 (fixed directly, not deferred).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
0 commit comments