Repository navigation
fix(ui): soften collapsed user prompts and center their toggle - #150037
vyctorbrzezowski merged 1 commit into
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 16, 2026, 8:24 AM ET / 12:24 UTC. ClawSweeper reviewWhat this changesThe PR softens the clipped edge of long user prompts, centers their expansion toggle, and extends browser coverage across themes, widths, and image-bearing messages. Merge readiness✅ Ready for maintainer review This remains a useful, narrowly scoped visual improvement with convincing screenshot evidence and no actionable patch defects found. Current main lacks the requested styling, and the member-authored PR is protected from cleanup closure. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI renders user messages received from the Gateway into chat bubbles. Its existing disclosure component determines when long text is collapsed; this change adjusts only that component’s presentation. flowchart LR
A[Gateway message history] --> B[User message renderer]
B --> C[Existing disclosure eligibility]
C --> D[Rendered overflow check]
D --> E[Collapsed preview and fade]
D --> F[Full text without fade]
E --> G[Show more toggle]
G --> F
Before mergeNone. Agent review detailsSecurityNone. PR surfaceSource +15, Tests +73. Total +88 across 2 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Technical reviewBest possible solution: Keep the existing disclosure owner and apply the bounded CSS refinement while preserving message content, overflow thresholds, and bubble geometry. Do we have a high-confidence way to reproduce the issue? Not applicable as a broken-behavior reproduction: this is visual refinement. Current source and inspected before screenshots establish the hard edge and uneven spacing. Is this the best way to solve the issue? Yes. The patch reuses the existing overflow decision and changes presentation without adding state, handlers, or another rendering path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against ce1eb0fb3e2e. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Closes #150024
What Problem This Solves
Long user prompts end at a hard clipped edge, and their Show more toggle sits too close to the text.
Why This Change Was Made
A light alpha mask softens only the final visible line when the collapsed text overflows. The existing toggle visibility determines whether the mask applies. Moving the toggle down 6 px (3 px on image-bearing text surfaces) balances the space without changing bubble height.
User Impact
Collapsed prompts have a softer edge and a centered Show more control. Expanded prompts retain clear text and the same centered Show less control. Short prompts, bubble colors, padding, corner radii, the five-line clamp, and disclosure thresholds stay unchanged.
Evidence
Before: parent
809c4dfc151906f3e021ac94049b647754ba9912. After: this change. Captures use the real Control UI with a synthetic Gateway, the same Riley messages, loaded fonts, Chromium on Linux, and 2× pixels at 1440 px and 390 px viewport widths. Expanded screenshots show the end of the prompt and its toggle; grouped collapsed screenshots include the unchanged short follow-up.All 16 state pairs retain identical bubble width, height, padding, background, and radius. Pixel comparisons preserve the grouped short message exactly and restrict expanded-state differences to the toggle. The ordinary bubble's gaps change from 8 / 19.69 px to 14 / 13.69 px (above / below), a 0.31 px difference, within the 1 px tolerance. Its collapsed height remains 164.69 px. Image-bearing text surfaces pass the same tolerance in browser tests with a 3 px toggle adjustment.
The rulers below measure the space from the clipped content to the toggle and from the toggle to the inside bottom edge of the bubble.
Validation:
oxfmt, scopedstylelint, andgit diff --check: pass.node scripts/check-changed.mjs -- ui/src/styles/chat/text.css ui/src/e2e/chat-user-bubble-disclosure.e2e.test.ts: pass (durable exit 0; every guard, typecheck, export scan, and lint stage passed).pnpm ui:buildandnode --import ./scripts/tsx.mjs scripts/check-control-ui-performance.mts: pass without a baseline update. Startup JS: 359,901 B gzip; startup CSS: 48,377 B gzip, below the 51,200 B hard ceiling (above its 46,080 B advisory target).Risk and coverage
The shared user Markdown disclosure serves ordinary and image-bearing transcript messages; both pass the real browser matrix. New-session draft previews and side-chat questions provide no expansion callback, task activity renders assistant text, and JSON uses its separate disclosure, so those consumers do not enter the changed selectors. Assistant messages and PR-list disclosures remain outside this CSS scope.
No production JavaScript, stored state, expansion policy, bubble surface tokens, or interaction handlers change. The existing five-line natural-layout clipping remains intact. Visual and geometry proof uses Chromium at the default text size; Safari and Firefox were not run.