Repository navigation
fix(ui): keep fenced prompts readable after starting a chat - #196070
Conversation
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
|
🦞👀 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. |
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
|
Codex review: needs maintainer review before merge. What this changesThis 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.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete 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 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe 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]
Technical reviewBest 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
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +2, Tests +59, Other +2. Total +63 across 4 files. Added test files: 1. View PR surface stats
Preflight sourceSource 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
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 9, 2026, 11:07 AM ET / 16:07 UTC. |
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
|
Merged via squash.
|
…#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]>
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 for7183d0a348d4ac702a286053e7c678180eb11c6f; 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 at9879de3a1f69with 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.
Worked on by
Work sessions
Linked for team reference; these sessions aren’t public.