Skip to content

fix(ui): balance completed-work spacing - #126303

Merged
vyctorbrzezowski merged 4 commits into
openclaw:mainfrom
vyctorbrzezowski:brzezowski/worked-for-spacing
Aug 20, 2026
Merged

vyctorbrzezowski merged 4 commits into
openclaw:mainfrom
vyctorbrzezowski:brzezowski/worked-for-spacing

Conversation

@vyctorbrzezowski

@vyctorbrzezowski vyctorbrzezowski commented Aug 19, 2026 •

Copy link
Copy Markdown
Member

Closes #126302

What Problem This Solves

Fixes an issue where the Control UI's completed-turn "Worked for ..." disclosure sat too close to the preceding user bubble while leaving disproportionately more space before the assistant's final reply.

This spacing defect is independent of the disclosure flicker/scroll-anchor work in #126093 and #126272.

Why This Change Was Made

The completed-work row now owns equal block-axis spacing around the disclosure. Desktop changes from 0px above / 8px below to 9px / 9px. Touch layouts combine the shared 14px row margin with the work-row padding to change from 14px / 22px to 23px / 23px.

The final values intentionally add 5px beyond the initially balanced design on each side. A redundant touch-specific margin override was removed, leaving one canonical spacing path. Tool-only turns remain unaffected because they do not render the completed-work rollup.

User Impact

Completed turns scan more clearly: the work disclosure no longer crowds either neighboring message. Each completed-work rollup is intentionally 10px taller than the original layout.

Production delta: +3/-3 (net 0). Test delta: +83/-2 (net +81).

Evidence

@vyctorbrzezowski vyctorbrzezowski self-assigned this Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 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: XS maintainer Maintainer-authored PR labels Aug 19, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 19, 2026
@clawsweeper

clawsweeper Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 19, 2026, 11:08 PM ET / August 20, 2026, 03:08 UTC.

ClawSweeper review

What this changes

The PR changes completed-work disclosure spacing in Control UI chat transcripts and adds a browser layout regression test.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: the CSS balances the gaps by increasing completed-work row height, contrary to the PR’s stated density-preservation goal. A focused correction is needed before maintainer review can pass it.

Priority: P3
Reviewed head: 4c9829908ba1155349ea2341b45be3e19e4d90e1

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The visual evidence and focused test are useful, but the current CSS violates the stated transcript-density invariant.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This member-authored PR is not subject to the external-contributor proof gate; its body nevertheless records after-fix Chromium captures and exact-head Crabbox runs.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR is not subject to the external-contributor proof gate; its body nevertheless records after-fix Chromium captures and exact-head Crabbox runs.
Evidence reviewed 5 items Current-main baseline: Current main gives the completed-work row only 8px of bottom padding.
Changed rule: The PR replaces that 8px bottom padding with 9px on both block edges, increasing the row’s padding budget from 8px to 18px.
Production owner boundary: The transcript projection renders this rollup for completed work groups, which grouping inserts immediately before the final reply.
Findings 1 actionable finding [P2] Preserve the completed-work row’s existing height
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/pages/chat/chat-responsive.browser.test.ts

Result: FAIL (failed) — step 1 run node scripts/run-vitest.mjs ui/src/pages/chat/chat-responsive.browser.test.ts: terminal command did not produce output within 20 seconds: "node scripts/run-vitest.mjs ui/src/pages/chat/chat-responsive.browser.test.ts"

node scripts/run-vitest.mjs ui/src/pages/chat/chat-responsive.browser.test.ts
runner@runnervmzvulz:/tmp/clawsweeper-live-proof-126303-ObcasR/target$ node scripts/run-vitest.mjs ui/src/pages/chat/chat-responsive.browser.test.ts
[test] starting test/vitest/vitest.ui.config.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126303-ObcasR/target

node scripts/run-vitest.mjs ui/src/pages/chat/chat-responsive.browser.test.ts












































Assertions:

  • FAIL expect_output: balances completed-work spacing

How this fits together

Completed turns render a collapsed “Worked for …” row between a user prompt and final assistant reply. Chat grouping produces the rollup, the transcript projection renders it, and CSS controls its visible vertical rhythm.

flowchart LR
A[Completed chat turn] --> B[Turn grouping]
B --> C[Completed-work rollup]
C --> D[Spacing CSS]
D --> E[Assistant reply]
D --> F[Browser layout test]
Loading

Before merge

  • Preserve the completed-work row’s existing height (P2) - padding-block: 9px replaces the former 8px bottom padding with 18px of total padding, so the rollup grows by 10px on desktop. The touch rule also retains its 14px group margin, producing the new 23px lower gap; the added test checks symmetry but not the promised unchanged density. Redistribute the existing budget and assert row-height preservation.
  • Resolve merge risk (P1) - Merging the current rule makes every completed-work row 10px taller on desktop and adds 18px to the touch-layout spacing budget, despite the stated promise not to change transcript density.

Findings

  • [P2] Preserve the completed-work row’s existing height — ui/src/styles/chat/tool-cards.css:1136
Agent review details

Security

None.

PR surface

Source 0, Tests +81. Total +81 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 3 0
Tests 1 83 2 +81
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 86 5 +81

Review metrics

Metric Value Why it matters
Production vs test LOC production 0 net (+3/-3), tests +81 net (+83/-2) The focused browser coverage is useful, but the production CSS must preserve the existing transcript-density invariant.

Merge-risk options

Maintainer options:

  1. Preserve the existing spacing budget (recommended)
    Correct the desktop and touch rules so their visible gaps follow the documented targets without enlarging completed transcript turns.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Restore a density-preserving completed-work spacing budget and update the browser regression to assert the intended desktop and touch gaps plus unchanged row height.

Technical review

Best possible solution:

Redistribute the existing spacing budget—matching the PR’s documented desktop 4px/4px and touch 4px/10px targets—and extend the browser assertion to preserve total completed-work row height.

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

Yes—current-main and exact-head CSS establish the old and new padding budgets, while the focused browser fixture measures the rendered adjacent gaps. This read-only review did not execute the test.

Is this the best way to solve the issue?

No—the patch achieves symmetric gaps by expanding the row rather than redistributing its existing spacing budget; the documented density-preserving targets are the narrower repair.

Full review comments:

  • [P2] Preserve the completed-work row’s existing height — ui/src/styles/chat/tool-cards.css:1136
    padding-block: 9px replaces the former 8px bottom padding with 18px of total padding, so the rollup grows by 10px on desktop. The touch rule also retains its 14px group margin, producing the new 23px lower gap; the added test checks symmetry but not the promised unchanged density. Redistribute the existing budget and assert row-height preservation.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This is a low-severity Control UI visual-spacing correction.
  • merge-risk: 🚨 other: The changed padding grows completed-work rows for existing desktop and touch transcripts.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored PR is not subject to the external-contributor proof gate; its body nevertheless records after-fix Chromium captures and exact-head Crabbox runs.

Evidence

What I checked:

Likely related people:

  • Peter Steinberger: Current-main blame attributes the original completed-work spacing rule to this source record. (role: current baseline contributor; confidence: medium; commits: 7769cb64661e; files: ui/src/styles/chat/tool-cards.css)
  • vyctorbrzezowski: Current history includes prior chat UI work by this contributor, and the exact-head change modifies the same completed-work rule. (role: recent Control UI contributor; confidence: medium; commits: fe1dafbada36, 4c9829908ba1; files: ui/src/pages/chat/components/chat-message-stream.ts, ui/src/styles/chat/tool-cards.css)

Rank-up moves

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

  • Redistribute the completed-work spacing budget and make the regression assert unchanged row height.
  • Refresh the sanitized desktop and touch proof for the corrected exact head.

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 (4 earlier review cycles)
  • reviewed 2026-08-19T11:12:11.967Z sha 3b8f6f3 :: needs changes before merge. :: [P2] Preserve the touch-layout row height
  • reviewed August 19, 2026, 8:30 AM ET / 12:30 UTC sha unknown :: needs changes before merge. :: [P2] Preserve the touch-layout spacing total
  • reviewed 2026-08-20T00:40:07.997Z sha 2599213 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-20T02:44:37.346Z sha 4749082 :: needs maintainer review before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Aug 19, 2026
@clawsweeper clawsweeper Bot added rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed 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 20, 2026
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. labels Aug 20, 2026
@vyctorbrzezowski

vyctorbrzezowski commented Aug 20, 2026 •

Copy link
Copy Markdown
Member Author

Exact-head visual proof

Final head: 4c9829908ba1155349ea2341b45be3e19e4d90e1
Baseline: e71fc902eece0f795d593e5d4e03ad6e7496d9a7

These sanitized Chromium captures use the browser regression's production-equivalent virtual-row composition and production CSS. I inspected every image. The desktop view moves from 0px / 8px to 9px / 9px; touch moves from 14px / 22px to 23px / 23px. The final head intentionally adds 5px on each side of the balanced disclosure.

View Before After
Desktop Desktop before: one-sided completed-work spacing Desktop after: balanced completed-work spacing with 5px more gap
Touch Touch before: one-sided completed-work spacing Touch after: balanced completed-work spacing with 5px more gap

Verification

Landing is now explicitly requested. Exact-head CI and native landing gates remain required.

@vyctorbrzezowski
vyctorbrzezowski marked this pull request as ready for review August 20, 2026 02:52
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 20, 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 exact_review_queue).
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

Land-ready verification for 4c9829908ba1155349ea2341b45be3e19e4d90e1:

  • Root cause: completed-work spacing was one-sided at its CSS owner.
  • Canonical fix: one .chat-group--work block-padding rule; obsolete touch-specific margin override removed.
  • Final owner-requested behavior: desktop 9px / 9px; touch 23px / 23px. This intentionally increases each completed-work row by 10px.
  • ClawSweeper P2 skip: its density-preservation premise is obsolete. The owner explicitly requested 5px more gap on each side after the initial balanced version, and the PR body/proof now state that intentional product change.
  • Exact visual proof: fix(ui): balance completed-work spacing #126303 (comment)
  • AWS Crabbox run_052ceff8f594: 87/87 responsive browser tests, format, and lint.
  • AWS Crabbox run_1cf90c7dfb0a: 87/87 with exact-head desktop/touch captures.
  • Exact-head CI: https://github.com/openclaw/openclaw/actions/runs/32326798376, green.
  • Native review artifacts: zero findings, READY FOR /prepare-pr.
  • Native OPENCLAW_TESTBOX=1 scripts/pr prepare-run 126303: complete; remote tree matches exact PR head without rebase.
  • Production LOC: +3/-3 (net 0). Tests: +83/-2.

No remaining proof gap blocks the requested landing.

@vyctorbrzezowski
vyctorbrzezowski merged commit 916eef4 into openclaw:main Aug 20, 2026
97 checks passed
@vyctorbrzezowski

Copy link
Copy Markdown
Member Author

Merged via squash.

@vyctorbrzezowski
vyctorbrzezowski deleted the brzezowski/worked-for-spacing branch August 20, 2026 03:17
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 20, 2026
* fix(ui): balance completed-work spacing

* fix(ui): preserve touch work spacing

* fix(ui): balance touch work spacing

* fix(ui): open completed-work spacing
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 merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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]: Completed-work disclosure has uneven vertical spacing

1 participant