Skip to content

feat: guided first-run onboarding builds the catalog in-TUI#12

Merged
atyrode merged 1 commit into
mainfrom
feat/first-run-onboarding
Jul 16, 2026
Merged

feat: guided first-run onboarding builds the catalog in-TUI#12
atyrode merged 1 commit into
mainfrom
feat/first-run-onboarding

Conversation

@atyrode

@atyrode atyrode commented Jul 16, 2026

Copy link
Copy Markdown
Owner

Running code with no catalog now opens a guided first-run instead of an empty routing panel:

  1. why — explains the catalog, lists exactly which two files will be written, promises omp config is untouched
  2. scanomp models --json in-process (or picks up an existing models file and skips straight to review)
  3. review — the guessed cheap/regular/smart ladder per provider, with prices, flagged "sanity-check it"
  4. build — renders the catalog and hands off seamlessly into the normal generator

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) code

Tested: 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

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
atyrode enabled auto-merge (squash) July 16, 2026 22:54
@atyrode
atyrode merged commit 013b8a4 into main Jul 16, 2026
1 check passed
@atyrode
atyrode deleted the feat/first-run-onboarding branch July 17, 2026 00:03
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.

1 participant