Skip to content

fix(tui): open authorization links - #40905

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

fix(tui): open authorization links#40905
kitlangton merged 2 commits into
v2-migrationfrom
auth-dialog-open

Conversation

@kitlangton

@kitlangton kitlangton commented Aug 6, 2026

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 ac13ae1 into v2-migration Aug 6, 2026
1 check passed
@kitlangton
kitlangton deleted the auth-dialog-open branch August 6, 2026 19:21
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