Skip to content

agent_ui: Fix button to copy the command from terminal calls not appearing#51191

Merged
danilo-leal merged 1 commit intozed-industries:mainfrom
OmChillure:fix-no-copy-command
Mar 10, 2026
Merged

agent_ui: Fix button to copy the command from terminal calls not appearing#51191
danilo-leal merged 1 commit intozed-industries:mainfrom
OmChillure:fix-no-copy-command

Conversation

@OmChillure
Copy link
Copy Markdown
Contributor

@OmChillure OmChillure commented Mar 10, 2026

Fixes #51048

The "Copy Command" button uses .visible_on_hover(group) from GPUI to only appear when the user hovers over its parent container. In render_collapsible_command (used to render the code blocks for terminal tool calls like "Run Command"), the parent v_flex() container was missing the .group() assignment. This caused the copy button to never become visible, which became apparent when an agent session was restored from history.

This commit adds .group(group.clone()) to the root v_flex() container in render_collapsible_command to restore the hover visibility for the "Copy Command" button.

Video :
Screencast from 2026-03-10 18-06-57.webm
Screencast from 2026-03-10 18-06-01.webm

Release Notes:

  • Agent: Fixed an issue where the "Copy Command" button would not appear on hover for terminal tool calls.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 10, 2026
@danilo-leal danilo-leal changed the title fix no copy command agent_ui: Fix button to copy the command from terminal calls not appearing Mar 10, 2026
Copy link
Copy Markdown
Member

@danilo-leal danilo-leal left a comment

Choose a reason for hiding this comment

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

Thanks, good catch! 👍

@danilo-leal danilo-leal enabled auto-merge (squash) March 10, 2026 12:46
@danilo-leal danilo-leal merged commit 01e8df4 into zed-industries:main Mar 10, 2026
33 checks passed
@zelenenka zelenenka added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No Copy Command in resumed session of Zed Agent

3 participants