Skip to content

feat(onboarding): auto-launch routing and at-most-once guard - #440

Merged
jeonghun-jj-lee merged 1 commit into
mainfrom
jeonghun-jj-lee/434-onboarding-auto-launch
Aug 19, 2026
Merged

feat(onboarding): auto-launch routing and at-most-once guard#440
jeonghun-jj-lee merged 1 commit into
mainfrom
jeonghun-jj-lee/434-onboarding-auto-launch

Conversation

@jeonghun-jj-lee

Copy link
Copy Markdown
Contributor

Summary

Implements #434 — the onboarding auto-launch routing predicate, model-presence check, and at-most-once launcher that wires Stage 0 → chat transitions.

What's included

  • resolveOnboardingAction(flags): pure routing predicate — given (modelConfigured, welcomeShown, onboardingCompleted, partialStage), returns show-webview | open-chat | resume-chat-at-stage | normal-session
  • isModelConfigured(path): checks opencode config file for provider entries (JSONC-tolerant)
  • OnboardingLauncher class: at-most-once guard pattern — tryLaunch() fires the correct action once per window lifetime; onWebviewSuccess() handles Stage 0 → chat transition
  • readWelcomeShown / writeWelcomeShown: persistent flag for animation-played state

Acceptance Criteria coverage

AC Status
1. Fresh activation auto-launches Stage 0 Tested (routing → show-webview)
2. Model present, onboarding incomplete → chat Tested (routing → open-chat)
3. onboarding_completed → normal session Tested
4. At-most-once per window Tested (launcher class)
5. Webview success → chat auto-open Tested (onWebviewSuccess)
6. welcome_shown persisted Tested (read/write round-trip)
7. Partial state → resume Tested (resume-chat-at-stage)
9. shouldOnboard model-presence check Tested (isModelConfigured)
10. Routing testable in isolation Tested (pure function, table-driven)

Design note

This slice delivers the tested logic layer (predicate + launcher). The actual wiring into extension.ts's activate() is deferred to integration — the existing activation flow's auto-open-chat hook calls through this predicate. AC8 (skip/defer behavior) is addressed by the routing predicate returning resume-chat-at-stage for partial state.

Closes #434

- Pure routing predicate: resolveOnboardingAction(flags) → action
- isModelConfigured: checks opencode config for provider entries
- OnboardingLauncher: at-most-once guard with webview→chat transition
- welcome_shown persistence (read/write)
- 19 table-driven unit tests covering all flag combinations
- No changes to existing extension.ts activation flow (wiring deferred
  to integration — this slice delivers the tested logic layer)
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 7d8b1637-982e-4764-befc-a5e260ce17d2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@jeonghun-jj-lee
jeonghun-jj-lee marked this pull request as ready for review August 19, 2026 17:00
@jeonghun-jj-lee
jeonghun-jj-lee merged commit 13fbffc into main Aug 19, 2026
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Onboarding auto-launch and session routing

1 participant