Skip to content

feat(sessions): Scrollable & collapsible queued-messages dock#2904

Merged
charlesvien merged 1 commit into
mainfrom
posthog-code/queue-overflow-collapse
Jul 6, 2026
Merged

feat(sessions): Scrollable & collapsible queued-messages dock#2904
charlesvien merged 1 commit into
mainfrom
posthog-code/queue-overflow-collapse

Conversation

@arthurdedeus

@arthurdedeus arthurdedeus commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Problem

While the agent is running, follow-up messages you submit get queued in a dock pinned above the composer. That dock had no height cap, scroll, or collapse — so with several long messages it grew unbounded, pushing the composer down, cropping the input at the bottom, and hiding the conversation above.

Closes #3150

Before

Before — a long queue pushes the composer down and crops the input

Changes

  • Overflow — the queued-messages dock is now height-capped (max-h-[30vh]) and scrolls internally, so a long queue never pushes the composer off-screen. Added shrink-0 to the composer block in SessionView so the input is never compressed below its (now bounded) height; the flex-1 conversation thread yields the space instead.
  • Collapse — a header row (N queued + caret) toggles the queue open/closed, backed by new per-task queueCollapsedByTaskId view-state in sessionViewStore (ephemeral, defaults to expanded, and survives the dock unmounting between turns). The live count stays visible while collapsed.
  • Reuses the existing in-repo collapse pattern — @radix-ui/react-collapsible + phosphor carets, as in ProgressGroupView/SidebarSection — and the max-h … overflow-y-auto scroll idiom. The per-message Steer / Return to editor / Discard actions are unchanged.

After — expanded (scrolls instead of growing past the composer)

After — expanded, scrollable queue with 12 messages, input fully visible

After — collapsed

After — collapsed queue, composer fully visible

Testing

  • New QueuedMessagesDock.test.tsx — default-expanded shows every message with a count, the overflow classes are present, the header toggle collapses/expands the list (count persists), and an empty queue renders nothing.
  • turbo typecheck, Biome lint, and the sessions component suite (100 tests) all pass.
  • Manually verified in the running app (screenshots above).

Created with PostHog Code

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 9918a6a.

@arthurdedeus arthurdedeus requested a review from a team June 24, 2026 14:45
@greptile-apps

greptile-apps Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(sessions): Make the queued-messages..." | Re-trigger Greptile

A long queue of follow-ups no longer pushes the composer off-screen or crops
it: the dock is height-capped and scrolls internally, and a header toggle
collapses it. Adds per-task collapse view-state in sessionViewStore.

Generated-By: PostHog Code
Task-Id: 36c7f9ac-946a-403b-8b7f-c2dd5e3f66fd
@charlesvien charlesvien force-pushed the posthog-code/queue-overflow-collapse branch from d5e98e0 to 9918a6a Compare July 6, 2026 22:09
@charlesvien charlesvien enabled auto-merge (squash) July 6, 2026 22:12
@charlesvien charlesvien merged commit 4d568cc into main Jul 6, 2026
24 checks passed
@charlesvien charlesvien deleted the posthog-code/queue-overflow-collapse branch July 6, 2026 22:17
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.

we probably need a way of visually shortening multiple long queued messages

2 participants