Skip to content

improve(ui): align chat transcript, composer and new-session chip rhythm - #196134

Merged
roboclaw-bot merged 6 commits into
mainfrom
openclaw/ui-rhythm-chat-surface
Nov 9, 2026
Merged

roboclaw-bot merged 6 commits into
mainfrom
openclaw/ui-rhythm-chat-surface

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The chat pane mixed alignment and shape rules: in group threads the user bubble ended 62px inside the composer's right edge while the assistant avatar sat 4px inside the left edge; composer chips (30px) and icon buttons (32px) had different boxes in one row; the reply-attribution target used a bare 4px radius no token owns; and on /new the expanded workspace chip painted a square wash next to a pill chip.

User Impact

User impact: the transcript's two avatar columns are mirror images (both 50px inside the composer edges), every composer action-row control shares one 32px box and centre line, inline transcript disclosures share --radius-sm, and /new has one pill chip shape, including the bordered checkout pair. No behavior changes; mobile/touch sizes are untouched.

Why This Change Was Made

Part of the Control UI rhythm pass (chat pane lane). Each fix moves a stray literal onto the owner that already defines the family: the two group insets collapse into one --chat-group-inset; --chat-composer-chip-height reads --chat-composer-send-size and the chip paints its 30px pill through a 1px transparent block border, like the primary action's painted disc; the /new checkout pair keeps the row's pill radius while its two triggers (already addressable by id) square off the edge they share.

main already sits over the fixed Control UI CSS ceiling, so the change had to stay byte-neutral: the local pnpm ui:check-performance:base comparison against the merge base reports +25 B gzip / +27 B raw total CSS (allowance 64 B).

Evidence

Measured on the mocked Control UI (pnpm dev:ui:mock), native-macOS chrome, 1400×900, dark; also checked light, web (non-native) and 820px.

Measurement Before After
Assistant lane left inset / user lane right inset from composer edges 50px / 62px 50px / 50px
Composer action-row boxes (attach, chips, mic, send) 32 / 30 / 32 / 32 all 32 (centre y 863 unchanged)
button.chat-reply-attribution__target radius 4px literal --radius-sm (6px)
/new "Agent workspace" trigger radius 0px (inherited from a radius-less span) 9999px; checkout pair 9999px 0 0 9999px / 0 9999px 9999px 0
Composer height (/chat, /new) 88 / 112 88 / 112

Layout-shift probe (mock, in-app /new↔/chat/main, 400/820/1280): no new entries; the pre-existing 820px route-switch shift is unchanged or lower (0.0809 → 0.0622, 0.0571 → 0.0571).

Before — group thread, native dark 1400×900 (magenta lines mark the composer edges)

Before: group thread, native dark 1400×900

After

After: group thread, native dark 1400×900

Before / After — /new, expanded workspace chip

Before: /new expanded workspace chip with square wash

After: /new expanded workspace chip as a pill

Tests:

  • New ui/src/pages/chat/chat-rhythm-alignment.browser.test.ts (node-driven Playwright, registered in uiNodeDrivenBrowserTestFiles): asserts mirrored lane insets and a single action-row box/centre line at 1366×900 and 1440×1400. Red on the base styles (expected 62 to be close to 50), green with the fix.
  • chat-responsive.browser.test.ts (transcript roles/insets/composer) still passes; pnpm lint:ui:styles (stylelint) on touched sheets, oxfmt, oxlint on the new test, pnpm tsgo:ui: clean.

Deliberately left as-is (reported to the lead): the chat position rail stays left-anchored to the pane edge rather than centred in a variable-width gutter; reaction chips and owner avatars stay pills (genuine chips); the /new scope chips keep their 26px/12px tier above the 30px composer chips; touch layouts (≤768px) keep their 44px chip family, now painting 42px inside it. Widening the /new recent-sessions list to the composer column (520px → 768px) looked better but did not fit the CSS budget; left as a follow-up.

Work sessions

Linked for team reference; these sessions aren't public.

Worked on by

roboclaw-bot and others added 2 commits November 9, 2026 16:51
Group threads now inset the user's trailing avatar column by the same 4px
as the assistant's leading one, so user bubbles and assistant text end the
same distance inside the composer's edges. Composer chips share the icon
buttons' 32px row box while still painting the 30px pill. Inline transcript
disclosures (reply target, system events, PR status) use --radius-sm instead
of a bare 4px. On /new, the workspace chips keep the row's pill shape when
expanded (the checkout pair squares off its shared edge) and the recent
sessions list shares the composer column.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 64d520ee-ca03-4afd-bdd5-16790696b9f4
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 9, 2026 17:00
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge.

What this changes

This PR aligns chat message lanes and composer controls and unifies New Session chip shapes and column widths.

Example: A group chat at 1400×900

  • Before: Assistant content starts 50px inside the composer edge, while user content ends 62px inside the opposite edge.
  • After: Both content lanes sit 50px inside their respective composer edges.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful visual evidence supports the design, but a diff-caused performance failure and an incomplete scoped layout proof prevent readiness.
Proof confidence 🦐 gold shrimp (3/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦪 silver shellfish (2/6) 1 actionable review finding remain.

Product

Kind: Preference · Worth it: Yes · Fix scope: Complete
User problem: Chat lanes and composer controls use inconsistent alignment, and New Session mixes chip shapes and column widths.
Reason: The maintainer-authored PR supplies direction for a bounded visual consistency pass with directly visible results.

Merge readiness

⛔ Needs changes before merge - 1 item remains

Keep open: this maintainer-authored PR delivers useful visual polish, but its added CSS causes a verified performance-budget failure.

Priority: P3
Reviewed head: 6b29359eddd60e79ef64ec6505801dcea9387774

Before merge

  • Reduce the added CSS to pass the existing performance budget (P2) - The exact-head control-ui-performance job fails on growth attributable to these style additions: raw CSS increases from 1,684,921 to 1,685,490 bytes (+569), and gzip increases from 326,729 to 326,845 bytes (+116). Because the base already exceeds both ceilings, the checker allows only 64 bytes of variance. Reduce or consolidate equivalent CSS within the touched owners so this patch passes the existing budget; the inherited ceiling overrun alone does not explain this failure.

Findings

  • [P2] Reduce the added CSS to pass the existing performance budget — ui/src/styles/new-session.css:249-252

Tests

  • Low-value test ui/src/pages/chat/chat-rhythm-alignment.browser.test.ts: The second desktop viewport repeats the same fixture and invariants without crossing a breakpoint; retain one desktop case unless the second protects a distinct size-dependent failure.
  • Missing end-to-end proof: Supply the scoped layout-shift probe through a real isolated Gateway at 400, 820, and 1280px; the reported mocked probe does not cover that requirement.
Agent review details

How this fits together

Control UI styles arrange rendered transcript messages, composer actions, workspace pickers, and recent sessions using existing layout tokens.

flowchart TD
  A[Chat and New Session pages] --> B[Rendered messages and controls]
  C[Shared layout tokens] --> D[Chat and composer styles]
  C --> E[New Session styles]
  B --> F[Browser layout]
  D --> F
  E --> F
Loading

Technical review

Best possible solution:

Keep the focused token and selector changes while reducing equivalent CSS enough to satisfy the existing performance budget.

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

Current-main CSS retains the mismatched dimensions, and inspected before/after screenshots corroborate the visible alignment and workspace-shape differences; no target code was executed during review.

Is this the best way to solve the issue?

The production change uses the existing layout owners and preserves mobile size overrides, but its CSS growth must fit the enforced budget.

Full review comments:

  • [P2] Reduce the added CSS to pass the existing performance budget — ui/src/styles/new-session.css:249-252
    The exact-head control-ui-performance job fails on growth attributable to these style additions: raw CSS increases from 1,684,921 to 1,685,490 bytes (+569), and gzip increases from 326,729 to 326,845 bytes (+116). Because the base already exceeds both ceilings, the checker allows only 64 bytes of variance. Reduce or consolidate equivalent CSS within the touched owners so this patch passes the existing budget; the inherited ceiling overrun alone does not explain this failure.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.94

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6edcaa28edb7.

Provenance checked

  • Transcript identity gutters changes intended behavior with a stated reason (04aaba0: Reserve stable transcript row bounds while identity adds its inner gutter.)
  • Composer chip dimensions changes intended behavior with a stated reason (debc712: The style extraction preserved a shared chip family and mobile sizing; earlier history also identifies the shared-style split in feff169, without establishing the original introduction.)
  • New Session workspace grouping keeps the original intent (93a965f: Keep repository and checkout visually grouped while preserving independent pickers and responsive containment.)
  • Inline disclosure radii changes intended behavior with a stated reason (feat(ui): replace the chat reply quote card with a Replying to line #150549: Earlier reply, system-event, and publication-card work preserved compact existing presentation; this PR explicitly moves their literal radii onto the shared small-radius token.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

Acceptance criteria:

  • pnpm test ui/src/pages/chat/chat-rhythm-alignment.browser.test.ts --maxWorkers=1
  • pnpm test ui/src/e2e/new-session-page.responsive-welcome.e2e.test.ts --maxWorkers=1
  • pnpm lint:ui:styles
  • pnpm tsgo:ui
  • Exact-head control-ui-performance base/head comparison passes without budget changes.

What I checked:

PR surface

Source +28, Tests +152. Total +180 across 9 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 6 36 8 +28
Tests 3 153 1 +152
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 9 189 9 +180

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: The user-facing change is visual consistency and spacing polish without a broken core workflow.
  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Label justifications:

  • P3: The user-facing change is visual consistency and spacing polish without a broken core workflow.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦐 gold shrimp and patch quality is 🦪 silver shellfish.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 9, 2026, 12:17 PM ET / 17:17 UTC.

roboclaw-bot and others added 4 commits November 9, 2026 17:23
Fold the equal start/end group insets into one --chat-group-inset token,
drop the redundant chip min-height and inset token, round the /new checkout
pair through its existing trigger ids, and leave the PR status focus radius
alone. Main already sits over the fixed CSS ceiling, so the change must not
grow the bundle.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: 9e1aed36-400e-403f-a814-6b234daf5aec
The new node-driven browser test guards geometry contracts that had no
owning test; main already sits over the test-line ceiling, so the exact
growth is recorded as an allocation.

Co-authored-by: vincentkoc <[email protected]>
Worked on by:
- @vincentkoc

Co-authored-by: vincentkoc <[email protected]>
OpenClaw-Publication: b6383d84-cdcb-4f75-8774-ad2e668b9184
@roboclaw-bot
roboclaw-bot merged commit 81ab38d into main Nov 9, 2026
86 checks passed
@roboclaw-bot
roboclaw-bot deleted the openclaw/ui-rhythm-chat-surface branch November 9, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant