Skip to content

🤖 fix: pin queued follow-ups above chat input to prevent jumpy scroll#2661

Open
ethanndickson wants to merge 6 commits intomainfrom
chat-input-gg08
Open

🤖 fix: pin queued follow-ups above chat input to prevent jumpy scroll#2661
ethanndickson wants to merge 6 commits intomainfrom
chat-input-gg08

Conversation

@ethanndickson
Copy link
Member

Summary

This PR moves queued follow-up messages out of the scrollable transcript and into a fixed banner directly above the chat input. The queued UI is now explicit and action-oriented (Edit + Send now), with a bubble-style card inside the banner so queued content is clearly distinguishable from other banners.

Background

At narrow/mobile viewport widths, transcript layout changes during bash/tool handoffs caused visible scroll jumps. The core issue was that the queued message lived inside the scroll container, so any upstream/downstream height change (tool card expand/collapse, streaming footer, barriers) displaced it and forced visible snapping.

Key investigation outcomes:

  • Delaying bash handoff collapse/expand helped one transition but did not solve global resize snaps.
  • JS distance-from-bottom compensation was clobbered by existing hard auto-scroll behavior.
  • column-reverse improved one class of jump but introduced end-of-stream footer regressions.

Conclusion: the robust fix is structural—remove queued UI from transcript scroll flow.

Implementation

  • Move queued user follow-up render from the transcript list to ChatInputPane (fixed area above ChatInput).
  • Replace transcript bubble-style queued UI with a pending-review-style banner + inner queued card:
    • Title: Queued
    • Message content stacked below title
    • Explicit actions: Edit, Send now
    • Attachment/review count indicators
  • Keep queued agent-task prompt behavior separate from user queued follow-ups; render it as a transcript bubble (not bannerized).
  • Add focused UI tests for queued banner/card structure and actions.
  • Polish spacing and action styling:
    • Send now now matches Edit visual tone
    • Reduced extra whitespace under message content

Validation

  • make static-check
  • bun test ./tests/ui/chat/queuedMessageBanner.test.tsx
  • bun test ./tests/ui/chat/sendModeDropdown.test.ts

Risks

  • Low-to-medium UI layout risk around banner stacking order near existing ReviewsBanner/warnings.
  • Behavior risk is low: queue semantics and backend APIs were intentionally unchanged.

Generated with mux • Model: openai:gpt-5.3-codex • Thinking: xhigh • Cost: $4.64

@ethanndickson
Copy link
Member Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 667c460774

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

Comment on lines +30 to +31
const previewText =
message.content || (hasAuxiliaryContent ? auxiliaryPreview : "Queued message ready");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Strip serialized review blocks from queued preview text

When a user queues a message with attached reviews (for example during an active stream), message.content can contain model-formatted review payloads like <review>…</review> generated by formatReviewForModel, and this banner now renders that raw string directly. In this fixed-position area that can expose internal markup and large code snippets to users, making the queued preview noisy and misleading; the previous UserMessageContent path stripped these tags when structured reviews were present. Please derive preview text from cleaned content (or from reviews metadata) instead of rendering message.content verbatim.

Useful? React with 👍 / 👎.

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