feat(onboarding): auto-launch routing and at-most-once guard - #440
Merged
Merged
Conversation
- 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)
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
jeonghun-jj-lee
marked this pull request as ready for review
August 19, 2026 17:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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), returnsshow-webview | open-chat | resume-chat-at-stage | normal-sessionisModelConfigured(path): checks opencode config file for provider entries (JSONC-tolerant)OnboardingLauncherclass: at-most-once guard pattern —tryLaunch()fires the correct action once per window lifetime;onWebviewSuccess()handles Stage 0 → chat transitionreadWelcomeShown/writeWelcomeShown: persistent flag for animation-played stateAcceptance Criteria coverage
Design note
This slice delivers the tested logic layer (predicate + launcher). The actual wiring into
extension.ts'sactivate()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 returningresume-chat-at-stagefor partial state.Closes #434