Skip to content

GPU Boxes: fix the gpushed API host; approve CLI sign-ins in the browser - #9

Merged
mehfuzh merged 1 commit into
mainfrom
gpushed-api-host
Nov 14, 2026
Merged

mehfuzh merged 1 commit into
mainfrom
gpushed-api-host

Conversation

@mehfuzh

@mehfuzh mehfuzh commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Two gpushed changes for the web app.

1. Call the gpushed API at gpushed-api.smartloop.ai

The GPU Boxes page showed "Could not load your GPU box details". It called api.smartloop.ai/v1/gpushed, but api.smartloop.ai is a Supabase custom domain, so the Cloudflare Worker route there never ran and every request got Supabase's 404. The gpushed API now has its own host (smartloop-labs/gpushed#6).

  • GPUSHED_ENDPOINT is now https://gpushed-api.smartloop.ai, with a GPUSHED_URL override in next.config.mjs for local development (like SLP_BASE_URL).
  • Same smartloop session token. A CORS preflight from https://app.smartloop.ai returns 204 with access-control-allow-origin: https://app.smartloop.ai.

2. /gpushed/cli-login: approve a CLI sign-in

gpushed login now signs in in the browser (smartloop-labs/gpushed#14). It opens /gpushed/cli-login?code=XXXX-XXXX, and this page:

  • sends you through /login?redirect=… first if you're signed out, then brings you back with the same code;
  • shows the code, asking you to approve only if your terminal shows the same one;
  • on Approve, calls POST /auth/cli/approve on the gpushed API with your session, then tells you to go back to the terminal;
  • shows the API's error if the code has expired (10 minutes) or was already used.

It isn't behind the superuser-only redirect that /gpushed has, so any smartloop user can sign the CLI in.

Checks: tsc --noEmit passes, and next build compiles and exports /gpushed/cli-login.

Order: merge smartloop-labs/gpushed#14 first; it adds the /auth/cli/* routes. Until then, Approve returns a 404.

🤖 Generated with Claude Code

api.smartloop.ai/v1/gpushed never reached the gpushed Worker:
api.smartloop.ai is a Supabase custom domain, so the Worker route on it
never ran and the GPU Boxes page got a 404 ("Could not load your GPU box
details"). The API now has its own host. GPUSHED_URL overrides it for
local development.
@mehfuzh
mehfuzh merged commit 36c39b9 into main Nov 14, 2026
1 check passed
@mehfuzh
mehfuzh deleted the gpushed-api-host branch November 14, 2026 08:36
@mehfuzh mehfuzh changed the title GPU Boxes: call the gpushed API at gpushed-api.smartloop.ai GPU Boxes: fix the gpushed API host; approve CLI sign-ins in the browser Nov 14, 2026
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