Skip to content

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

Draft
saravmajestic wants to merge 5 commits into
mainfrom
feat/AI-7520-social-signup-authorize
Draft

feat: [AI-7520] Altimate LLM Gateway CLI signup + onboarding UX#1001
saravmajestic wants to merge 5 commits into
mainfrom
feat/AI-7520-social-signup-authorize

Conversation

@saravmajestic

@saravmajestic saravmajestic commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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/models200)
  • /auth launches gateway sign-in; /logout clears creds + disconnects
  • Selected provider shows the green ✓
  • bun run typecheck clean

🤖 Generated with Claude Code

saravmajestic and others added 2 commits July 9, 2026 07:56
- Add an `oauth` `method:"auto"` to the Altimate auth plugin: bind a loopback
  server on `localhost:7317`, open the browser to the web authorize page,
  verify `state`, and save the gateway credential to `~/.altimate/altimate.json`
- Surface `altimate-backend` first in provider selection (TUI + clack) with the
  "Recommended · best tool-calling · 10M free tokens" hint

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uth success

- Add `WelcomePanel` boot box (readiness-aware tips + "What is Altimate Code")
  on the home screen; first run is a welcoming panel, not an auto-opened modal
- Restructure the model picker into READY / NEEDS-SETUP; add the curated
  `DialogModelWelcome` (top 5 providers + "Search all providers"), Big Pickle
  fallback, and `useReady` / `markSetupComplete`
- `/connect` opens the curated picker
- Altimate LLM Gateway sign-in confirms inline ("Authentication successful") and
  auto-closes (auto-selecting a model) instead of dropping into the model picker
- Don't force Google: land on the sign-up page and let the user choose
  (drop `google_start`); reword the sign-in instruction

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@saravmajestic saravmajestic self-assigned this Jul 9, 2026
@coderabbitai

coderabbitai Bot commented Jul 9, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 951000d4-100b-41d7-a585-04db1fcbb0fc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/AI-7520-social-signup-authorize

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

saravmajestic and others added 3 commits July 13, 2026 15:48
- /auth: sign in to the Altimate LLM Gateway directly via the OAuth loopback,
  skipping the provider picker (new `DialogAltimateAuth`)
- /logout: clear the stored gateway credential (`AltimateApi.clearCredentials`)
  and disconnect (dispose + bootstrap; the provider loader drops the now-stale
  auth-store entry on reload)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
DialogModelWelcome now tags each row with its providerID (and modelID for Big
Pickle) and compares against local.model.current(), rendering a bright-green ✓
plus a "· selected" note on the active provider — so the user can see at a glance
that e.g. Altimate LLM Gateway is already selected. Bright green (diffHighlightAdded)
is used because plain ANSI green renders dim in some terminals.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ebase safety)

Shrink our footprint on the upstream opencode `dialog-model.tsx` so future
upstream merges are easier to rebase:

- Move `useReady`/`markSetupComplete`, `DialogModelWelcome`, and
  `DialogBigPickleConfirm` into a new altimate-owned `component/altimate-onboarding.tsx`
  (zero rebase surface — our file)
- `dialog-model.tsx` (424 → 160 lines) now holds only pristine `useConnected` plus
  the `DialogModel` READY/NEEDS-SETUP restructure, fully wrapped in `altimate_change`
  markers so an upstream conflict is confined and human-resolvable
- Repoint imports in `app.tsx`, `home.tsx`, `dialog-provider.tsx`, `welcome-panel.tsx`

The onboarding file imports `DialogModel`/`useConnected` back from `dialog-model`,
but only inside callbacks/JSX — the circular reference is runtime-only and safe.
No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant