Conversation
Greptile SummaryThis PR wires first-run users through the feature tour before setup, introduces explicit revisit flows from Settings, extracts a shared Key changes:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["/onboarding\nWelcome Screen"] -->|first-run| B["/onboarding/features?source=setup\nFeature Tour"]
A -->|returning user\n?source=revisit| C["/onboarding/features?source=settings\nFeature Tour"]
A -->|returning user\nOpen BrowserOS| H["/home"]
B -->|Continue Setup| D["/onboarding/steps/1?source=setup\nStep 1 · About You"]
C -->|Revisit Guided Setup| D2["/onboarding/steps/1?source=settings\nStep 1 · About You"]
C -->|Start Using BrowserOS| H
D --> E["/onboarding/steps/2?source=setup\nStep 2 · Sign In"]
D2 --> E2["/onboarding/steps/2?source=settings\nStep 2 · Sign In"]
E -->|Skip| F["/onboarding/demo?source=setup\nStep 3 · First Task"]
E2 -->|Skip| F2["/onboarding/demo?source=settings\nStep 3 · First Task"]
E -->|Magic Link / Google| G[(authRedirectPathStorage\n= /onboarding/demo?source=...)]
E2 -->|Magic Link / Google| G
G -->|auth completes| CB[MagicLinkCallback\nreads stored path]
CB --> F
CB --> F2
F --> H
F2 --> H
I[Settings Sidebar] -->|Explore Features| C
I -->|Revisit Onboarding| A
Last reviewed commit: 65afe99 |
| const [hasCompletedOnboarding, setHasCompletedOnboarding] = useState(false) | ||
| const isRevisit = searchParams.get('source') === 'revisit' | ||
| const usesManualFlow = hasCompletedOnboarding | ||
| const showRevisitCopy = hasCompletedOnboarding || isRevisit | ||
|
|
||
| useEffect(() => { | ||
| setMounted(true) | ||
| track(ONBOARDING_STARTED_EVENT) | ||
| onboardingCompletedStorage | ||
| .getValue() | ||
| .then((completed) => setHasCompletedOnboarding(completed)) | ||
| }, []) |
There was a problem hiding this comment.
Flash of first-run UI for returning users
hasCompletedOnboarding initialises to false, so showRevisitActions is false on every first render. For a returning user who navigates to /onboarding directly (without ?source=revisit), the page paints the first-run copy ("Open-Source Agentic Browser", "Get Started") before the storage promise resolves and setHasCompletedOnboarding(true) triggers a re-render to the revisit copy. The fade-in animation makes this flash more visible rather than less.
Consider initialising the state as null to delay rendering until the storage read resolves, or at minimum keeping an isLoading flag:
const [hasCompletedOnboarding, setHasCompletedOnboarding] = useState<boolean | null>(null)
...
// defer content until storage resolves
if (hasCompletedOnboarding === null && !isRevisit) return nullThis avoids the mid-animation content swap for direct /onboarding visits from returning users.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/agent/entrypoints/onboarding/index/Onboarding.tsx
Line: 21-32
Comment:
**Flash of first-run UI for returning users**
`hasCompletedOnboarding` initialises to `false`, so `showRevisitActions` is `false` on every first render. For a returning user who navigates to `/onboarding` directly (without `?source=revisit`), the page paints the first-run copy ("Open-Source Agentic Browser", "Get Started") before the storage promise resolves and `setHasCompletedOnboarding(true)` triggers a re-render to the revisit copy. The fade-in animation makes this flash more visible rather than less.
Consider initialising the state as `null` to delay rendering until the storage read resolves, or at minimum keeping an `isLoading` flag:
```tsx
const [hasCompletedOnboarding, setHasCompletedOnboarding] = useState<boolean | null>(null)
...
// defer content until storage resolves
if (hasCompletedOnboarding === null && !isRevisit) return null
```
This avoids the mid-animation content swap for direct `/onboarding` visits from returning users.
How can I resolve this? If you propose a fix, please make it concise.
Summary
/homeSOUL.md, custom skills, bring-your-own model keys, and scheduled tasks/hometab when multiple tabs are openKey Changes
/homeinline chat to consume targeted onboarding search actions, while sidepanel chat ignores new-tab-targeted actionsVerification
bunx biome check apps/agent/entrypoints/app/App.tsx apps/agent/entrypoints/newtab/index/NewTab.tsx apps/agent/entrypoints/onboarding/demo/OnboardingDemo.tsx apps/agent/entrypoints/onboarding/index/Onboarding.tsx apps/agent/entrypoints/onboarding/steps/CapabilitiesStep.tsx apps/agent/entrypoints/onboarding/steps/ImportChromeStep.tsx apps/agent/entrypoints/onboarding/steps/LaunchStep.tsx apps/agent/entrypoints/onboarding/steps/ManagedAppConnectionCard.tsx apps/agent/entrypoints/onboarding/steps/StepOne.tsx apps/agent/entrypoints/onboarding/steps/StepScaffold.tsx apps/agent/entrypoints/onboarding/steps/StepTransition.tsx apps/agent/entrypoints/onboarding/steps/StepTwo.tsx apps/agent/entrypoints/onboarding/steps/StepsLayout.tsx apps/agent/entrypoints/onboarding/steps/steps.ts apps/agent/entrypoints/sidepanel/index/useChatSession.ts apps/agent/lib/onboarding/buildOnboardingLaunchPrompt.ts apps/agent/lib/onboarding/launchOnboardingChat.ts apps/agent/lib/onboarding/onboardingStorage.ts apps/agent/lib/onboarding/syncOnboardingProfile.ts apps/agent/lib/search-actions/searchActionsStorage.tsbun run --filter @browseros/agent typecheck/home/homechat auto-starting with the personalized onboarding prompt/hometabs open