Skip to content

Fix bullet/list text clipping in chat (issue #636) - #637

Merged
kmahone merged 1 commit into
openclaw:masterfrom
RBrid:user/rbrid/MDListWrapping1
Jun 2, 2026
Merged

kmahone merged 1 commit into
openclaw:masterfrom
RBrid:user/rbrid/MDListWrapping1

Conversation

@RBrid

@RBrid RBrid commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Markdown list rows used HStack (horizontal StackPanel), which measures children with infinite width. The paragraph TextBlock therefore never wrapped and long bullets got clipped by the chat bubble's max width.

Switch each list row to a 2-column Grid (Auto marker + Star content) so the content column receives a finite width and TextWrapping=Wrap works as intended.

Fix screenshot:
image

Fixes #636

Markdown list rows used HStack (horizontal StackPanel), which measures children with infinite width. The paragraph TextBlock therefore never wrapped and long bullets got clipped by the chat bubble's max width.

Switch each list row to a 2-column Grid (Auto marker + Star content) so the content column receives a finite width and TextWrapping=Wrap works as intended.

Co-authored-by: Copilot <[email protected]>
@clawsweeper

clawsweeper Bot commented Jun 2, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed June 2, 2026, 2:27 PM ET / 18:27 UTC.

Summary
The branch changes chat markdown list rows from a horizontal stack to a two-column Grid and adds UI test coverage for unordered and ordered list row shape.

Reproducibility: yes. current main renders list rows through HStack/StackPanel, and the linked issue screenshot shows long bullet text clipped instead of wrapped. I did not execute the app in this read-only review, so this is source-reproducible rather than locally reproduced.

Review metrics: 1 noteworthy metric.

  • Changed files: 2 files changed, +119/-5. The PR is narrowly scoped to one renderer change and one added UI test file.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster ✨ media proof bonus
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Run and report the AGENTS.md validation commands on Windows before merge.

Risk before merge

  • [P1] Required Windows validation was not run in this read-only review; maintainers should run the AGENTS.md build and test commands before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Land the Grid-based list-row fix after required Windows validation passes, keeping the focused regression coverage for the list renderer.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • No automated repair is needed; maintainer action is to run or confirm required Windows validation and merge if satisfied.

Security
Cleared: The diff only changes inert markdown layout records and adds tests; it does not alter link handling, credentials, dependencies, workflows, or code execution paths.

Review details

Best possible solution:

Land the Grid-based list-row fix after required Windows validation passes, keeping the focused regression coverage for the list renderer.

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

Yes: current main renders list rows through HStack/StackPanel, and the linked issue screenshot shows long bullet text clipped instead of wrapped. I did not execute the app in this read-only review, so this is source-reproducible rather than locally reproduced.

Is this the best way to solve the issue?

Yes: replacing the horizontal StackPanel row with a Grid using Auto marker and Star content columns is the narrowest maintainable fix for WinUI measurement without changing parsing, sanitization, or list semantics.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against f4d4793f744f.

Label changes

Label justifications:

  • P2: This fixes a visible chat rendering bug with limited blast radius and no evidence of data loss, security impact, or broken core runtime.
  • 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. Sufficient (screenshot): The PR body screenshot was inspected and directly shows after-fix chat bullets wrapping inside the assistant bubble.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body screenshot was inspected and directly shows after-fix chat bullets wrapping inside the assistant bubble.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body screenshot was inspected and directly shows after-fix chat bullets wrapping inside the assistant bubble.
Evidence reviewed

What I checked:

  • Repository policy read: AGENTS.md was read fully; its required build and test validation affects merge readiness for this Windows UI change, but this review is read-only and did not run artifact-producing commands. (AGENTS.md:1)
  • Current main clipping path: Current main renders each markdown list row with HStack, which materializes as a horizontal StackPanel and matches the reported infinite-width measurement problem for long list content. (src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMarkdownRenderer.cs:309, f4d4793f744f)
  • PR implementation: The PR head creates Auto/Star Grid columns and places the marker in column 0 and rendered list content in column 1, giving the content a finite wrapping width. (src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMarkdownRenderer.cs:318, 62103341c6a2)
  • Regression coverage: The added UI tests assert unordered and ordered list rows render as GridElement with Auto marker and Star content columns, and explicitly fail if the row returns to StackElement. (tests/OpenClaw.Tray.UITests/MarkdownRendererListTests.cs:30, 62103341c6a2)
  • FunctionalUI Grid behavior: The existing Grid factory converts GridSize columns/rows into GridElement definitions, and ConfigureGrid applies those definitions to a WinUI Grid before syncing children. (src/OpenClawTray.FunctionalUI/FunctionalUI.cs:600, f4d4793f744f)
  • Visual proof inspected: The PR screenshot was downloaded and inspected; it shows the OpenClaw chat UI after the fix with long bullet items wrapping within the assistant bubble.

Likely related people:

  • RBrid: git blame and file history tie the current chat markdown renderer, list-row HStack path, FunctionalUI HStack/Grid factories, and UI test project to commit 7d9152f. (role: introduced behavior and recent area contributor; confidence: high; commits: 7d9152f427a3; files: src/OpenClaw.Tray.WinUI/Chat/Markdown/ChatMarkdownRenderer.cs, src/OpenClawTray.FunctionalUI/FunctionalUI.cs, tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient Contributor real behavior proof is sufficient. 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. P2 Normal priority bug or improvement with limited blast radius. labels Jun 2, 2026
@RBrid
RBrid marked this pull request as ready for review June 2, 2026 18:21
@kmahone
kmahone merged commit db30e60 into openclaw:master Jun 2, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text is sometimes clipped in Chat

2 participants