Skip to content

Agentic UI: fix copy button space in chat - #4334

Open
nightnei wants to merge 2 commits into
trunkfrom
agenticFixCopyButtonSpace
Open

Agentic UI: fix copy button space in chat#4334
nightnei wants to merge 2 commits into
trunkfrom
agenticFixCopyButtonSpace

Conversation

@nightnei

Copy link
Copy Markdown
Contributor

Related issues

How AI was used in this PR

AI assisted with the fix, I reviewed and tested

Proposed Changes

We have a huge space after messages in chat due to the hidden Copy button. This PR fixes it to have a rational space

BEFORE AFTER
Screenshot 2026-07-24 at 15 58 22 Screenshot 2026-07-24 at 15 57 36

Testing Instructions

  1. Open new Agentic UI
  2. Send any massege
  3. Mouse over that message
  4. Assert that the copy button appeared and the UX is good - it's easily achievable and clickable

@nightnei
nightnei requested review from bcotrim and sejas July 24, 2026 15:22
@nightnei nightnei self-assigned this Jul 24, 2026
@wpmobilebot

wpmobilebot commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing ddef58d vs trunk

app-size

Metric trunk ddef58d Diff Change
App Size (Mac) 1375.46 MB 1381.96 MB +6.50 MB 🔴 0.5%

site-editor

Metric trunk ddef58d Diff Change
load 1080 ms 1073 ms 7 ms ⚪ 0.0%

site-startup

Metric trunk ddef58d Diff Change
siteCreation 6986 ms 6995 ms +9 ms ⚪ 0.0%
siteStartup 2356 ms 2365 ms +9 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I found that it overlaps with the next message:

Image

Could we maybe align it to the right?

@nightnei

nightnei commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Great catch @bcotrim, thanks.
I took a completely different approach to keep copy button inlined to avoid regressions in the future and aligne margins. I think it looks good.
@shaunandrews WDYT?
Screenshot 2026-07-27 at 18 02 17

@bcotrim bcotrim left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The spacing looks better now, thanks for the adjustment!

It seems we offer the copy option after each "text section" which I think it's too much.
I would say 1 copy after the last agent reply plus another for some particular sections (for example code) would be enough, in my opinion, and it would fix the spacing issue.

Example:

Image

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants