fix(tui): drop the redundant copy toast when the inline "copied" flash shows#3539
Merged
Merged
Conversation
…h shows Assisted-By: docker-agent
docker-agent
reviewed
Jul 8, 2026
docker-agent
left a comment
Contributor
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
The change cleanly splits copyTextToClipboard into a silent variant (no toast) and a thin wrapper that preserves the toast, then routes the two inline-flash click handlers through the silent path. The logic is correct and the pre-existing drag-selection / keyboard copy paths are unaffected.
gtardif
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clicking a copy button in the TUI — the "⎘ copy" label on an assistant message or the copy icon on a code block — was showing two pieces of feedback at once. The inline "copied" flash (introduced in a recent commit) would appear, and simultaneously the pre-existing "Text copied to clipboard." toast would fire. Because toasts stack and linger for 10 seconds, repeated clicks could pile them up noticeably.
The fix splits
copyTextToClipboardinclipboard.gointo two functions:copyTextToClipboardSilent(which writes to the clipboard and emitstea.SetClipboardonly) and a thin wrapper that adds the toast on top. The two click handlers inmessages.gothat already have an inline flash are switched to the silent variant. The drag-selection and keyboard "c" copy paths keep the toast since they have no other visual confirmation.