[PR #11422] fix(desktop): user prompt message animation lags on close #13784

Closed
opened 2026-02-16 18:18:37 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11422

State: closed
Merged: No


What does this PR do?

This PR fixes the animation when closing expanded messages. On dev, the expanded user messages used max-height: 2000px in CSS. When collapsing, the browser animated from 2000px → 64px (collaped height). If the expanded height was a lot smaller than 2000px, there was quite a bit of "dead" space where nothing visibly moved, making it feel laggy.

The fix sets maxHeight to the element's actual scrollHeight via JS. Now the animation starts immediately from the real content height, eliminating the perceived delay.

Fixes #11419.

How did you verify your code works?

Testing on the desktop.

Before

https://github.com/user-attachments/assets/bd1f47db-967d-4fa8-9eab-34d58463a97f

After

https://github.com/user-attachments/assets/6f06a9a4-b261-4686-9129-6815ae189af0

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11422 **State:** closed **Merged:** No --- ### What does this PR do? This PR fixes the animation when closing expanded messages. On dev, the expanded user messages used max-height: 2000px in CSS. When collapsing, the browser animated from 2000px → 64px (collaped height). If the expanded height was a lot smaller than 2000px, there was quite a bit of "dead" space where nothing visibly moved, making it feel laggy. The fix sets maxHeight to the element's actual scrollHeight via JS. Now the animation starts immediately from the real content height, eliminating the perceived delay. Fixes #11419. ### How did you verify your code works? Testing on the desktop. #### Before https://github.com/user-attachments/assets/bd1f47db-967d-4fa8-9eab-34d58463a97f #### After https://github.com/user-attachments/assets/6f06a9a4-b261-4686-9129-6815ae189af0
yindo added the pull-request label 2026-02-16 18:18:37 -05:00
yindo closed this issue 2026-02-16 18:18:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13784