Skip to content

fix(ui): keep sidebar icon endcap intact in single-line session rows - #126567

Merged
steipete merged 1 commit into
mainfrom
steipete/message-preview-icon-audit-530e26
Aug 20, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/message-preview-icon-audit-530e26

Conversation

@steipete

@steipete steipete commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Audit of the sessions sidebar with Show message preview turned off (single-line rows). With preview off a row has only one line, but the icon logic that normally lives on the second row (running spinner, unread dot, badges, facepile, trail) must survive on that single line. Two defects broke that:

  1. Long titles crushed the icon endcap. In --single-line rows the title used flex: 1 1 auto (flex basis = full text width), so when the title overflowed, shrink was distributed onto the icon endcap too — a 24px endcap collapsed to ~7px and the spinner/unread/badge icons were clipped away. The two-line layout never has this problem because the subtitle uses basis 0 and absorbs all shrink first.
  2. Native catalog session rows always rendered a phantom second line. renderCatalogSessionRow emitted the two-line skeleton unconditionally and never received --single-line, so Codex/Claude Code catalog rows sat at 46px with an empty 18px details line under the title — misaligned with every other subtitle-less row (30px), in both preview modes.

Why This Change Was Made

Preview-off is a supported display mode; the status icons are exactly what remains actionable in that mode and must never be silently clipped. Catalog rows never carry preview text at all, so they should always collapse to the one-line shape.

User Impact

  • Single-line rows keep every status icon visible; long titles truncate with an ellipsis instead of eating the icons (same contract as the two-line endcap under a long subtitle).
  • Codex/Claude Code catalog rows now match gateway rows: 30px, one line, no dead whitespace.
  • Rows that must stay two-line with preview off (attention/error text, queued explanation, critical observer headline) are unchanged — that carve-out is intentional (session-row-subtitle.ts) and verified.

Evidence

Mocked Control UI (pnpm dev:ui:mock) + Playwright geometry audit across preview on/off, dark theme:

  • Pre-fix: long-title single-line row endcap 24px -> 7.05px (icons clipped); catalog child rows h=46 with an empty details line. Post-fix: endcap stays 24px under the same title; catalog rows h=30, --single-line, uniform with gateway rows.
  • Hover/touch overlays and child-row trails measured correct in single-line mode (action overlay centered, endcap fades on hover as designed).

Long-title row, before (spinner crushed to a sliver) vs after:

before
after

Catalog section (CODEX / CLAUDE CODE), before (phantom second line under each row) vs after:

Validation:

  • New regression in chat-flow.sidebar-presentation.e2e.test.ts (long-title row: endcap keeps intrinsic atom width, title reports overflow) — verified to FAIL on pre-fix CSS and pass after.
  • codex-sessions.e2e.test.ts density assertions updated to the new contract (all subtitle-less rows single-line at ~30px).
  • Focused suites green: codex-sessions, chat-flow.sidebar-presentation, session-management.trailing-state (17 tests).
  • pnpm check:changed green (format, i18n verify, tsgo core+UI, lint lanes).
  • Codex autoreview (Sol, high): clean, no findings.

Production LOC delta: net ~+4 (3 comment lines + 1 class token); the rest is test coverage.

Opportunistic CI fix (called out per Pathfinder rule)

First CI attempt failed in checks-node-compact-small-6 on src/gateway/server.sessions.compaction-read-errors.test.ts — unrelated to this UI diff and passing locally (also with --isolate=false). Residual flake class after e294c15: a stray transcript read on a slow shared worker consumes the queued mockRejectedValueOnce, so the compaction read hits the real store and succeeds (expected true to be false). Fixed in this PR by making the rejection sticky (mockRejectedValue); beforeEach already resets the mock per test, so nothing leaks across tests.

@clawsweeper

clawsweeper Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 20, 2026 07:04
@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR gateway Gateway runtime labels Aug 20, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Aug 20, 2026
@clawsweeper

clawsweeper Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 20, 2026, 10:29 AM ET / 14:29 UTC.

ClawSweeper review

What this changes

The branch makes one-line session-sidebar titles truncate before status icons and marks native catalog session rows as compact single-line rows.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

No blocking findings. This maintainer-owned PR remains necessary because current main still lets a long compact-row title shrink the status endcap and leaves native catalog rows without the compact-row marker.

Priority: P3
Reviewed head: 3e59f7e9ca3f69429ac6d8b9000751c5d36ddb90

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) This is a tightly scoped owner-boundary repair with strong UI evidence and regression coverage for both the flex and catalog-row behaviors.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The PR body contains directly relevant before/after Control UI media and a described after-fix mocked-gateway Playwright geometry audit; the focused browser tests reinforce that proof.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body contains directly relevant before/after Control UI media and a described after-fix mocked-gateway Playwright geometry audit; the focused browser tests reinforce that proof.
Evidence reviewed 6 items Current-main flex behavior: Current main gives a single-line session title an automatic flex basis, while the established two-line subtitle uses a zero basis; this is the source-level cause of the endcap competing with long title width.
Current-main catalog shape: The native catalog renderer on current main emits the shared row markup without the single-line class, even though its native path renders no subtitle.
Owner-boundary and sibling check: Live catalog rows route through the generic renderer, whose subtitle resolver retains attention, queued, and critical-observer text when previews are hidden; only subtitle-less native catalog rows receive the unconditional compact marker.
Findings None None.
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts

Result: FAIL (failed) — step 1 run node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts: terminal command did not produce output within 20 seconds: "node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts"

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts
runner@runnervm76f27:/tmp/clawsweeper-live-proof-126567-GlCEEe/target$ node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoad
er runner ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-126567-GlCEEe/target

node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts












































Assertions:

  • FAIL expect_output: keeps session titles on the first line and collapses rows that have no second line

How this fits together

The Control UI renders gateway sessions and native coding-catalog sessions into a shared sidebar row design. Renderer decisions select the row shape, and the sidebar CSS allocates width between the title and its status-icon endcap.

flowchart LR
  A[Gateway session data] --> B[Live session renderer]
  A --> C[Catalog session renderer]
  B --> D[Subtitle decision]
  C --> E[Compact row class]
  D --> F[Sidebar flex layout]
  E --> F
  F --> G[Title and status endcap]
Loading

Before merge

  • Resolve merge risk (P1) - Production code is net +3 lines: the compact class is required to express the native catalog row’s subtitle-less shape, and the accompanying comment documents the flex invariant; no net-neutral change preserves that renderer boundary as clearly.
  • Complete next step (P2) - No repair lane is needed: the bounded fix is already implemented on this maintainer-owned PR, with only normal exact-head CI completion remaining.
Agent review details

Security

None.

PR surface

Source +3, Tests +39. Total +42 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 5 2 +3
Tests 2 51 12 +39
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 56 14 +42

Review metrics

Metric Value Why it matters
Production versus regression coverage production +3 net; tests +39 net The production growth is one necessary row-shape marker plus its invariant comment; the remaining change is focused browser coverage for flex geometry and catalog density.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the explicit native-catalog compact marker and the zero-basis title rule, preserving the generic subtitle owner for rows that intentionally remain two-line.
  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 explicit native-catalog compact marker and the zero-basis title rule, preserving the generic subtitle owner for rows that intentionally remain two-line.

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

Yes, at source level: current main uses an automatic flex basis for compact titles and omits the compact class from native catalog rows; the branch adds focused browser assertions for both outcomes.

Is this the best way to solve the issue?

Yes. The patch changes the layout owner to match the existing subtitle shrink contract and marks only the native renderer that cannot produce preview text, leaving meaningful generic subtitles unchanged.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains directly relevant before/after Control UI media and a described after-fix mocked-gateway Playwright geometry audit; the focused browser tests reinforce that proof.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body contains directly relevant before/after Control UI media and a described after-fix mocked-gateway Playwright geometry audit; the focused browser tests reinforce that proof.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • remove rating: 🐚 platinum hermit: Current PR rating is rating: 🦞 diamond lobster, so this older rating label is no longer current.

Label justifications:

  • P3: This is a bounded Control UI presentation repair with no evidence of delivery, state, auth, security, or availability impact.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The PR body contains directly relevant before/after Control UI media and a described after-fix mocked-gateway Playwright geometry audit; the focused browser tests reinforce that proof.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body contains directly relevant before/after Control UI media and a described after-fix mocked-gateway Playwright geometry audit; the focused browser tests reinforce that proof.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body contains directly relevant before/after Control UI media and a described after-fix mocked-gateway Playwright geometry audit; the focused browser tests reinforce that proof.

Evidence

What I checked:

  • Current-main flex behavior: Current main gives a single-line session title an automatic flex basis, while the established two-line subtitle uses a zero basis; this is the source-level cause of the endcap competing with long title width. (ui/src/styles/layout.css:4259, 267ffc4754a0)
  • Current-main catalog shape: The native catalog renderer on current main emits the shared row markup without the single-line class, even though its native path renders no subtitle. (ui/src/components/app-sidebar-session-catalog-render.ts:457, 267ffc4754a0)
  • Owner-boundary and sibling check: Live catalog rows route through the generic renderer, whose subtitle resolver retains attention, queued, and critical-observer text when previews are hidden; only subtitle-less native catalog rows receive the unconditional compact marker. (ui/src/components/app-sidebar-session-list-render.ts:297, 3e59f7e9ca3f)
  • Focused browser regression coverage: The added geometry check requires a long compact title to overflow while its icon endcap remains within the row and at least as wide as its icon atoms; catalog coverage requires all subtitle-less rows to share the compact height. (ui/src/e2e/chat-flow.sidebar-presentation.e2e.test.ts:462, 3e59f7e9ca3f)
  • History and area ownership: Blame ties the current-main compact-title and native-catalog lines to the current source snapshot attributed to Peter Steinberger; this PR changes those same lines and remains a targeted repair. (ui/src/styles/layout.css:4259, 1d2986b06fbe)
  • After-fix behavior proof: The PR body supplies before/after Control UI screenshots and reports a mocked-Control-UI Playwright geometry audit plus focused passing suites for the changed sidebar behavior. (3e59f7e9ca3f)

Likely related people:

  • Peter Steinberger: Current-main blame attributes both the compact-title rule and native catalog-row markup to Peter Steinberger, and the reviewed head repairs those same paths. (role: current-main source author and recent area contributor; confidence: high; commits: 1d2986b06fbe, 3e59f7e9ca3f; files: ui/src/styles/layout.css, ui/src/components/app-sidebar-session-catalog-render.ts, ui/src/components/app-sidebar-session-row-render.ts)

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 (2 earlier review cycles)
  • reviewed 2026-08-20T07:17:21.749Z sha b87979f :: needs maintainer review before merge. :: none
  • reviewed 2026-08-20T07:50:43.029Z sha b87979f :: needs maintainer review before merge. :: none

With message preview off, rows collapse to one line and the second-row icon
logic (spinner, unread dot, badges, facepile, trail) rides beside the title.
Two defects broke that:

- Long titles crushed the icon endcap: the single-line title used flex-basis
  auto, so overflow shrink was distributed onto the endcap (24px -> ~7px),
  clipping the status icons. Basis 0 now mirrors the two-line subtitle
  contract: text absorbs all shrink before icons do.
- Native catalog session rows always rendered the two-line skeleton with an
  empty details line (46px vs 30px) and never collapsed, in both preview
  modes. Catalog rows never carry preview text, so they are now always
  single-line.

Regression coverage: long-title endcap geometry in
chat-flow.sidebar-presentation.e2e.test.ts (fails pre-fix), and
codex-sessions.e2e.test.ts density assertions updated to the new
all-single-line contract.
@steipete
steipete force-pushed the steipete/message-preview-icon-audit-530e26 branch from b87979f to 3e59f7e Compare August 20, 2026 14:24
@openclaw-barnacle openclaw-barnacle Bot removed the gateway Gateway runtime label Aug 20, 2026
@steipete

Copy link
Copy Markdown
Contributor Author

ClawSweeper rank-up moves applied: rebased onto current main (head 3e59f7e9ca3; the superseded sticky-mock deflake commit was dropped in favor of main's session-keyed injection from the parallel fix) and reran the focused UI e2e suites plus server.sessions.compaction-read-errors.test.ts on the rebased head — all green. Fresh Codex autoreview rerun on the rebased branch; landing after exact-head CI completes.

@steipete
steipete merged commit 855599d into main Aug 20, 2026
147 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the steipete/message-preview-icon-audit-530e26 branch August 20, 2026 14:37
@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Aug 20, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 21, 2026
…penclaw#126567)

With message preview off, rows collapse to one line and the second-row icon
logic (spinner, unread dot, badges, facepile, trail) rides beside the title.
Two defects broke that:

- Long titles crushed the icon endcap: the single-line title used flex-basis
  auto, so overflow shrink was distributed onto the endcap (24px -> ~7px),
  clipping the status icons. Basis 0 now mirrors the two-line subtitle
  contract: text absorbs all shrink before icons do.
- Native catalog session rows always rendered the two-line skeleton with an
  empty details line (46px vs 30px) and never collapsed, in both preview
  modes. Catalog rows never carry preview text, so they are now always
  single-line.

Regression coverage: long-title endcap geometry in
chat-flow.sidebar-presentation.e2e.test.ts (fails pre-fix), and
codex-sessions.e2e.test.ts density assertions updated to the new
all-single-line contract.
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: 🦞 diamond lobster Very strong PR readiness with only minor 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.

1 participant