Skip to content

fix(ui): render close icon in image lightbox header - #113913

Merged
steipete merged 1 commit into
mainfrom
steipete/image-picker-close-icon-3185e5
Jul 26, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/image-picker-close-icon-3185e5

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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-lightbox is a shadow-DOM Lit component, so the global icon rules in ui/src/styles/components.css (fill: none; stroke: currentColor) never reach its SVG. The shared icons.x template 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 svg rule, matching the sibling pattern in ui/src/components/file-preview-modal.ts.

User Impact

The lightbox close button shows its X icon again.

Before After
before after

Evidence

  • Screenshots above captured via 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 --check clean on the changed file.
  • Codex autoreview (--mode uncommitted, gpt-5.6-sol): clean, no findings.

@steipete
steipete marked this pull request as ready for review July 25, 2026 23:40
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Jul 25, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 26, 2026
@clawsweeper

clawsweeper Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 25, 2026, 7:44 PM ET / 23:44 UTC.

ClawSweeper review

What this changes

The 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 readiness

⚠️ Ready for maintainer review - 2 items remain

This 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 maintainer label; no patch defect is evident from the supplied one-file diff.

Priority: P3
Reviewed head: 8ea3f1319c8e366a6860439c5ab13366c82c2139

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused implementation, direct visual before/after evidence, and successful relevant checks make this a normal good-quality repair; it awaits ordinary merge refresh and completion of the still-running matrix.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (screenshot): The PR body provides directly relevant before/after Control UI screenshots from a Playwright mock-UI run and reports the focused image-lightbox test passing; redact any private runtime details if refreshed proof is posted.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The PR body provides directly relevant before/after Control UI screenshots from a Playwright mock-UI run and reports the focused image-lightbox test passing; redact any private runtime details if refreshed proof is posted.
Evidence reviewed 3 items Focused component fix: The proposed change adds fill: none, stroke: currentColor, width, cap, and join rules to .close svg, matching the stated need to paint the open-path X icon inside the component's Shadow DOM.
Real behavior evidence supplied: The PR body includes linked before/after Control UI screenshots captured with the mock UI and Playwright, showing the close-control glyph before and after the local CSS change.
Automated checks: The supplied check context reports the UI check, lint, production type, security-fast, and Real behavior proof jobs as successful at the reviewed head; remaining matrix jobs were still in progress.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Before merge

  • Resolve merge risk (P1) - The branch is reported as behind main; refresh the merge result and let required checks finish before landing, but this alone is not evidence that the three-way merge regresses current behavior.
  • Complete next step (P2) - No mechanical repair is needed; the protected maintainer label and pending merge refresh require ordinary maintainer review rather than an automated work lane.
Agent review details

Security

None.

PR surface

Source +7. Total +7 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 7 0 +7
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 7 0 +7

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Retain the component-local SVG styling, verify the clean merge result against current main, and land after the remaining required checks complete.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Retain the component-local SVG styling, verify the clean merge result against current main, and land after the remaining required checks complete.

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.

Labels

Label changes:

  • add P3: The PR repairs a small visual Control UI affordance and the supplied evidence shows no broader security, data, delivery, session, or availability impact.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides directly relevant before/after Control UI screenshots from a Playwright mock-UI run and reports the focused image-lightbox test passing; redact any private runtime details if refreshed proof is posted.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body provides directly relevant before/after Control UI screenshots from a Playwright mock-UI run and reports the focused image-lightbox test passing; redact any private runtime details if refreshed proof is posted.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 PR body provides directly relevant before/after Control UI screenshots from a Playwright mock-UI run and reports the focused image-lightbox test passing; redact any private runtime details if refreshed proof is posted.

Label justifications:

  • P3: The PR repairs a small visual Control UI affordance and the supplied evidence shows no broader security, data, delivery, session, or availability impact.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit 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 PR body provides directly relevant before/after Control UI screenshots from a Playwright mock-UI run and reports the focused image-lightbox test passing; redact any private runtime details if refreshed proof is posted.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides directly relevant before/after Control UI screenshots from a Playwright mock-UI run and reports the focused image-lightbox test passing; redact any private runtime details if refreshed proof is posted.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The PR body provides directly relevant before/after Control UI screenshots from a Playwright mock-UI run and reports the focused image-lightbox test passing; redact any private runtime details if refreshed proof is posted.

Evidence

What I checked:

  • Focused component fix: The proposed change adds fill: none, stroke: currentColor, width, cap, and join rules to .close svg, matching the stated need to paint the open-path X icon inside the component's Shadow DOM. (ui/src/components/image-lightbox.ts:127, 8ea3f1319c8e)
  • Real behavior evidence supplied: The PR body includes linked before/after Control UI screenshots captured with the mock UI and Playwright, showing the close-control glyph before and after the local CSS change. (8ea3f1319c8e)
  • Automated checks: The supplied check context reports the UI check, lint, production type, security-fast, and Real behavior proof jobs as successful at the reviewed head; remaining matrix jobs were still in progress. (8ea3f1319c8e)

Likely related people:

  • steipete: The submitted focused fix and supplied visual reproduction connect steipete directly to the image-lightbox behavior, though current-main history could not be independently inspected in this read-only environment. (role: recent area contributor; confidence: low; commits: 8ea3f1319c8e; files: ui/src/components/image-lightbox.ts)

Rank-up moves

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

  • Rebase or refresh the merge result against current main and wait for the remaining required checks to finish.

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.

@steipete
steipete merged commit 34ee065 into main Jul 26, 2026
189 of 198 checks passed
@steipete
steipete deleted the steipete/image-picker-close-icon-3185e5 branch July 26, 2026 00:16
@steipete

Copy link
Copy Markdown
Contributor 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 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: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS 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