Repository navigation
fix(ui): render close icon in image lightbox header - #113913
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 25, 2026, 7:44 PM ET / 23:44 UTC. ClawSweeper reviewWhat this changesThe PR adds local SVG stroke styling to the Control UI image lightbox so its Shadow DOM close button renders the shared X icon visibly. Merge readinessThis is a narrow, plausible Control UI repair with direct before/after visual evidence and a focused test claim. It must remain open for normal maintainer handling because it carries the protected Priority: P3 Review scores
Verification
How this fits togetherThe Control UI opens chat images in a Lit image-lightbox component. Its close control uses a shared SVG icon inside Shadow DOM, where global icon CSS does not apply and component-local SVG rules determine the visible result. flowchart LR
A[Chat image] --> B[Image lightbox]
B --> C[Shadow DOM header]
D[Shared X icon] --> C
C --> E[Component SVG rules]
E --> F[Visible close control]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +7. Total +7 across 1 file. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the component-local SVG styling, verify the clean merge result against current Do we have a high-confidence way to reproduce the issue? Yes, at source level: the shared open-path X icon is rendered within Shadow DOM while the prior stroke rule is global. The PR also supplies a direct mocked-Control-UI before/after capture, although the local artifact files could not be independently opened in this review environment. Is this the best way to solve the issue? Yes. Component-local SVG styling is the narrowest maintainable repair because global Control UI icon CSS does not cross the lightbox Shadow DOM boundary, and the properties match the stated sibling component convention. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 9defe24ec2fd. 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
|
|
Merged via squash.
|
What Problem This Solves
The image lightbox (opened from chat images in the Control UI) rendered its close button as an empty pill — the X icon was invisible.
Why This Change Was Made
openclaw-image-lightboxis a shadow-DOM Lit component, so the global icon rules inui/src/styles/components.css(fill: none; stroke: currentColor) never reach its SVG. The sharedicons.xtemplate is a pair of open paths with no inline stroke attributes; without a stroke they paint nothing. The fix adds the standard icon stroke properties to the component's own.close svgrule, matching the sibling pattern inui/src/components/file-preview-modal.ts.User Impact
The lightbox close button shows its X icon again.
Evidence
pnpm dev:ui:mock+ Playwright (chromium), before/after the CSS change.node scripts/run-vitest.mjs ui/src/components/image-lightbox.test.ts— 6/6 pass.oxlint+oxfmt --checkclean on the changed file.--mode uncommitted, gpt-5.6-sol): clean, no findings.