Repository navigation
Studio: keep the composer one row tall inside a conversation - #18447
Merged
Merged
Conversation
Member
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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
pushed a commit
to shimmyshimmer/unsloth-staging-4
that referenced
this pull request
Nov 19, 2026
[skip ci]
danielhanchen
added a commit
that referenced
this pull request
Nov 19, 2026
…oser eases (#18493) ## Summary The long-chat gate in Frontend CI (`tests/studio/playwright_thread_window.py`, run by "Frontend build + bundle sanity") fails intermittently on `main`: ``` AssertionError: the thread opened 6px above its end ``` It failed on the staging `upstream-main` Frontend CI run and 2 of 3 local runs on `main`. A user sees the same thing: opening a long conversation can land a few pixels above its last message, with the "scroll to bottom" arrow showing. ## Root cause Bisected to #18447 ("keep the composer one row tall inside a conversation"). The check passed 3 of 3 on its parent and failed on it. #18447 is right to give the new-chat screen a two-row floor and a conversation a one-row floor. The side effect is in `Thread`'s composer-height effect. Any growth of the composer calls `detachFromBottom()` ("as if the user scrolled up"), which is meant for a draft that grows while typing. The editor eases its height over 280ms, so when a conversation opens while the empty composer is still easing up to the new-chat floor, a late growth frame (120px to 126px in the traces) lands after the thread is seeded. That detaches the freshly opened conversation, and the spacer shrink that follows is deferred because the thread is no longer at its end. The thread rests 4 to 9px above its last message. ## Changes - `components/assistant-ui/thread.tsx`: composer growth detaches the thread only while the composer holds a draft (text or attachments) and no run is active. An empty composer only grows as its row floor eases, which is not the user reading back, so it no longer strands a conversation above its end. Growth from typing a multi-line draft detaches exactly as before. No change to the composer's sizes or animation, or to #18447's floors. ## Testing | | `main` | this branch | |---|---|---| | Full `playwright_thread_window.py` | 2 of 3 failed | 3 of 3 passed | | Scripted opens of the 400-message thread ending more than 2px above the end | 8 of 18 | 0 of 18 (all at 1 to 2px) | - `npm run typecheck`: passes. - The guard is the existing CI check; it fails on `main` and passes here. ## Screenshot The same 400-message thread opened in the long-chat test page (`smoke-thread-weight.html`, what CI drives). Before, on `main`, it opened 4px above its end and shows the scroll-to-bottom arrow; after, it opens at its end. 
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.
Studio: keep the composer one row tall inside a conversation
#18074 raised the empty composer from one row to two (
COMPOSER_MIN_ROWS = 2, a 64px editor instead of 40px) so a new chat has room to start typing. Inside a conversation that extra row only pushed the messages up and made the docked composer read as a large empty box.Now the empty editor reserves two rows only on the new chat screen (
thread.isEmpty) and one row once a conversation exists. Typing still grows the box the same way, up to the window-based row limit from #18074.components/assistant-ui/thread.tsx: the min editor height is(16 + 24 * (threadEmpty ? COMPOSER_MIN_ROWS : 1)) * uiSpaceScale.tests/ui-font-size-scales-spacing.test.ts: pins the one-row rule for the main composer; Compare's shared composer keeps two rows.Verification
npm run typecheckandnpm test(16735 passed, 0 failed) on a branch that included this change.Not covered
features/chat/shared-composer.tsx) is unchanged and still reserves two rows.