fix(web): composer text no longer rewraps when the expand button appears - #80
Merged
Merged
Conversation
asfires
force-pushed
the
fix/composer-expand-gutter
branch
from
September 18, 2026 20:04
84a8a02 to
8a6552e
Compare
asfires
force-pushed
the
fix/composer-expand-gutter
branch
from
September 18, 2026 20:17
06fabed to
53f4199
Compare
The editor only reserved the expand control's right gutter once the control became visible, so typing past the third line rewrapped the whole prompt. Reserve the gutter at all times on desktop. The control also appeared a frame or two after the height change that reveals it, because its visibility waited for an animation frame and then a render of the whole composer. A long paste showed the scrollbar first, then the button, then a shorter scrollbar. The editor now flags its own height with a data attribute from the resize observer, which runs before paint, and the control's visibility is plain CSS keyed on that attribute. Model: Claude Fable 5.1 via Claude Code.
asfires
force-pushed
the
fix/composer-expand-gutter
branch
from
September 18, 2026 20:23
53f4199 to
5c987b0
Compare
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.
Problem
On desktop, the composer editor added its right padding for the expand button only once the button became visible, which happens when the prompt grows past its minimum height. Typing onto the fourth line therefore narrowed the text column and rewrapped the entire prompt mid-typing.
The button also appeared a frame or two late. Its visibility waited for an animation frame and then a render of the whole composer, so a long paste showed the scrollbar first, then the button, then the scrollbar shrinking to make room for it.
Change
The editor reserves the button's gutter, and the scrollbar offset below it, at all times on desktop. The button appears in space that was already empty and the text never moves. The compact resting composer and mobile are unchanged.
The button's visibility no longer goes through React state. The editor sets
data-beyond-minimum-heighton its own element from the resize observer callback, which runs after layout and before paint, and the button is shown by a CSSgroup-hasvariant keyed on that attribute. It lands in the same frame as the height change and costs no render. TheisComposerExpandAvailablestate is gone; the existing callback remains only to collapse the composer when the prompt shrinks back.Before/after images are not attached; Adam verifies in the dev app.
Model: Claude Fable 5.1 via Claude Code.