feat: [AI-7520] Altimate LLM Gateway CLI signup + onboarding UX

Merged
SA
4mo ago
+22158-352

Summary

CLI onboarding for the Altimate LLM Gateway + a welcoming first-run experience, plus quick sign-in/out commands.

Gateway sign-in

  • Loopback (:7317) + browser → web sign-up page → credential delivered back to the CLI; saved to ~/.altimate/altimate.json (overridable via ALTIMATE_WEB_URL).
  • On success, an inline green "Authentication successful" confirmation that auto-selects a model and auto-closes (no drop into the model picker).
  • Don't force Google: the CLI lands on the sign-up page and lets the user choose their method.

First-run experience

  • WelcomePanel boot box on the home screen with readiness-aware tips (/connect → /discover); update toast suppressed until a model is ready.
  • useReady/markSetupComplete gate the first-run chat lock (unlocks after connecting, choosing Big Pickle, or picking a ready model).

Provider picker

  • /connect opens the curated DialogModelWelcome — top 5 providers (Altimate Gateway first) + "Search all providers…", a Big Pickle fallback, and a bright-green ✓ "selected" marker on the currently-active provider/model.
  • The /model dialog is restructured into READY / NEEDS-SETUP sections.

New TUI commands

  • /auth — start the Altimate LLM Gateway sign-in directly (DialogAltimateAuth).
  • /logout — clear the saved gateway credential (AltimateApi.clearCredentials), disconnect, and reload.

Rebase safety

  • Onboarding code isolated into an altimate-owned component/altimate-onboarding.tsx; dialog-model.tsx trimmed to pristine useConnected + the marked DialogModel restructure, so future upstream (opencode) merges have a minimal, clearly-marked conflict surface. No behavior change.

Test plan

  • /connect → Altimate LLM Gateway → browser → provisioned + connected
  • Gateway key authenticates (/agents/v1/models → 200)
  • /auth launches gateway sign-in; /logout clears creds + disconnects
  • Selected provider shows the green ✓
  • bun run typecheck clean

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added Altimate onboarding with a curated welcome picker, a guided scan/skip Part 2 dialog, and updated connect/auth/logout flow.
    • Introduced Altimate Gateway browser sign-in and improved onboarding routing for model/provider selection.
    • Added starter-sample setup with safe reuse and “install alongside” support (including DuckDB sample).
    • Added local binary installer script (replace.sh).
  • Bug Fixes
    • Fixed readiness/“connected” detection so missing pricing info no longer marks models as connected.
    • Hardened first-run behavior so update confirmations don’t interrupt initial onboarding.
  • Chores
    • Added and updated tests for the starter sample and onboarding flows; improved ignore rules for demo assets.