Skip to content

fix(ui): keep adjacent chat Markdown blocks on a consistent rhythm - #122289

Merged
vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/chat-blockgap
Aug 11, 2026
Merged

vyctorbrzezowski merged 1 commit into
mainfrom
brzezowski/chat-blockgap

Conversation

@vyctorbrzezowski

Copy link
Copy Markdown
Member

What Problem This Solves

Adjacent Markdown blocks in the Control UI chat transcript could touch when the preceding or following block was a list, blockquote, table, or native details block. The affected cases were list → blockquote, table → prose, task-list → details, and unordered-list → ordered-list.

Fixes #122269

Why This Change Was Made

The chat text stylesheet reset the relevant block margins and had a partial sibling-spacing rule. The missing combinations bypassed the existing 0.75em rhythm. This patch replaces that partial list with one canonical adjacent-block rule covering the Markdown block types used by the transcript, while preserving the intentional table card styling and nested blockquote behavior.

The change is CSS-only in production. The existing route CSS E2E test gains focused browser assertions for all four gaps.

User Impact

Markdown-rich assistant responses are easier to scan: adjacent special blocks now have consistent separation in both light and dark themes.

Validation

  • Current origin/main: edb7a1692e58d78ff7e196db39ea8eff297b2e19
  • Pre-fix browser probe: 0px for all four affected gaps.
  • Post-fix browser probe on this commit: 12px for all four affected gaps, matching 0.75em at the fixture's 16px root size.
  • node scripts/run-vitest.mjs ui/src/e2e/route-css.e2e.test.ts — passed.
  • Stylelint for ui/src/styles/chat/text.css — passed.
  • Diff check — passed.
  • Final review — clean; no actionable findings.

Before / After

Light theme

Before:

Before — light theme

After:

After — light theme

Dark theme

Before:

Before — dark theme

After:

After — dark theme

@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Pre-merge review complete for 590049880cbff926ccc3d5c8711ad5975346c1b0.

  • No actionable findings remain; sequential branch review passes completed cleanly.
  • No ClawSweeper Rank-up moves are published. A fresh re-review was requested and is queued; the late publisher may refresh the rating without blocking the landing gate.
  • Exact-head CI is green, including openclaw/ci-gate, checks-ui, and all four UI E2E shards.
  • The browser regression covers list → blockquote, table → prose, task-list → details, and unordered-list → ordered-list at the established 0.75em rhythm.
  • Production/test LOC delta: +2 / +46 net.

Ready for the native landing flow.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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. labels Aug 11, 2026
@clawsweeper

clawsweeper Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 6:54 PM ET / 22:54 UTC.

ClawSweeper review

What this changes

This PR replaces partial chat Markdown sibling spacing rules with one shared rule and adds browser assertions for four previously unspaced block transitions.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

No actionable patch defect was found. Keep this maintainer-owned PR open for the native landing flow; a fresh structured autoreview still needs a host with TruffleHog available.

Priority: P3
Reviewed head: 590049880cbff926ccc3d5c8711ad5975346c1b0
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch is focused and behavior-oriented browser evidence covers the reported transitions; only the native structured-review gate remains.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This MEMBER PR includes browser measurements and before/after media in its body; the external-contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This MEMBER PR includes browser measurements and before/after media in its body; the external-contributor proof gate does not apply.
Evidence reviewed 7 items Transcript entry point: Chat messages render sanitized or streaming Markdown inside a chat-text container, so the stylesheet is the owning presentation boundary.
Native details support: The Markdown parser emits structural details elements, supporting the PR's inclusion of details in the shared block spacing rule.
Patch scope: The submitted commit centralizes the listed adjacent chat-block selectors and expands the existing route CSS probe to cover the reported combinations.
Findings None None.
Security None None.

How this fits together

Control UI turns assistant Markdown into transcript HTML, then applies the chat text stylesheet before the browser renders it. This PR changes the shared styling boundary that controls spacing between adjacent rendered blocks.

flowchart LR
  A[Assistant Markdown] --> B[Chat transcript HTML]
  B --> C[Chat text stylesheet]
  C --> D[Adjacent block spacing]
  D --> E[Rendered chat transcript]
  F[Route CSS browser test] --> D
Loading

Decision needed

Question Recommendation
Should this maintainer-owned CSS repair proceed through the native landing flow after a fresh exact-head structured autoreview? Run native review and land: Run the structured autoreview on the exact head in a host with TruffleHog, then proceed if it is clean.

Why: The patch is correct on source review, but the protected maintainer label and unavailable local autoreview dependency require explicit maintainer handling.

Before merge

  • Resolve merge risk (P1) - Native landing still needs a fresh structured autoreview on the exact head because this read-only host lacks TruffleHog.
  • Complete next step (P2) - The protected maintainer label and unavailable local autoreview dependency leave native landing review as the remaining action; no repair worker is needed.
Agent review details

Security

None.

PR surface

Source +2, Tests +46. Total +48 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 11 9 +2
Tests 1 56 10 +46
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 67 19 +48

Review metrics

Metric Value Why it matters
Production vs test delta production +2 net (11 added, 9 removed); tests +46 net (56 added, 10 removed) The small production increase replaces partial policy with one rule, while the test growth adds direct browser checks for the four reported transitions.

Stored data model

Persistent data-model change detected: vector/embedding metadata: ui/src/e2e/route-css.e2e.test.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #122269
Summary: This PR is the direct candidate fix for the linked report’s missing chat-block spacing combinations.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the shared adjacent-block rule in the chat stylesheet and complete the native exact-head review gate before landing.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the shared adjacent-block rule in the chat stylesheet and complete the native exact-head review gate before landing.

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

Yes: current source omits the reported adjacent-block selector combinations, and the route CSS browser fixture directly measures the resulting gaps.

Is this the best way to solve the issue?

Yes: consolidating the spacing policy at the chat stylesheet owner is narrower and more maintainable than changing the Markdown parser or chat component.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 3851849eead6.

Labels

Label changes:

  • add P3: This is a contained Control UI readability repair with no demonstrated delivery, state, auth, security, or availability impact.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER PR includes browser measurements and before/after media in its body; the external-contributor proof gate does not apply.

Label justifications:

  • P3: This is a contained Control UI readability repair with no demonstrated delivery, state, auth, security, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This MEMBER PR includes browser measurements and before/after media in its body; the external-contributor proof gate does not apply.

Evidence

What I checked:

Likely related people:

  • vyctorbrzezowski: Recent merged current-main history includes a chat text stylesheet change, in addition to this PR. (role: recent adjacent contributor; confidence: high; commits: 67262b70dc74; files: ui/src/styles/chat/text.css)
  • steipete: Current-main blame assigns the existing route CSS browser probe to this commit. (role: route CSS test owner; confidence: high; commits: 7a1d5a86c7ba; files: ui/src/e2e/route-css.e2e.test.ts)

Rank-up moves

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

  • Run fresh exact-head autoreview in an environment with TruffleHog installed.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@vyctorbrzezowski
vyctorbrzezowski merged commit 944b81b into main Aug 11, 2026
129 of 155 checks passed
@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/chat-blockgap branch August 11, 2026 22:57
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

ClawSweeper follow-up reconciled after its late publication:

  • The exact-head structured review had already run on 590049880cbff926ccc3d5c8711ad5975346c1b0; TruffleHog reported clean and no actionable findings were accepted.
  • Native review artifacts validated with zero findings before prepare-run.
  • Vyctor explicitly authorized the maintainer landing.
  • The reported “stored data model” signal points only to the browser test fixture ui/src/e2e/route-css.e2e.test.ts; this PR changes no persistence schema or migration surface.

Therefore the sole Rank-up move and both native-review items were satisfied before landing.

vincentkoc added a commit that referenced this pull request Aug 11, 2026
* origin/main: (1725 commits)
  fix(agents): preserve reply cleanup when cancellation throws (#122252)
  fix(ui): render disallowed link schemes as plain text (#122311)
  fix(test): isolate gateway helper env stubs (#122319)
  fix(ui): keep chat Markdown block rhythm consistent (#122289)
  test(cli): trim duplicate Hooks process cases (#122278)
  fix(ui): retain identity while agent roster loads
  fix(ui): preserve configured agent labels
  fix(plugins): keep startup convergence read-only (#122330)
  fix: preserve WebChat reply context after reloads (#122169)
  fix(ui): make DONE moves visibly reversible (#122303)
  fix(ui): keep inline-code punctuation attached (#122291)
  fix(google-meet): publish exports atomically (#122306)
  fix(channels): preserve failed agent run reactions (#122009)
  fix(ui): label patch file operations accurately (#122287)
  fix(windows): preserve Unicode LAN route aliases (#122263)
  test(media): synchronize transcode pool completion (#122279)
  fix(android): keep completed subagent activity visible for sixty seconds (#122089)
  fix(ui): humanize bare GitHub item links (#122285)
  refactor(qqbot): install plugin from Tencent package (#107295)
  chore: scope SQLite session lifecycle CI (#121917)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 12, 2026
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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.

[Bug]: consistent vertical rhythm for adjacent chat Markdown blocks

1 participant