Skip to content

fix(web): keep short multiline user messages expanded - #128085

Merged
vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/user-bubble-clamp
Aug 23, 2026
Merged

vyctorbrzezowski merged 2 commits into
mainfrom
brzezowski/user-bubble-clamp

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

Closes #128083

What Problem This Solves

Fixes an issue where short multiline messages in the Control UI were collapsed after five visual lines, hiding part of a roughly 90-character prompt behind a chevron.

Why This Change Was Made

Web Control UI prompts become eligible for disclosure above 1,200 UTF-16 code units, while an exceptional 40-line cap prevents newline-heavy prompts from creating effectively unbounded bubbles. The web only installs the five-line preview for eligible messages and retains rendered-overflow measurement so long Markdown that renders short does not get a no-op toggle.

User Impact

Short Control UI prompts remain fully readable even when they contain several explicit line breaks. Long prompts still show a bounded preview with working expand/collapse controls.

Mobile Follow-up

iOS/OpenClawKit and Android are intentionally unchanged in this PR. Aligning their disclosure thresholds remains a separately scoped mobile follow-up; no new issue was opened per maintainer direction.

Evidence

Playwright before/after

Scenario Before After
Seven-line reported prompt Before: the short message is cut after five lines After: the complete short message is visible without a toggle
1,300-character prompt Before: long prompt is clamped to five lines After: long prompt remains clamped with its toggle

The same isolated mocked-Gateway flow also proves that a source over 1,200 characters whose Markdown renders within five lines gets no disclosure control.

Tests and checks

  • Pre-fix reproduction: the seven-line unit, grouped-render, and Playwright cases all failed because the disclosure wrapper/toggle was present.
  • pnpm test ui/src/pages/chat/components/chat-message-markdown — 9 passed.
  • pnpm test ui/src/pages/chat/components/chat-message — 199 passed.
  • Control UI mocked-Gateway Playwright lane — 3 passed; both final captures inspected.
  • node scripts/check-changed.mjs — passed the web-only coreTests, ui lanes, including formatting, dead-code, i18n, core/UI typechecks, and lint.
  • Final Codex autoreview against origin/main: zero accepted/actionable findings on the web-only bundle.
  • pnpm docs:list plus targeted search found no user-facing documentation for this internal threshold, so no docs update is needed.

Scope and LOC

  • Architectural owner: Control UI user-message disclosure policy; CSS remains presentation-only.
  • Removed normal-path trigger: the web's five-line eligibility trigger. The five-line clamp remains only as the eligible long-message preview.
  • Production: +6 / -12, net -6 lines.
  • Tests: +222 / -77, net +145 lines.

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 23, 2026
@clawsweeper

clawsweeper Bot commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: android App: android app: web-ui App: web-ui size: M maintainer Maintainer-authored PR labels Aug 23, 2026
@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 23, 2026 03:03
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/user-bubble-clamp branch from 0d23cce to 1a6644b Compare August 23, 2026 03:23
@vyctorbrzezowski vyctorbrzezowski removed the app: android App: android label Aug 23, 2026
@vyctorbrzezowski vyctorbrzezowski changed the title fix: keep short multiline user messages expanded fix(web): keep short multiline user messages expanded Aug 23, 2026
@vyctorbrzezowski
vyctorbrzezowski force-pushed the brzezowski/user-bubble-clamp branch from 1a6644b to f7e2bb0 Compare August 23, 2026 03:27
@vyctorbrzezowski
vyctorbrzezowski merged commit e22d450 into main Aug 23, 2026
145 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/user-bubble-clamp branch August 23, 2026 03:36
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 23, 2026
* fix(web): keep short user prompts expanded

* test(ui): drop non-regressing disclosure cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Short multiline user messages collapse in web Control UI

1 participant