Skip to content

🤖 fix: prevent open-time transcript layout flash#3140

Open
ammar-agent wants to merge 1 commit intomainfrom
fix/transcript-open-layout-flash
Open

🤖 fix: prevent open-time transcript layout flash#3140
ammar-agent wants to merge 1 commit intomainfrom
fix/transcript-open-layout-flash

Conversation

@ammar-agent
Copy link
Copy Markdown
Collaborator

Summary

Prevent the chat transcript from flashing when opening a non-streaming workspace whose cached history reveals additional transcript chrome without appending a new latest message.

Background

The transcript already had a synchronous bottom-pinning path for send-time footer changes, but opening cached history could still reveal UI like the older-history button after hydration finished. Because that transition does not change latestMessageId, the transcript could paint one frame at the old scroll position before the async auto-scroll path corrected it.

Implementation

  • broadened ChatPane's pre-paint transcript pinning effect so it also reacts to hydration and older-history button visibility changes
  • kept the fix localized to the existing synchronous bottom-pin path instead of adding new async coordination
  • added a UI regression test that simulates cached transcript open and verifies the transcript stays pinned when the older-history control appears

Validation

  • bun test ./tests/ui/chat/bottomLayoutShift.test.ts
  • make static-check

Risks

Low. The change only expands when the existing auto-scroll-owned bottom-pinning layout effect runs, and the regression test covers the newly-fixed open-time path.


Generated with mux • Model: openai:gpt-5.4 • Thinking: xhigh • Cost: $6.19

Keep ChatPane's synchronous transcript bottom-pinning effect in sync when
hydration-gated transcript chrome appears without changing the latest message.
Add a regression test covering the older-history button path on cached
transcript open.

---

_Generated with `mux` • Model: `openai:gpt-5.4` • Thinking: `xhigh` • Cost: `$6.19`_

<!-- mux-attribution: model=openai:gpt-5.4 thinking=xhigh costs=6.19 -->
@ammar-agent
Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

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

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