feat: guided first-run onboarding builds the catalog in-TUI#12
Merged
Conversation
When code starts with no catalog and no explicit CODE_GENERATED, a guided onboarding takes over instead of an empty routing panel: it explains why a catalog is needed, scans the user's omp model list (or picks up an existing models file), shows the guessed per-pool ladder for review, renders the catalog in-process, and hands off seamlessly to the normal generator. - onboarding.go: self-contained wrapper tea.Model; forwards WindowSizeMsg to the wrapped TUI so the hand-off renders correctly; passes the suggest-box capabilities through so ctrl+o stays alive post-hand-off; quitting mid-onboarding returns the wrapper, so main() launches nothing. - generate_init.go: scaffoldModels() extracted (pure) + ompModelsJSON seam for tests; CLI behavior unchanged. - generate.go: loadCatalogBytes() split out so the scaffold can be reviewed before touching disk. - An explicit but broken CODE_GENERATED stays visible as the usual empty panel (operator config error, not a first run). Tested: full scan flow, existing-models-file path, error remedy + retry, quit-without-hand-off. Docs updated (README quickstart, configuration). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
atyrode
enabled auto-merge (squash)
July 16, 2026 22:54
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.
Running
codewith no catalog now opens a guided first-run instead of an empty routing panel:omp models --jsonin-process (or picks up an existing models file and skips straight to review)Never triggers for wrapped/dotfiles use: an explicit
CODE_GENERATED(even a broken one) bypasses onboarding entirely.Preview locally:
CODE_GENERATED= XDG_CONFIG_HOME=$(mktemp -d) XDG_DATA_HOME=$(mktemp -d) codeTested: scan flow end-to-end, existing-file path, error remedy + retry (omp missing / single provider), quit-returns-wrapper (no accidental launch). Suggest-box capabilities pass through the wrapper so ctrl+o works after hand-off.
🤖 Generated with Claude Code