fix(code): collapse long queued messages instead of filling the viewport#3223
Merged
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Queued messages with large pasted content (code blocks etc.) previously rendered at full height, so a couple of queued messages could consume the entire conversation viewport. Extract UserMessage's existing measured collapse pattern (160px cap, fade gradient, Show more/less toggle) into a shared CollapsibleMessageContent component and use it for queued messages too, so both message types share one overflow affordance. Generated-By: PostHog Code Task-Id: 93b789ce-d9c1-434c-909e-ebfc4cbd1f46
Removed again in the next commit; referenced by SHA from the PR body. Generated-By: PostHog Code Task-Id: 93b789ce-d9c1-434c-909e-ebfc4cbd1f46
The image stays fetchable via the previous commit's SHA. Generated-By: PostHog Code Task-Id: 93b789ce-d9c1-434c-909e-ebfc4cbd1f46
2977e0a to
aa232fa
Compare
|
React Doctor found 1 issue in 1 file · 1 warning. 1 warning
Reviewed by React Doctor for commit |
Removed again in the next commit; referenced by SHA from the PR body. Generated-By: PostHog Code Task-Id: 93b789ce-d9c1-434c-909e-ebfc4cbd1f46
The image stays fetchable via the previous commit's SHA. Generated-By: PostHog Code Task-Id: 93b789ce-d9c1-434c-909e-ebfc4cbd1f46
Contributor
|
Reviews (1): Last reviewed commit: "chore: remove temporary PR asset" | Re-trigger Greptile |
jonathanlab
approved these changes
Jul 7, 2026
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.

Why
Queued messages render their full content in the conversation list. A couple of queued messages with large pasted code blocks consume the entire viewport, making the conversation unreadable (see Before below).
What
UserMessage's existing measured collapse pattern (160px cap,scrollHeightmeasurement on mount, fade gradient, Show more/less toggle) into a sharedCollapsibleMessageContentcomponent.QueuedMessageViewnow uses it, so queued messages collapse exactly like regular user messages instead of growing unbounded.UserMessagemigrated to the shared component — behavior unchanged (same 160px threshold, gradient, and toggle).classNameandstyleprops.Before / After
(mock-up rendered with the component's exact styles — current rounded-card queued design: same two queued messages, same 620px viewport; before overflows it, after fits both with room to spare)
Test plan
pnpm typecheckgreen across all 23 packages (re-run after rebasing onto thepackages/uisplit).pnpm --filter @posthog/ui test— 1290 tests pass (no tests exist for these presentational components; behavior is unchanged forUserMessageand purely additive for queued messages).styleprop) is fixed in this diff.Created with PostHog Code