Skip to content

Studio chat: open a long conversation at its end while the empty composer eases - #18493

Merged
danielhanchen merged 1 commit into
mainfrom
ci/thread-open-pinned-after-composer-shrink
Nov 19, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
ci/thread-open-pinned-after-composer-shrink

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

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.

Before and after: a long conversation opened in the thread test page

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: 🔄 Running

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

Review Status Commit Review trigger
📝 Code Review 🔄 Running since 2026-11-19T15:49:02.258095Z 7785fd9 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.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 19, 2026
@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 7785fd9086

ℹ️ 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".

@danielhanchen
danielhanchen merged commit c9e9110 into main Nov 19, 2026
@danielhanchen
danielhanchen deleted the ci/thread-open-pinned-after-composer-shrink branch November 19, 2026 15:54
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