Repository navigation
fix(ui): center the working claw in chat layout - #133682
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: found issues before merge. Reviewed August 30, 2026, 10:01 PM ET / August 31, 2026, 02:01 UTC. ClawSweeper reviewWhat this changesThe 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 provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep 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 Review scores
Verification
How this fits togetherThe 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]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +3, Tests +78, Config 0. Total +81 across 7 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest 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:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against c60db01a455d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
* fix(ui): center the working claw optically * fix(ui): center working claw in real chat layout * test(ui): route claw layout proof through node
Summary
Root cause
The production Control UI computed
.chat-bubble.chat-reading-indicatorasdisplay: block. The grouped-chat.chat-bubblerule and indicator rule have equal specificity, so production chunk attachment order let the block rule win. That madealign-items: centerinert and baseline-positioned the SVG above the elapsed/token status.The fix pins
display: inline-flexandalign-items: centeron 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 20tool turn so the page could be captured at ~8s with output-token telemetry visible.Measured in the live DOM:
display: block; SVG center was 3.34px above the status center.display: flex; SVG and status centers differed by 0.00px.Full OpenClaw instance captures
Validation
pnpm --dir ui test src/pages/chat/chat-working-indicator.browser.test.ts(passes inunit-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.cssWorked on by