Skip to content

fix(tui): open authorization links - #40912

Merged
kitlangton merged 2 commits into
v2from
auth-open-v2
Aug 6, 2026
Merged

fix(tui): open authorization links#40912
kitlangton merged 2 commits into
v2from
auth-open-v2

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Make OAuth device authorization links keyboard-accessible in the TUI. The waiting dialog now advertises o open, while c copy remains available as the manual fallback.

Before / After

Before: The authorization URL was visible and mouse-clickable, but keyboard users could only copy the device code or URL and open it manually.

After: Pressing o opens the authorization URL in the default browser. If browser launch fails, the dialog shows an error directing the user to copy the URL. Rendered links also use OpenTUI's native <a href> element so supported terminals receive hyperlink metadata.

How

  • packages/tui/src/component/dialog-integration.tsx registers the modal o command and renders its key hint.
  • packages/tui/src/ui/link.tsx renders the shared link through OpenTUI's native anchor element while preserving mouse opening.

Scope

This only changes automatic OAuth/device authorization dialogs. Manual code-entry dialogs are unchanged.

Testing

  • bun typecheck from packages/tui
  • bun run test test/cli/cmd/tui/integration-options.test.ts from packages/tui
  • Full repository typecheck via the pre-push hook
  • Real isolated PTY walkthrough with termctrl, from /connect through the OpenCode Console authorization dialog

Demo

Fresh isolated TUI showing o open and c copy in one action row. The displayed authorization attempt was canceled immediately after capture.

OAuth authorization dialog with horizontally aligned o open and c copy actions

@kitlangton
kitlangton merged commit c66d841 into v2Aug 6, 2026
1 check passed
@kitlangton
kitlangton deleted the auth-open-v2 branch August 6, 2026 19:26
github-actionsBot pushed a commit to ReStranger/opencode that referenced this pull request Aug 7, 2026
* upstream/v2: (84 commits)
fix(core): align shell output limits (anomalyco#41007)
feat(core): bound tool output (anomalyco#40929)
refactor(app): remove legacy layout (anomalyco#40947)
refactor(core): simplify file tools to lexical paths (anomalyco#40962)
fix(core): default custom agents to primary (anomalyco#40880)
fix(core): migrate legacy small model (anomalyco#40966)
fix(tui): dismiss stale permission prompts (anomalyco#40960)
fix(tui): use tab layout setting (anomalyco#40952)
fix(tui): keep model selection session scoped (anomalyco#40913)
feat(ai): expose model compatibility options (anomalyco#40942)
feat(cli): add session import and export (anomalyco#40914)
fix(core): deduplicate websearch consent prompts (anomalyco#40869)
test(core): cover config precedence
feat(tui): enable cwd-scoped session tabs by default
feat(core): normalize mixed config formats (anomalyco#40919)
fix(tui): simplify MCP status rows (anomalyco#40916)
fix(tui): compact single-line prompts (anomalyco#40924)
fix(config): omit unset optional values (anomalyco#40918)
fix(tui): open authorization links (anomalyco#40912)
refactor(mcp): remove unused registration status (anomalyco#40904)
...
Sign up for freeto 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

@kitlangton