Repository navigation
fix(flow-chat): fit collapsed user bubbles to preview text - #3612
Merged
Merged
Conversation
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.
Summary
Fix user messages whose short opening lines sit beside a large empty area because a hidden later line still determines the collapsed bubble's width. Collapsed bubbles now size from the first three explicit text lines, within a compact width cap; expanding restores the full text and lets the bubble grow leftward and downward from its fixed right edge.
Type and Areas
Type: Bug fix / UI
Areas: Web UI FlowChat; generated MiniApp chat stylesheet
Motivation / Impact
CSS line clamping only clipped the painted text and did not remove hidden long lines from intrinsic sizing. Keep the suffix in DOM order but outside collapsed layout, preserve reference capsules and full-message copy/edit behavior, and use a generated ellipsis without changing text offsets. Windows line endings stay one break even across adjacent persisted text segments. Short messages remain content-sized; narrow panes retain the shared width limit. Editing and the expanded height limit are unchanged.
Checked refreshed upstream main and open PRs (including drafts) before implementation; no existing change covered this sizing cause. The generated MiniApp stylesheet is synchronized with its FlowChat owner.
Verification
pnpm --dir src/web-ui exec node scripts/run-vitest.mjs run --maxWorkers=50% src/flow_chat/components/modern/userMessagePreview.test.ts src/flow_chat/components/modern/UserMessageItem.test.tsx src/flow_chat/components/modern/UserMessageItemActions.test.ts src/flow_chat/selection/flowChatSelection.test.ts src/flow_chat/components/modern/MessageExportControls.test.tsx src/flow_chat/components/modern/useSubmittedMessageMotion.test.tsx— 79 tests passed. Includes real compiled CSS in DOM fixtures for collapsed/expanded suffix visibility and complete message copying, plus export and submission-motion regressions.pnpm run check:web— passed (type checking, typography, Appearance, color and visual contracts).pnpm --dir src/web-ui exec tsc --noEmit— passed after the line-ending follow-up.node --test scripts/generate-miniapp-chat-styles.test.mjs— passed.pnpm run motion:audit— inventory reviewed; no layout animation or viewport write added.git diff --check— passed.Reviewer Notes
AI-assisted, with automated verification. Native UI interaction verification is pending under the local FlowChat guide; no new screenshots were captured.
No persisted message, transport or capability contract changes. Live Remote Workspace, Remote Control, Peer Device and Detached Dispatch scenarios were not exercised. Mobile Remote Control has a separate message renderer; the standalone MiniApp currently uses expanded user bubbles.
Checklist