Skip to content

feat(app): match the TUI integration dialog in desktop - #56106

Open
opencode-agent[bot] wants to merge 2 commits into
devfrom
desktop-integration-parity
Open

opencode-agent[bot] wants to merge 2 commits into
devfrom
desktop-integration-parity

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

The desktop connect dialog now follows the TUI's DialogIntegration, which is the reference behavior.

What changed

Integration list

  • The title is "Connect an integration". Groups are MCP first, then Popular (Console, Go, OpenAI, GitHub Copilot, Anthropic, Google; the TUI now lists Console before Go as well), then Services.
  • Each connected row shows its account label, or "N connections", with a check.
  • A connection that needs a fresh sign-in shows Sign in required →.
  • Integrations that only read environment variables are disabled and labelled "Environment only".
  • The Recommended badges and taglines are gone, because the TUI doesn't have them. The "Custom OpenAI-compatible provider" entry stays.

Methods

  • OpenCode Go connects with its own methods (an API key), the same as the TUI. Choosing it no longer starts the Console sign-in.
  • OpenCode Console lists its real methods ("OpenCode Console account", "API key (service account)") in the same list every integration uses. The device-code view after sign-in hasn't changed.
  • Methods follow the TUI's order: sign-ins first, API keys last. The "Browser" hint that showed on API keys is gone.
  • command methods (for example well-known auth.command logins) now run. The dialog streams their output while it waits. Before, they were dropped and a fake API key form appeared instead.
  • An integration with no interactive methods no longer gets that fake API key form.

Auth forms

  • Fields are asked one at a time, like the TUI, so when conditions see every earlier answer.
  • These field types now work: string choices with "type your own answer", yes/no, multiselect (with custom values and min/max), number and integer, and external "Open link, then I finished" steps.
  • Before, any field that wasn't a string made the method fail with "unsupported fields".

Accounts

  • "Add account" is the first row, as in the TUI.
  • An account that needs a sign-in shows "Sign in required" on its row. Selecting it opens its link or starts a new sign-in.
  • Removing the last account disconnects the integration and closes the dialog.

After connecting

  • Every connection, including a second account, shows a toast and then that provider's model choice. Before, only the very first connection did this.
  • When the dialog is opened from the composer (model picker, unpaid dialog, /connect), the chosen model applies to that composer instead of opening a new draft tab.
  • MCP integrations close the dialog instead, because they have no models.
  • The desktop model picker now has a "Connect an integration" item, like the TUI's model dialog.

The English copy changed in two places: command.provider.connect is now "Connect an integration" and dialog.provider.accounts.add is now "Add account". New keys are English only. Keys that are no longer used were removed from every locale.

Demo

https://github.com/anomalyco/opencode/releases/download/pr-56106-video/desktop-integration-dialog-tui-parity.mp4

This was recorded from this branch's real desktop dev build (packages/desktop, bun dev) under Xvfb, with an isolated home.

The demo-only data has two parts:

  • A local plugin adds "Acme" integrations so a command login, every form field type, an expired sign-in and an environment-only integration are visible.
  • The API keys are fake.

Checks

  • bun typecheck passes in packages/app.
  • The unit tests pass: providers, settings, runtime and composer, 389 tests.
  • oxlint (including the anti-slop rules) and prettier are clean on the changed files.
  • E2E: the provider tests in settings.spec.ts were updated for the new behavior.
    • Locally, the new Console method-list, Go key, lone-method and add-Console-account tests pass.
    • Three provider tests that use function-valued integration fixtures fail the same way on origin/dev locally: the mock /api/integration returns 500 in this environment.
    • The mobile picker tests also fail locally on origin/dev.
    • CI should decide those.

Requested by: @thdxr (dax via Slack)

The desktop connect dialog now follows the TUI's DialogIntegration:

- 'Connect an integration' with MCP, Popular (TUI order) and Services groups
- rows show the connected account or N connections, Sign in required, and
  disable environment-only integrations
- OpenCode Go connects with its own methods instead of the Console sign-in
- every integration lists its own methods, API keys last, including Console
- command auth methods run and stream their output
- forms support boolean, multiselect, external link and number fields
- account view puts Add account first, signs expired accounts in again, and
  closes after the last account is removed
- every connection continues to that provider's models for the current composer
- the model picker gets a Connect an integration entry

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks sound. The packages/app type check passes, and the provider, settings, runtime and composer unit tests pass (389/389, the same as on the base). I couldn't open the desktop dialog in this environment, so I checked the behaviour by reading the code next to the TUI's DialogIntegration rather than by clicking through it. Your demo video covers the visual side.

Public API: no change. This is app-only UI and i18n work. It only uses existing server endpoints (integration.command.*, integration.oauth.*, integration.connect.*).

I have no concerns that would block a merge. OpenCode Go now connects through its own opencode-go methods instead of the Console sign-in, and that fixes the desktop report where it stored a Console credential.

Fixes #50611
Related: #52243

This branch has not been deployed

No deployments
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