Skip to content

Copy button on code blocks should appear on hover (like Claude) or be sticky (like ChatGPT) #28942

Closed as not planned

Description

@majdabusaleh1

Describe the feature

When opencode displays a code block in the CLI, the copy icon is positioned at the top of the block. For long code blocks, the user must scroll back up to reach the copy button before they can copy, which is inconvenient.

Requested behavior

Either approach would be an improvement:

  1. On hover (like Claude) — When the user moves their mouse over the code block, show the copy icon at the top-right (LTR) or top-left (RTL)
  2. Sticky/always visible (like ChatGPT) — Keep the copy icon fixed at the top-right (LTR) or top-left (RTL) at all times

The key point is that the user shouldn't have to scroll back to the start of a long code block just to reach the copy button.

Activity

  1. github-actions commented on May 23, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The issue does not use one of the required issue templates. Feature requests must use the Feature Request template, include the verification checkbox, and have a title starting with [FEATURE]:.

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be related to existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on May 23, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

    Feel free to open a new issue that follows our issue templates.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions