Skip to content

fix(ui): align child error notices with the composer - #166312

Merged
vincentkoc merged 1 commit into
mainfrom
fix/chat-attention-alignment
Oct 6, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/chat-attention-alignment

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Related: #166224

What Problem This Solves

Fixes child diagnostic notices appearing narrower than the “Message OpenClaw” box, with an extra 18 px inset on each side.

User Impact

Diagnostic notices now line up with the composer and use its corner shape on desktop and mobile. No configuration or migration is required.

Why This Change Was Made

The notice's display-contents component remains a DOM ancestor, so direct-child CSS selectors skipped it. The shared composer rules now cover wrapped notices while preserving their existing specificity.

Evidence

  • Before: the Chromium regression test fails at both 1280 px and 390 px, measuring the notice 18 px inside the composer.
  • After: both cases pass, checking left edge, width, corner radius, full error text, and the available session action. Mock Gateway; real built Control UI and Chromium.
  • All 11 existing footer browser tests pass, covering neighboring status cards, responsive layouts, menus, and editor autosizing.
  • UI production build passes (9.85 s). Focused E2E: 15.68 s wall time including build, 4.15 s test time; footer suite: 3.18 s wall time.
  • Exact-head CI passed all 26 executed jobs. The extra Testbox changed-file run did not start because file synchronization timed out; completed CI covers the remaining gates.
  • Independent review: no actionable P0–P2 findings. ClawSweeper review found no actionable issues or pre-merge changes. Production delta is two comment lines; the two selectors replace existing selectors. Test delta: +14 lines.

Desktop

Before After
Diagnostic notice inset before the fix Diagnostic notice aligned with the composer after the fix

Mobile

Before After
Mobile diagnostic notice inset before the fix Mobile diagnostic notice aligned after the fix

@vincentkoc vincentkoc self-assigned this Oct 6, 2026
@clawsweeper

clawsweeper Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review in progress

ClawSweeper is reviewing this revision. This supersedes any previous blocked status.

View the workflow run.

@vincentkoc
vincentkoc marked this pull request as ready for review October 6, 2026 21:38
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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. labels Oct 6, 2026
@clawsweeper

clawsweeper Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed October 6, 2026, 5:43 PM ET / 21:43 UTC.

ClawSweeper review

What this changes

The PR makes wrapped child diagnostic notices match the chat composer's width and corners and extends browser coverage to desktop and mobile.

Merge readiness

✅ Ready for maintainer review

Keep open: current main still has the alignment defect, and the inspected desktop/mobile proof supports this focused repair. No actionable introduced bugs were found.

Priority: P3
Reviewed head: d4d36b322d4e322382462c033fbd8524af9c1265

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused shared-style repair with convincing visual evidence and useful browser regression assertions.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The inspected before/after screenshots exercise the actual Control UI notice renderer and shared composer CSS in Chromium at desktop and mobile widths, visibly showing corrected alignment with readable diagnostics and the session action retained. Mock Gateway data is appropriate for this visual contract; no stored-data model changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The inspected before/after screenshots exercise the actual Control UI notice renderer and shared composer CSS in Chromium at desktop and mobile widths, visibly showing corrected alignment with readable diagnostics and the session action retained. Mock Gateway data is appropriate for this visual contract; no stored-data model changes.
Evidence reviewed 7 items Introduced change: The pinned parent-to-head diff changes two direct-child selectors to descendant selectors, retaining specificity and the existing shared geometry rules. The remaining changes extend the existing browser scenario; no runtime state or configuration contract changes.
Concrete rendering boundary: The child notice renders its card inside a light-DOM custom element. Its base class sets the host to display: contents, which removes its layout box but preserves its DOM ancestry. The original direct-child selectors therefore skip the card.
Still necessary on current main: Fetched main retains the direct-child corner selector; its layout selector also retains the direct-child restriction. The preceding merged feature added the notices, rather than fixing their alignment. The latest release predates that feature, and its tree has no child-attention component.
Findings None None.
Security None None.

How this fits together

The Control UI displays child-session diagnostics above the parent chat's message composer. Shared footer styles determine how those notices align with the writing surface.

flowchart TD
  A[Child session status] --> B[Parent chat notices]
  B --> C[Wrapped diagnostic card]
  C --> D[Shared composer styles]
  D --> E[Aligned diagnostic and composer]
  C --> F[Open session action]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source +2, Tests +14. Total +16 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 2 4 2 +2
Tests 1 90 76 +14
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 94 78 +16

Review metrics

None.

Technical review

Best possible solution:

Keep notice geometry owned by the shared composer styles, including cards inside display-contents hosts.

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

Yes: the wrapped light-DOM card and current-main direct-child selectors establish the missed styling path. The supplied browser evidence shows the inset at both viewport sizes; this review did not execute the scenario.

Is this the best way to solve the issue?

Yes: extending the existing shared selectors repairs the DOM-boundary mismatch without duplicating notice styles or changing their specificity.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This repairs a visible spacing and corner inconsistency without blocking chat or changing session behavior.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The inspected before/after screenshots exercise the actual Control UI notice renderer and shared composer CSS in Chromium at desktop and mobile widths, visibly showing corrected alignment with readable diagnostics and the session action retained. Mock Gateway data is appropriate for this visual contract; no stored-data model changes.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The inspected before/after screenshots exercise the actual Control UI notice renderer and shared composer CSS in Chromium at desktop and mobile widths, visibly showing corrected alignment with readable diagnostics and the session action retained. Mock Gateway data is appropriate for this visual contract; no stored-data model changes.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The inspected before/after screenshots exercise the actual Control UI notice renderer and shared composer CSS in Chromium at desktop and mobile widths, visibly showing corrected alignment with readable diagnostics and the session action retained. Mock Gateway data is appropriate for this visual contract; no stored-data model changes.

Label justifications:

  • P3: This repairs a visible spacing and corner inconsistency without blocking chat or changing session behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (screenshot): The inspected before/after screenshots exercise the actual Control UI notice renderer and shared composer CSS in Chromium at desktop and mobile widths, visibly showing corrected alignment with readable diagnostics and the session action retained. Mock Gateway data is appropriate for this visual contract; no stored-data model changes.
  • proof: sufficient: Contributor real behavior proof is sufficient. The inspected before/after screenshots exercise the actual Control UI notice renderer and shared composer CSS in Chromium at desktop and mobile widths, visibly showing corrected alignment with readable diagnostics and the session action retained. Mock Gateway data is appropriate for this visual contract; no stored-data model changes.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The inspected before/after screenshots exercise the actual Control UI notice renderer and shared composer CSS in Chromium at desktop and mobile widths, visibly showing corrected alignment with readable diagnostics and the session action retained. Mock Gateway data is appropriate for this visual contract; no stored-data model changes.

Evidence

What I checked:

  • Introduced change: The pinned parent-to-head diff changes two direct-child selectors to descendant selectors, retaining specificity and the existing shared geometry rules. The remaining changes extend the existing browser scenario; no runtime state or configuration contract changes. (ui/src/styles/chat/layout.css:2964, d4d36b322d4e)
  • Concrete rendering boundary: The child notice renders its card inside a light-DOM custom element. Its base class sets the host to display: contents, which removes its layout box but preserves its DOM ancestry. The original direct-child selectors therefore skip the card. (ui/src/pages/chat/components/chat-child-attention.ts:61, d4d36b322d4e)
  • Still necessary on current main: Fetched main retains the direct-child corner selector; its layout selector also retains the direct-child restriction. The preceding merged feature added the notices, rather than fixing their alignment. The latest release predates that feature, and its tree has no child-attention component. (ui/src/styles/chat/composer-surface.css:128, bd04f4c33ca2)
  • Inspected visual proof: Inspected all four prepared PNGs linked in the captured PR body: desktop and mobile before/after pairs visibly remove the extra notice inset, preserve the full diagnostic, and retain the Open session button. The declared environment is Chromium running the built Control UI with synthetic Gateway data. (d4d36b322d4e)
  • Focused regression coverage: The existing browser scenario now checks left edge, width, and computed border radius at 1280 and 390 pixels, while retaining diagnostic-text and actionability assertions. The body reports baseline failure at both widths, after-fix success, and 11 passing neighboring footer cases. Tests were inspected, not executed during this read-only review; diff whitespace checks passed. (ui/src/e2e/chat-child-attention.e2e.test.ts:74, d4d36b322d4e)
  • Merged feature context and routing: Provided GitHub metadata verifies fix(ui): show child failures and attention in parent chat #166224 merged as 1a7f962. Targeted blame and the patch against its raw recorded parent confirm the child-card source line was added there. This supports routing to vincentkoc beyond authorship of the proposed branch. (ui/src/pages/chat/components/chat-child-attention.ts:61, 1a7f9628e785)

Likely related people:

  • Vincent Koc: Raw commit 1a7f962 adds ui/src/pages/chat/components/chat-child-attention.ts:61 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 1a7f9628e785; files: ui/src/pages/chat/components/chat-child-attention.ts)
  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

@vincentkoc
vincentkoc merged commit 532af70 into main Oct 6, 2026
151 checks passed
@vincentkoc
vincentkoc deleted the fix/chat-attention-alignment branch October 6, 2026 21:48
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

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 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: 🐚 platinum hermit Good normal PR readiness with ordinary 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