fix(desktop): mount onboarding from frame 1 to kill the FOUT

Default onboarding.configured to null (unknown until the runtime check resolves) and have the onboarding overlay render whenever it's not yet confirmed true. The boot overlay now yields to it, so the very first paint is the Welcome card with a "While we get you set up..." progress strip instead of a flash of the chat shell between boot dismiss and onboarding mount.

The picker swaps in cleanly once the gateway opens and the runtime check confirms the user is not configured. Already-configured users see the same prep card briefly while their existing runtime warms up, then the overlay dismisses without touching the chat shell.
This commit is contained in:
Brooklyn Nicholson
2026-05-08 07:54:53 -04:00
parent 11d04d9d5e
commit 2d0aa1b7cb
3 changed files with 58 additions and 5 deletions
+4 -2
View File
@@ -27,7 +27,9 @@ export type OnboardingFlow =
| { message: string; provider?: OAuthProvider; start?: OAuthStartResponse; status: 'error' }
export interface DesktopOnboardingState {
configured: boolean
/** null until the first runtime check resolves; lets the overlay render
* during boot without flickering for already-configured users. */
configured: boolean | null
flow: OnboardingFlow
mode: OnboardingMode
providers: null | OAuthProvider[]
@@ -41,7 +43,7 @@ export interface OnboardingContext {
}
const INITIAL: DesktopOnboardingState = {
configured: true,
configured: null,
flow: { status: 'idle' },
mode: 'oauth',
providers: null,