Skip to content

Studio: size the composer to the message column at every width and zoom, and stop clipping thinking text - #13675

Merged
shimmyshimmer merged 3 commits into
mainfrom
studio-composer-width
Oct 14, 2026
Merged

shimmyshimmer merged 3 commits into
mainfrom
studio-composer-width

Conversation

@shimmyshimmer

Copy link
Copy Markdown
Member

What changed

The chat composer now has exactly the same width as the message column at every pane width and interface zoom.

Before, the two only lined up once the pane was wide enough for the column's max width. Below that the composer was wider than the text: 11 px per side on desktop widths, 16 to 23 px per side on phone widths. The message column is inset by the thread viewport's real scrollbar gutter plus its padding. The dock used fixed guesses for both: no inset under 768 px, 10 px above, and 12 px of padding in narrow panes.

The dock now measures the viewport's content box (border, scrollbar gutter, padding; both-edges or one-sided, LTR or RTL) and pads itself to match, re-measuring on resize. Overlay scrollbars (macOS) reserve 0 px and the Windows low-scale viewport uses a one-sided gutter, so this has to be measured, not hardcoded. The full-view dock keeps its own zero padding.

Also: the thinking block no longer cuts off list numbers and other text that hangs past the column's side edges when zoomed in. Its collapse wrapper, the wrapper's inner box and the height-capped tail used overflow: hidden, which clips sideways as well as vertically. They now clip only vertically (overflow-y: clip, overflow-x: visible), with overflow: hidden kept as the fallback where overflow: clip is unsupported (Safari before 16). min-w-0 keeps lines wrapping, since a visible x-overflow no longer lets the grid item shrink below its longest word. The capped tail's fade mask also extends into the thread's side padding, because a mask clips to its own box.

Verification

  • Isolated Studio from this branch with a seeded thread. Composer edges vs reply text measured at widths 390 / 700 / 1000 / 1440 / 1920 and interface scale 50 / 67 / 100 / 150 / 200%: all 25 combinations now differ by 0 px (on main the narrower widths were off by 11 to 23 px per side).
  • New tests/composer-column-inset.test.ts (both-edges, overlay, dock offset, one-sided LTR / RTL). Updated the source-pinned assertions in chat-column-centering.test.ts and thread-width-steps.test.ts that pinned the fixed padding.
  • Thinking block: forced list markers past the column edge (narrowed list padding) at 200%. Before, the digits were cut. After, they are fully drawn in the capped, expanded and wrapped states. Collapsed still has height 0 and shows no list items.
  • Updated reasoning-grid-collapse.test.ts and reasoning-live-tail.test.ts, which pinned the old overflow-hidden classes.
  • npm run typecheck, npm run build, npm test.

At a 390 px phone width with 150% or higher interface zoom, the mic and send buttons already wrap to a second row on main. At 200% the slightly narrower composer also wraps the Skills icon.

Not tested here: the Desktop app's webview zoom and Windows classic scrollbars (the one-sided path is covered by the unit test).

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T01:59:55.990486Z 8413025 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 84130256cb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shimmyshimmer
shimmyshimmer merged commit 2bb3b63 into main Oct 14, 2026
@shimmyshimmer
shimmyshimmer deleted the studio-composer-width branch October 14, 2026 05:15
shimmyshimmer added a commit that referenced this pull request Oct 16, 2026
…p app (#13965)

## What changed

In the macOS Desktop app the chat column sat about 13 px left of the
composer whenever the system shows classic scroll bars (a mouse
attached, or "Show scroll bars: Always"). The text, headings and list
bullets started left of the composer's edge and ended short of its right
edge.

The cause is WebKit's `scrollbar-gutter: stable both-edges` on the
thread viewport. It reserves the gutter twice on the right side, while
`clientWidth` only counts it once. The dock worked out the column's box
from those numbers (#13675), so in WKWebView it centred the composer 13
px to the right of the real column. Chromium (browser, WebView2)
reserves one gutter per side and was already correct.

The dock now reads the column's edges straight from the viewport footer.
That footer is a full-width child of the thread viewport, so its box is
the box the messages are laid out in, whatever the engine does with the
gutter. It is mounted whenever the dock is. The computed box stays as
the fallback until the footer is in the DOM.

## Verification

- Reproduced in a WKWebView host (the engine Tauri uses on macOS) with
classic 13 px scroll bars. On `main` the message column was at
x=475..1219 and the composer at 488..1232. With this change both edges
match (0 to 0.1 px) at page zoom 50, 67, 80, 100, 125, 150, 175 and 200%
and window widths 900, 1440 and 1920.
- Chromium (overlay and classic scroll bars, Windows user agent) and
Playwright WebKit already matched on `main` across widths 390 to 1920
px, emulated zoom 50 to 200% and interface scale 50 to 200%. This change
does not alter those (same footer box).
- New unit case in `tests/composer-column-inset.test.ts`.
- `npm run typecheck`, `npm test`, `npm run build`. `biome check`
reports no new findings in the changed files.

Before and after in a WKWebView host at 100% zoom with classic scroll
bars. Before, the text starts 13 px left of the composer. After, both
edges line up:

![before and
after](https://raw.githubusercontent.com/shimmyshimmer/unsloth-staging-4/pr-media/pr/13965/before_after_wkwebview-c5a6301f48f8.png)

Not tested here: a signed Desktop build itself, and WebKitGTK on Linux.

---------

Co-authored-by: Unsloth <[email protected]>
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.

1 participant