fix: improve copy button UX in AI assistant responses#358
Merged
Conversation
dobrinyonkov
self-requested a review
July 2, 2026 08:12
dobrinyonkov
approved these changes
Jul 2, 2026
dobrinyonkov
added a commit
that referenced
this pull request
Jul 2, 2026
Two incoming commits from master: 0fbafcb feat(elements-registry): highlight control on row hover (#359) — clean auto-merge e6f9e4b fix: improve copy button UX in AI assistant responses (#358) — resolved manually The AIChat.js and AIChat.spec.js conflicts were resolved by taking HEAD, since those files were substantially restructured by this refactor branch: the message rendering, streaming, and copy-button logic now live in AssistantTranscript, driven by AssistantController. The two behaviour deltas from PR #358 were then ported into AssistantTranscript: - Attach the copy-response button to the message element (not the header), matching the new AIChat.less layout (display: block on its own line). - Skip the copy-response button when the assistant message is a single code or JSON block, since those blocks already carry their own copy affordance. New helper: _isOnlyCodeOrJsonBlock. grunt test: 582 passing, lint clean.
dobrinyonkov
added a commit
that referenced
this pull request
Jul 2, 2026
Two incoming commits from master: 0fbafcb feat(elements-registry): highlight control on row hover (#359) — clean auto-merge e6f9e4b fix: improve copy button UX in AI assistant responses (#358) — resolved manually The AIChat.js and AIChat.spec.js conflicts were resolved by taking HEAD, since those files were substantially restructured by this refactor branch: the message rendering, streaming, and copy-button logic now live in AssistantTranscript, driven by AssistantController. The two behaviour deltas from PR #358 were then ported into AssistantTranscript: - Attach the copy-response button to the message element (not the header), matching the new AIChat.less layout (display: block on its own line). - Skip the copy-response button when the assistant message is a single code or JSON block, since those blocks already carry their own copy affordance. New helper: _isOnlyCodeOrJsonBlock. grunt test: 487 passing, lint clean.
Contributor
|
🎉 This PR is included in version 1.10.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Description