Repository navigation
fix(ui): prevent overlapping text in collapsed user messages - #134833
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Land-ready proof for head The collapsed-user-message CSS was the owner: the legacy line clamp compressed hidden paragraph boxes, and browser descendant reveal exposed overlapping text. The fix clips the natural Markdown layout to five chat line heights and keeps the existing overflow observer and expand/collapse path. Exactly two files changed: production +3/−3 (net 0) and tests +168/−7. Short users, assistants, complete expansion, adjacent bubbles, transcript anchoring, and Markdown alignment remain covered. Failing-first desktop/mobile tests failed against the original CSS, then 15 tests in 3 suites passed, followed by a final 4-test disclosure pass. Commands: OPENCLAW_CAPTURE_UI_PROOF=1 OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS=900000 node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-user-bubble-disclosure.e2e.test.ts ui/src/e2e/chat-transcript-disclosure-anchor.e2e.test.ts ui/src/e2e/chat-markdown-alignment.e2e.test.ts
node scripts/check-changed.mjs -- ui/src/styles/chat/text.css ui/src/e2e/chat-user-bubble-disclosure.e2e.test.ts
git diff --checkThe final focused rerun used the first command with only Inspected synthetic proof already attached to this PR: desktop before → after; mobile before → after. Limits: reload alone was clean; the exact original historical payload/browser version was not retained. Visual proof uses isolated Chromium desktop/mobile viewports, not physical devices or other engines. The initial cold-build watchdog stopped before assertions; successful runs used the existing build-inactivity allowance above, with no test deadlines changed. Initial TS2532 check errors were corrected before the final passing proof. Latest ClawSweeper state has no published actionable findings or Rank-up moves; its pending review is not being claimed as completed. |
|
Merged via squash.
|
What Problem This Solves
Resolves a problem where text in long, collapsed Control UI user messages can overlap when a browser reveals a later paragraph inside the preview. The failure was reproduced independently with synthetic history and a browser
scrollIntoViewIfNeededoperation after reload.Reload alone was clean in the isolated reproductions. The trigger is revealing content inside the collapsed preview. The exact historical payload and browser version from the original report were not retained; the regression demonstrates the same visual bug class with a synthetic fixture.
Why This Change Was Made
The legacy five-line clamp compresses later Markdown paragraph boxes, while
overflow: hiddenstill permits browser-driven internal scrolling. Revealing those paragraphs exposes text that overlaps neighboring paragraphs. A bounded five-chat-line-height preview preserves the full natural Markdown layout instead, reusing the existing overflow observer, chevron, and expansion path.This removes the legacy box/clamp declarations without adding another renderer, measurement path, dependency, or configuration option. Production LOC is +3/-3 (net zero). Tests are +168/-7. No Gateway, provider, protocol, or persistent-state changes are included.
User Impact
Long user prompts remain readable when browser reveal operations bring later text into view. The compact preview, complete expanded prompt, short user messages, assistant messages, and adjacent transcript positioning remain covered.
Evidence
check:changed, formatting, andgit diff --checkpassed. Independent blocking-priority review found no actionable findings.Focused behavior proof:
Scoped checks:
One initial local cold-build attempt hit the runner's 300-second no-output watchdog during global setup, before assertions. The completed proof used the existing build-inactivity allowance shown above; no product timeout or test assertion deadline was changed. That build-progress issue is a separate tooling follow-up.
Browser proof covers isolated Chromium at desktop and mobile viewport sizes. Other browser engines and physical mobile devices were not tested. The focused patch, disclosure owner, direct renderer callers, Markdown path, virtualizer, test files, and mocked Gateway harness are unchanged on the selected current-main base; hosted CI validates the published head.