Repository navigation
feat(app): sign in to OpenCode Go and Console through the browser - #50267
Merged
Merged
Conversation
OpenCode Go and OpenCode (Zen) now start the Console device sign-in as soon as they are picked, open the browser automatically, and keep the API key path behind an Advanced toggle. The dialog holds one stable state until the authorization URL is ready, hidden form fields no longer render as empty inputs, abandoned attempts are cancelled, and models unlocked by the new connection are shown in the picker. Adds a /connect command matching the TUI and the Console setup steps.
Console sign-in returns Go models inside the opencode provider, so checking for an opencode-go provider always failed and produced a misleading toast.
Load the integration through a guarded store instead of createResource: the dialog runs under the opener's Suspense boundary, so a pending resource read blanked the whole route while the integration loaded. Also show the API key switch directly instead of behind an Advanced toggle.
Hona
force-pushed
the
console-onboarding
branch
from
September 21, 2026 21:35
f2f79a7 to
2b9c4bb
Compare
The Console sign-in is shared, but a Go service-account key must still be stored where it was before so the zen/go/v1 provider keeps working.
… OpenCode mark as its icon
Console-managed providers such as opencode-go connect through the opencode integration, so the connected list now follows integrationID instead of the provider id (it showed Go as Config with no Disconnect). Credential connections carry their method so an OAuth grant is tagged Account rather than API key.
The connect dialog's busy state read the controller's initial pending state, so providers with several methods never left the spinner. Start idle, hide the Console API key link until the integration has loaded, pass the workspace directory to /connect directly, and regenerate the OpenAPI documents for the new credential method field.
4 of 6 tasks
3 tasks done
Hona
added a commit
that referenced
this pull request
Sep 24, 2026
Resolve against browser sign-in for OpenCode Go and Console (#50267): route opencode and opencode-go through the Console device flow on every platform, keep Desktop-only return-window and client ID handling, and restore v2 behavior for other integrations. Remove the Desktop onboarding Playwright suite.
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.
Desktop onboarding for OpenCode Go / OpenCode Console. Picking either provider now goes straight to the Console sign-in in the browser; the API key path is a small link at the bottom.
Before → after
opencode-gointegration only has a key method → API key form, no Console optionopencodeConsole device sign-in (consoleIntegration("opencode-go") → "opencode")Connect opencode-go/Connect Anomaly / OpenCode→ method list → empty text input + Continue (hiddenserverfield rendered) → code viewConnect OpenCode→Opening your browser…→ waiting view. Two states, no method list, no empty fieldplatform.openExternal(url)as soon as the attempt starts (same asopencode auth login), plus an Open browser buttonintegration.oauth.cancelon cleanup / method switchshow. Console sign-in returns Go models inside theopencodeprovider, so Go models are includedDefault / OpenCode Gotagged Config with no Disconnect;Default / OpenCodetagged API keyprovider.integrationID(opencode) → tagged Account, Disconnect on both;Connection.CredentialInfogainsmethod: "key" | "oauth"(schema + core + regenerated client)OpenCodewith the Zen "Z" glyphOpenCode Consolewith the OpenCode mark (integration.namein core,provider-icons/sprite.svg)/connectprovider.connect, slashconnectController (
packages/app/src/providers/connect/controller.ts)The integration is loaded through a guarded store rather than
createResource.useDialogcapturesgetOwner()at the call site (packages/ui/src/context/dialog.tsx:173), so the dialog lives under the opener's<Suspense>(shell.tsx:116); reading a pending resource there (latest → read() → SuspenseContext.increment()) blanked the whole route behind the dialog.The dialog passes
autoSelectfor Console providers so theoauthmethod starts without a menu; other providers keep the method list. Client ID becomesopencode-desktopfor the Console URL on desktop, so the Console page reads "Authorize OpenCode Desktop".Screenshots: I could not capture the review-pane tab (not visible), so none attached yet. Flow verified against the live server in the web app: two dialog states, browser tab opened to
console/login?next=/console/device?user_code=…, API key link → key → back returns to sign-in.