Skip to content

fix(ui): center the working claw in chat layout - #133682

Merged
Patrick-Erichsen merged 3 commits into
mainfrom
patrick/fix-working-claw-centering
Aug 31, 2026
Merged

Patrick-Erichsen merged 3 commits into
mainfrom
patrick/fix-working-claw-centering

Conversation

@Patrick-Erichsen

@Patrick-Erichsen Patrick-Erichsen commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • keep the working claw bubble a flex container even when production CSS chunks attach in a different order
  • vertically center the claw SVG and elapsed/token status through layout instead of a pixel nudge
  • add a Chromium regression for the production stylesheet-order case

Root cause

The production Control UI computed .chat-bubble.chat-reading-indicator as display: block. The grouped-chat .chat-bubble rule and indicator rule have equal specificity, so production chunk attachment order let the block rule win. That made align-items: center inert and baseline-positioned the SVG above the elapsed/token status.

The fix pins display: inline-flex and align-items: center on the more specific grouped working-claw selector. It also removes the earlier 1px SVG translation, which only compensated for the symptom.

Visual proof

These are captures from an actual isolated OpenClaw Gateway and its built Control UI, not a static HTML fixture. The browser drove a real chat session in dark mode at 2× device scale; the local QA provider started a real sleep 20 tool turn so the page could be captured at ~8s with output-token telemetry visible.

Before After
Before: claw above elapsed and token text After: claw centered with elapsed and token text

Measured in the live DOM:

  • Before: display: block; SVG center was 3.34px above the status center.
  • After: display: flex; SVG and status centers differed by 0.00px.
Full OpenClaw instance captures
Before After
Full OpenClaw instance before Full OpenClaw instance after

Validation

  • pnpm --dir ui test src/pages/chat/chat-working-indicator.browser.test.ts (passes in unit-node, matching CI routing)
  • pnpm ui:build
  • ./node_modules/.bin/oxfmt --check ui/vitest.config.ts ui/src/pages/chat/chat-working-indicator.browser.test.ts ui/src/styles/chat/grouped.css ui/src/styles/chat/tool-cards.css
  • ./node_modules/.bin/stylelint --config config/stylelint.config.mjs ui/src/styles/chat/grouped.css ui/src/styles/chat/tool-cards.css
  • isolated real-Gateway + built-Control-UI browser capture, before and after

Worked on by

@clawsweeper

clawsweeper Bot commented Aug 31, 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: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 31, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 30, 2026, 10:01 PM ET / August 31, 2026, 02:01 UTC.

ClawSweeper review

What this changes

The branch makes the assistant working-claw bubble a flex container so its icon aligns with elapsed/token status despite the competing grouped-chat rule, and adds a Chromium regression test plus visual captures.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Needs maintainer review before merge - 3 items remain

Keep open. The earlier Node-versus-browser test-routing blocker is fixed on the current head, and the flex selector correctly protects the working-claw layout; one P2 cleanup remains because the branch commits PR-only screenshots to the repository rather than attaching them as proof.

Priority: P3
Reviewed head: 59769c463a950826ad5e523b0e182d9915ad6de0

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The functional repair and visual proof are strong, but the tracked PR-only screenshots need removal before the patch is clean.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The changed production owner is the grouped-chat selector that lays out the stream renderer’s claw/status row; supplied inspected before/after captures from a built Control UI visibly show the corrected alignment, and the exact-head browser regression measures the same computed layout.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The changed production owner is the grouped-chat selector that lays out the stream renderer’s claw/status row; supplied inspected before/after captures from a built Control UI visibly show the corrected alignment, and the exact-head browser regression measures the same computed layout.
Evidence reviewed 6 items Layout owner and fix: The stream renderer emits the claw and status as siblings inside the working indicator; the introduced, more-specific grouped-chat selector restores flex layout and vertical centering for that exact markup.
Prior finding addressed: The current head adds the new Node-dependent Playwright layout test to the unit-node project, whose include list explicitly routes browser-layout tests that import Node APIs away from Vitest browser mode.
Regression test quality: The introduced test loads the competing styles in the adverse order and asserts computed flex display plus both container and SVG vertical centers, so it would fail before the selector gains the flex declarations.
Findings 1 actionable finding [P2] Move PR-only screenshots out of the repository
Security None None.

How this fits together

The Control UI renders an assistant’s in-progress state as a claw followed by run-status text in the chat transcript. The stream renderer produces that markup, while grouped-chat and indicator styles jointly determine its layout.

flowchart LR
  A[Assistant run] --> B[Stream renderer]
  B --> C[Working claw markup]
  D[Indicator styles] --> E[Grouped chat styles]
  C --> F[Claw and status row]
  E --> F
  F --> G[Chat transcript]
Loading

Before merge

  • Move PR-only screenshots out of the repository (P2) - The four introduced .github/pr-proof PNGs are review evidence, not shipped UI assets. Repository policy requires PR proof to be attached to the PR or published externally; keeping them in the branch permanently grows product history without affecting runtime behavior.
  • Resolve merge risk (P1) - The four committed visual-proof images add PR-only binary history; retain the evidence as PR attachments or an external artifact instead of merging those files.
  • Complete next step (P2) - The remaining cleanup requires preserving review evidence while changing how it is published, so it is not a safe automated repair task.

Findings

  • [P2] Move PR-only screenshots out of the repository — .github/pr-proof/working-claw-centering/after-full.png:1
Agent review details

Security

None.

PR surface

Source +3, Tests +78, Config 0. Total +81 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 2 3 0 +3
Tests 1 78 0 +78
Docs 0 0 0 0
Config 4 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 7 81 0 +81

Review metrics

Metric Value Why it matters
Production versus test delta production +2, tests +78, test configuration +1 The two production declarations are the narrow cascade repair; the remaining textual changes provide regression coverage and correct its runner selection.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the stronger grouped-chat selector and its Node-routed layout regression, while publishing the before/after captures as PR attachments rather than tracked repository assets.
  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 stronger grouped-chat selector and its Node-routed layout regression, while publishing the before/after captures as PR attachments rather than tracked repository assets.

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

Yes. The old cascade leaves the more-specific grouped .chat-bubble rule as display:block, while the introduced test reproduces that stylesheet combination and observes its corrected computed geometry.

Is this the best way to solve the issue?

Yes for the layout defect: placing flex declarations on the most-specific existing grouped working-indicator selector fixes the cascade at its owner boundary, unlike the earlier SVG pixel translation.

Full review comments:

  • [P2] Move PR-only screenshots out of the repository — .github/pr-proof/working-claw-centering/after-full.png:1
    The four introduced .github/pr-proof PNGs are review evidence, not shipped UI assets. Repository policy requires PR proof to be attached to the PR or published externally; keeping them in the branch permanently grows product history without affecting runtime behavior.
    Confidence: 0.9

Overall correctness: patch is incorrect
Overall confidence: 0.9

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the grouped-chat selector that lays out the stream renderer’s claw/status row; supplied inspected before/after captures from a built Control UI visibly show the corrected alignment, and the exact-head browser regression measures the same computed layout.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The changed production owner is the grouped-chat selector that lays out the stream renderer’s claw/status row; supplied inspected before/after captures from a built Control UI visibly show the corrected alignment, and the exact-head browser regression measures the same computed layout.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove merge-risk: 🚨 automation: Current PR review selected no merge-risk labels.

Label justifications:

  • P3: This is a limited web-chat visual alignment repair with no delivery, state, authentication, or availability impact.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Sufficient (screenshot): The changed production owner is the grouped-chat selector that lays out the stream renderer’s claw/status row; supplied inspected before/after captures from a built Control UI visibly show the corrected alignment, and the exact-head browser regression measures the same computed layout.
  • proof: sufficient: Contributor real behavior proof is sufficient. The changed production owner is the grouped-chat selector that lays out the stream renderer’s claw/status row; supplied inspected before/after captures from a built Control UI visibly show the corrected alignment, and the exact-head browser regression measures the same computed layout.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The changed production owner is the grouped-chat selector that lays out the stream renderer’s claw/status row; supplied inspected before/after captures from a built Control UI visibly show the corrected alignment, and the exact-head browser regression measures the same computed layout.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

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

  • Remove the four tracked .github/pr-proof/working-claw-centering images and attach the same redacted captures to the PR.
  • Let exact-head CI complete after the cleanup.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-31T01:12:48.516Z sha 8d40f69 :: needs changes before merge. :: [P1] Route this Node-driven test through the Node test project

@Patrick-Erichsen Patrick-Erichsen changed the title fix(ui): center the working claw optically fix(ui): center the working claw in chat layout Aug 31, 2026
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 automation 🚨 May affect CI, automerge, proof capture, label sync, or maintainer automation. labels Aug 31, 2026
@Patrick-Erichsen
Patrick-Erichsen merged commit 62b41fe into main Aug 31, 2026
162 checks passed
@Patrick-Erichsen
Patrick-Erichsen deleted the patrick/fix-working-claw-centering branch August 31, 2026 03:12
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
* fix(ui): center the working claw optically

* fix(ui): center working claw in real chat layout

* test(ui): route claw layout proof through node
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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant