Skip to content

fix(ui): keep fenced prompts readable after starting a chat - #196070

Merged
roboclaw-bot merged 6 commits into
mainfrom
openclaw/mellow-shrimp-6
Nov 9, 2026
Merged

roboclaw-bot merged 6 commits into
mainfrom
openclaw/mellow-shrimp-6

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: fenced text submitted from New chat looks cut off because human-message code blocks have no wrap control and long lines extend beyond the visible bubble.

User Impact

Fenced prompts remain readable on desktop and mobile. Indentation, explicit newlines, monospace styling, and the exact submitted source are preserved. The composer continues to show the editable Markdown source, including backticks. No migration or user action is required.

Why This Change Was Made

Apply soft wrapping at the existing human-message stylesheet owner rather than adding another editor or Markdown renderer. Block art keeps its alignment-sensitive unwrapped layout, and assistant code controls are unchanged.

Evidence

  • Landed as 2f5980d2887. Exact-head CI run 42653453491 and Workflow Sanity passed for 7183d0a348d4ac702a286053e7c678180eb11c6f; native recovery completed without an admin exception.

  • Reproduced through New chat → Start session: the original block overflows horizontally by 1,604px. The regression fails on main and passes with this fix.

  • New-chat browser proof passes at 1200px and 390px, checking the editor value, exact Gateway submission, rendered code text, and absence of horizontal clipping. New regression file: 3.29s test time; 41.45s invocation wall time including build/validation serialization. CI workflow wall time: 10m31s; per-file CI timing was not separately retained.

  • 13 focused browser checks passed across new-chat submission, human-message disclosure/reload, and assistant code controls (27.92s invocation wall time). The expanded mobile regression passes separately.

  • Production UI bundle built successfully. Targeted UI E2E typechecks, type-aware lint, CSS lint, formatting, and diff whitespace checks pass.

  • Independent local autoreview (Codex, P0–P2) found no actionable findings in the complete local candidate against base 4ed06580a8f4fa7. Local ClawSweeper was unavailable because its available checkout contains unrelated work. Hosted ClawSweeper subsequently completed its review at 9879de3a1f69 with no code findings; it correctly noted the then-failing UI lane. The small readiness correction is independently reviewed below.

  • Simplification: share the existing wrapped-code rule; no new runtime state or renderer. Net test growth is 59 lines; the allocation covers the real new-chat submission regression that existing assistant-fence and disclosure tests missed.

  • CI repair: the first run rejected +114 B of compiled CSS because the base already exceeds its fixed ceiling. Consolidating into the existing wrap rule reduces the delta to +59 B raw / +11 B gzip, within the existing 64 B build-variance allowance. No ceiling or baseline was raised. The canonical base-comparison command passes, all 14 focused browser checks pass (33.80s invocation), and a fresh P0–P2 autoreview with full stylesheet context found no actionable findings. The latest exact-head CI run passed.

  • UI CI readiness: run 42648893611 failed the existing transcript-compensation test at expected 510px / actual 480px after its idle flag cleared. The original test passes alone and as a full 31-test file on the candidate with Node; the full file also passes on exact main base 21c0b48 with both Node and the checksum-pinned CI Bun fork. The CI timing failure was not reproduced locally. The wait now requires both the original idle condition and the already-required exact 510px DOM offset within the same polling budget. All final offset, retained-row and extent assertions remain; missing compensation still fails. The updated 31-test file passes on Node and pinned Bun, and fresh full-context P0–P2 review found no weakened assertions. Latest exact-head CI passed; these passing replays are not claimed as proof of the original timing cause.

Before/after images below use identical synthetic prompt content in the production UI with a test Gateway. Both images were inspected and delivered in the originating chat. No live service or model call is needed for the stylesheet behavior.

Before After
Before: long fenced instructions are cut off After: complete instructions wrap within the block

Worked on by

Work sessions

Linked for team reference; these sessions aren’t public.

roboclaw-bot and others added 2 commits November 9, 2026 15:28
Wrap human-message fences that have no wrap control, preserving whitespace, code styling, and unwrapped block art. Cover new-chat submission at desktop and mobile widths and update expanded-message expectations.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 3edf7634-8660-4597-ad61-b4b43ade4dfb
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) November 9, 2026 15:41
@roboclaw-bot
roboclaw-bot disabled auto-merge November 9, 2026 15:48
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 9, 2026
roboclaw-bot and others added 2 commits November 9, 2026 15:50
Share the existing wrapped-code rule instead of adding duplicate declarations. Preserve the same human-fence wrapping and block-art exclusion while bringing compiled CSS growth within the existing size gate. The performance comparison and all 14 focused browser checks pass.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 28b9b13d-1b1b-46bd-803b-a0625457212a
@clawsweeper clawsweeper Bot added clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR soft-wraps human-message code blocks while preserving source text, code styling, and unwrapped block art.

Example: Submit a fenced design prompt containing “END OF DESIGN.” through New chat at 1200px.

  • Before: Long instruction lines extend beyond the visible code block.
  • After: Instructions and long URLs wrap inside the bubble without changing their text.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, useful patch with direct visual proof and no actionable code finding; the failing exact-head UI lane still lacks confirmed attribution.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): Inspected before/after screenshots show the production Control UI rendering the same synthetic fenced prompt with a test Gateway: clipped instruction lines become visibly wrapped. The added browser scenario exercises New chat → Start session at 1200px and 390px and checks submission bytes and rendered code text; no live model claim is needed for this stylesheet behavior.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Long fenced instructions appear cut off after starting a chat, and human-message fences offer no wrap control.
Reason: Visible readability improves through a minimal stylesheet change; the maintainer-authored PR supplies direction for replacing the earlier horizontal-scroll behavior.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR provides a focused, visually demonstrated readability improvement that current main lacks; no introduced correctness defect was found.

Priority: P2
Reviewed head: 9879de3a1f6920bb0afd8a1db1baf210cfa00988

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Control UI submits Markdown to the Gateway and renders human messages through the shared Markdown renderer; the stylesheet controls their visible code layout.

flowchart LR
  A[New chat composer] --> B[Session submission]
  B --> C[Gateway]
  B --> D[Human message bubble]
  C --> D
  D --> E[Shared Markdown renderer]
  E --> F[Chat code stylesheet]
Loading

Technical review

Best possible solution:

Keep wrapping in the existing stylesheet owner, preserving exact source text and the block-art exception.

Do we have a high-confidence way to reproduce the issue?

Current-main CSS and the static human-message rendering contract explain the overflow; supplied before/after screenshots demonstrate the visual difference, and the author reports a base-failing submission regression. No target code was executed during this review.

Is this the best way to solve the issue?

The patch is the smallest complete stylesheet fix: readable human fences share existing wrapping declarations, block art retains alignment, and assistant controls keep their existing selector.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 06ee40a8facc.

Provenance checked

  • Human-message code layout and disclosure expectations changes intended behavior with a stated reason (c64c6d0: Restore shared monospace code surfaces and horizontal scrolling while preventing folded code from stealing focus.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

PR surface

Source +2, Tests +59, Other +2. Total +63 across 4 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 1 3 1 +2
Tests 2 67 8 +59
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 0 +2
Total 4 72 9 +63

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Production versus test LOC Production +3/-1; tests +67/-8 The net 59 test lines cover new-chat submission at desktop/mobile widths and adapt the existing disclosure regression without adding production machinery.

Labels

Label changes:

  • add P2: A bounded chat readability improvement with preserved message contents and no demonstrated core workflow outage.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: A bounded chat readability improvement with preserved message contents and no demonstrated core workflow outage.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Establish whether the transcript compensation failure reproduces on the base, then resolve the exact-head CI gate accordingly.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 9, 2026, 11:07 AM ET / 16:07 UTC.

roboclaw-bot and others added 2 commits November 9, 2026 16:15
Wait for both native idle and the already-required 510px compensation in the existing polling budget. Keep all final offset, retained-row and extent assertions: missing compensation still fails. The original CI timing failure was not reproduced locally; the full 31-test file passes on Node and the pinned Bun fork, and independent P0-P2 review found no weakened assertions.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: d424ea91-85ae-4b15-b307-65bf2c81c22f
@roboclaw-bot
roboclaw-bot merged commit 2f5980d into main Nov 9, 2026
71 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/mellow-shrimp-6 branch November 9, 2026 16:38
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 10, 2026
…#196070)

* fix(ui): keep fenced prompts readable after starting a chat

Wrap human-message fences that have no wrap control, preserving whitespace, code styling, and unwrapped block art. Cover new-chat submission at desktop and mobile widths and update expanded-message expectations.

Co-authored-by: vincentkoc <[email protected]>

* fix(ui): keep fenced prompts readable after starting a chat

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 3edf7634-8660-4597-ad61-b4b43ade4dfb

* fix(ui): reuse wrapped code styles for human fences

Share the existing wrapped-code rule instead of adding duplicate declarations. Preserve the same human-fence wrapping and block-art exclusion while bringing compiled CSS growth within the existing size gate. The performance comparison and all 14 focused browser checks pass.

Co-authored-by: vincentkoc <[email protected]>

* Publish openclaw/mellow-shrimp-6

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 28b9b13d-1b1b-46bd-803b-a0625457212a

* test(ui): wait for deferred reader offset before geometry assertions

Wait for both native idle and the already-required 510px compensation in the existing polling budget. Keep all final offset, retained-row and extent assertions: missing compensation still fails. The original CI timing failure was not reproduced locally; the full 31-test file passes on Node and the pinned Bun fork, and independent P0-P2 review found no weakened assertions.

Co-authored-by: vincentkoc <[email protected]>

* Publish openclaw/mellow-shrimp-6

Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: d424ea91-85ae-4b15-b307-65bf2c81c22f

---------

Co-authored-by: vincentkoc <[email protected]>
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 P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant