Skip to content

fix(web): composer text no longer rewraps when the expand button appears - #80

Merged
asfires merged 1 commit into
mainfrom
fix/composer-expand-gutter
Sep 18, 2026
Merged

asfires merged 1 commit into
mainfrom
fix/composer-expand-gutter

Conversation

@asfires

@asfires asfires commented Sep 18, 2026 •

Copy link
Copy Markdown
Owner

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-height on its own element from the resize observer callback, which runs after layout and before paint, and the button is shown by a CSS group-has variant keyed on that attribute. It lands in the same frame as the height change and costs no render. The isComposerExpandAvailable state 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.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS size:S and removed size:XS labels Sep 18, 2026
@asfires
asfires force-pushed the fix/composer-expand-gutter branch from 84a8a02 to 8a6552e Compare September 18, 2026 20:04
@asfires asfires changed the title fix(web): composer text no longer rewraps when the expand button appears fix(web): move the composer expand button into the toolbar Sep 18, 2026
@asfires asfires changed the title fix(web): move the composer expand button into the toolbar fix(web): composer text no longer rewraps when the expand button appears Sep 18, 2026
@asfires
asfires force-pushed the fix/composer-expand-gutter branch from 06fabed to 53f4199 Compare September 18, 2026 20:17
@github-actions github-actions Bot added size:S and removed size:XS labels Sep 18, 2026
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
asfires force-pushed the fix/composer-expand-gutter branch from 53f4199 to 5c987b0 Compare September 18, 2026 20:23
@github-actions github-actions Bot added size:M and removed size:S labels Sep 18, 2026
@asfires
asfires merged commit a9c235f into main Sep 18, 2026
5 checks passed
@asfires
asfires deleted the fix/composer-expand-gutter branch September 18, 2026 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant