Restore first-run welcome before provider setup - #718
Merged
Conversation
Unconfigured launches jumped straight into model setup and skipped the orange mountain plus product line. Gate setup on settings.onboarded, show the welcome surface first, and stamp onboarded only after it completes so returning users still open setup directly.
TheGreatAxios
commented
Aug 29, 2026
TheGreatAxios
left a comment
Collaborator
Author
There was a problem hiding this comment.
Review: hotfix #718 — first-run welcome gate
Reviewed the PR diff against the stated hotfix criteria (fresh gating, onboarded skip, markOnboarded / settings preservation, TUI lifecycle, tests, CHANGELOG claims).
Verdict
No blocking correctness issues — merge-ready once CI is green. (Could not formally Approve: GitHub rejects self-approval on own PR.)
Evidence
Fresh first-run gating (src/tui/onboarding.ts)
- Gate is
trueGlobalSettings?.onboarded !== trueagainstglobalSettingsPath()(TRUE global), thenrunWelcome→markOnboarded(trueGlobalPath)→ load provider write-target →runProviderSetup. - Matches desired order: mountain +
Corbits Code, your local software factory→ provider setup. - Cancel path returns
1without stamping or opening setup.
Already-onboarded skip
onboarded: trueon the TRUE global file skips welcome and opens setup directly (covered byonboarding.test.ts).
markOnboarded / settings preservation
- Existing settings are loaded after
markOnboarded, so same-path provider merge (mergeProviderIntoSettings/ OAuth{...base}) keepsonboarded. --configwrite targets stay independent; onboarded lives only on the TRUE global (same contract as telemetry).- Reuses existing
markOnboarded(disk-fresh, no OAuth token injection). Persistence unit tests still pass.
TUI lifecycle
welcome.tsmirrorsprovider-setupteardown: clear interval/timeout →keyInput.off→destroySubtree→renderer.destroy()only when the renderer is owned.- Settle is idempotent; external harness renderers are not destroyed by
runWelcome. - No resize listener registered (nothing to leak). Sequential welcome→setup renderer create/destroy matches the existing setup→TUI pattern.
Tests
- Local:
bun test src/tui/welcome.test.ts src/tui/onboarding.test.ts→ 12 pass;onboarded-persistence→ 3 pass;bun run typecheckclean. - Gate ordering, skip, cancel, copy, mark-grid fit, key continue / Ctrl+C / auto-advance are covered and deterministic (injected
now/autoAdvanceMs).
CHANGELOG / docs
- Unreleased Fixed note and
IMPLEMENTATION.mdblurb match the change; do not overclaim restoring every-start Ink animation.
Non-blocking notes (should-fix / file-for-later)
- Should-fix (coverage): no explicit assertion that an unconfigured
--configlaunch withonboarded: trueonly on the TRUE global skips welcome (logic is correct by inspection). - File-for-later: welcome does not refit the mark on terminal resize; line truncation uses
String.slice(ASCII product line today — fine).
Recommended permanent tests (do not implement here)
--configunconfigured + TRUE-globalonboarded: true→ call order["setup"]only.- Same-path fresh flow already asserts
persisted.onboarded === trueafter provider submit — keep that.
This was referenced Aug 29, 2026
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
Unconfigured first launches were skipping the welcome mountain and going straight into provider/model setup (v0.3.8 regression). This hotfix restores a first-run welcome gate that shows the orange mountain and the line
Corbits Code, your local software factory, then continues into provider setup. Users withsettings.onboardedstill open setup directly.Changes
src/tui/welcome.ts— standalone welcome surface reusingrenderMark/ mark gridsrunOnboardingonsettings.onboarded; callmarkOnboardedafter continueTest plan
bun test src/tui/welcome.test.ts src/tui/onboarding.test.tsbun run typecheckbun run checkDo not merge/release from this PR without an explicit follow-up.