Skip to content

Text Selection in Dialog Captures Background Content in iTerm2 #6996

Closed

Description

@boojongmin

Description

GitHub Issue: Text Selection in Dialog Captures Background Content in iTerm2

Title

Text selection in authorization dialog includes content outside dialog boundaries when using Cmd+Click or drag selection in iTerm2

Description

When using opencode in iTerm2, the OAuth authorization dialog has text selection issues that make it difficult to copy the authorization URL.

Environment

  • Terminal: iTerm2
  • Application: opencode (TUI)

Problem

The authorization dialog displays a URL that needs to be copied, but text selection behaves incorrectly:

  1. Cmd+Click selection: Only selects text from the clicked line, missing the full URL
  2. Drag selection: Selects text outside the dialog boundaries, capturing background terminal content

Expected Behavior

  • Text selection should be constrained to the dialog content only
  • Users should be able to easily select and copy the complete authorization URL

Example of incorrectly selected text:

https://claude.ai/oauth/authorize?
                                                                                      code=true&client_id=9d1c250a-e61b-44d9-88ed-
                                                                                      5944d1962f5e&response_type=code&redirect_uri=https%3A%2F
                                                                                      %2Fconsole.anthropic.com%2Foauth%2Fcode%2Fcallback&scope
                                                                                      =org%3Acreate_api_key+user%3Aprofile+user%3Ainference&co
                                                                                      de_challenge=2Wy5LVaiONMHHw2yuf-CXveSoVvugkKnlzwdz4x9W88
                                                                                      &code_challenge_method=S256&state=uzVmwAC-e4nIhjiPKnmgMj
                                                                            ┃         2VLNhio_5Qi6b4pwdx4kd1ihj40bq0mobkkAh5ky_j53WdIhkPAr8brc
                                                                            ┃  Ask a  A1qzwz3Q
Image

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. changed the title [-]GitHub Issue: Text Selection in Dialog Captures Background Content in iTerm2[/-] [+]Text Selection in Dialog Captures Background Content in iTerm2[/+] on Jan 5, 2026
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 5, 2026
  3. github-actions commented on Jan 5, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  4. kommander commented on Jan 5, 2026

    @kommander
    Contributor

    That looks like terminal native selection. Are you selecting with a modifier like shift when drag selecting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions