Skip to content

fix(ui): preserve transparent chat widget backgrounds - #151972

Merged
steipete merged 1 commit into
mainfrom
codex/fix-chat-widget-transparency
Sep 18, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/fix-chat-widget-transparency

Conversation

@steipete

@steipete steipete commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Inline visualizations with transparent backgrounds show a white rectangle against the chat's tinted background.

User Impact

Transparent areas of chat widgets now blend into the conversation surface. Surfaces explicitly painted by a widget retain their own backgrounds.

Why This Change Was Made

The shared preview iframe painted var(--card) behind otherwise transparent widget documents. Make that iframe transparent so the existing chat surface shows through.

Evidence

Verified the reported visualization in Chrome using the equivalent stylesheet override. Its surrounding white rectangle disappears while the mock search panel remains white. The screenshots below are inspected crops of a synthetic design concept.

Stylelint, formatting, and git diff --check pass. No production JavaScript or widget sandbox behavior changes.

CI recovery and retained diagnostic

Earlier CI exposed inconsistent quota-test fixes, now reconciled on main by #151947 and #152010. This PR contains only the CSS change. The complete hosted suite passed again on the final CSS-only head: CI run 35382388693, commit 65802023cc75341ef41ddd7fae7984fb4c85b943.

One focused local automatic-recovery run failed earlier in unchanged quota-probe behavior, before the status assertion. Saved-block clearing and catalog recovery passed. That diagnostic is retained; the later full hosted suite passed without weakening assertions or retrying that local failure away.

Before After
White iframe backdrop Transparent iframe backdrop

@clawsweeper

clawsweeper Bot commented Sep 18, 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.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: XS maintainer Maintainer-authored PR labels Sep 18, 2026
@steipete
steipete marked this pull request as ready for review September 18, 2026 17:04
@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 Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 18, 2026, 3:13 PM ET / 19:13 UTC (Revision 6).

ClawSweeper review

What this changes

Makes chat widget preview frames transparent so unpainted areas blend into the conversation while explicitly painted widget surfaces retain their backgrounds.

Merge readiness

✅ Ready for maintainer review

This remains a useful, focused fix: current main still paints the unwanted backdrop. The inspected screenshots support the visual result, and no actionable correctness or security findings remain.

Priority: P3
Reviewed head: 65802023cc75341ef41ddd7fae7984fb4c85b943

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, maintainable visual fix with directly relevant screenshot proof and no actionable findings.
Proof confidence 🦞 diamond lobster (5/6) ✨ media proof bonus Sufficient (screenshot): The inspected Chrome before/after screenshots demonstrate the exact preview-frame background change using an equivalent stylesheet override: transparent widget areas blend into the host while the painted search panel stays white.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (screenshot): The inspected Chrome before/after screenshots demonstrate the exact preview-frame background change using an equivalent stylesheet override: transparent widget areas blend into the host while the painted search panel stays white.
Evidence reviewed 7 items Verified introduced change: The pinned merge-base-to-head diff changes only the preview-frame background and removes its obsolete explanatory comment; git diff --check passes.
Still necessary on current main: Fetched main retains background: var(--card) on the shared preview frame. The latest-release source inspection failed because a required Git object could not be retrieved (HTTP 403), so no shipped-fix claim is made.
Documented transparency contract: Widget authoring guidance explicitly asks for transparent page backgrounds so widgets belong to their host surface; the existing theme bridge continues supplying colors for painted controls and cards.
Findings None None.
Security None None.

How this fits together

The Control UI displays generated widget documents inside sandboxed preview frames. The frame’s CSS determines what appears behind transparent portions of those documents.

flowchart LR
  A[Widget document] --> B[Sandboxed preview frame]
  C[Conversation background] --> B
  B --> D{Widget paints a background?}
  D -->|Yes| E[Widget color remains visible]
  D -->|No| F[Conversation surface shows through]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -4. Total -4 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 1 1 5 -4
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 1 5 -4

Review metrics

None.

Technical review

Best possible solution:

Let the existing conversation surface show through transparent widget frames while preserving widget-owned colors and the current theme bridge.

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

Yes: a transparent widget on a tinted conversation surface exposes main’s opaque iframe backdrop, matching the supplied before screenshot. This review verified the source path and images without running the application.

Is this the best way to solve the issue?

Yes: changing the shared frame background directly restores the documented transparency contract without adding a second rendering path or changing widget content.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P3: This repairs a cosmetic widget-background mismatch without changing interaction, configuration, or runtime permissions.
  • 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 Chrome before/after screenshots demonstrate the exact preview-frame background change using an equivalent stylesheet override: transparent widget areas blend into the host while the painted search panel stays white.
  • proof: sufficient: Contributor real behavior proof is sufficient. The inspected Chrome before/after screenshots demonstrate the exact preview-frame background change using an equivalent stylesheet override: transparent widget areas blend into the host while the painted search panel stays white.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. The inspected Chrome before/after screenshots demonstrate the exact preview-frame background change using an equivalent stylesheet override: transparent widget areas blend into the host while the painted search panel stays white.

Evidence

What I checked:

  • Verified introduced change: The pinned merge-base-to-head diff changes only the preview-frame background and removes its obsolete explanatory comment; git diff --check passes. (ui/src/styles/chat/tool-cards.css:989, 65802023cc75)
  • Still necessary on current main: Fetched main retains background: var(--card) on the shared preview frame. The latest-release source inspection failed because a required Git object could not be retrieved (HTTP 403), so no shipped-fix claim is made. (ui/src/styles/chat/tool-cards.css:993, 861f60e0bc5c)
  • Documented transparency contract: Widget authoring guidance explicitly asks for transparent page backgrounds so widgets belong to their host surface; the existing theme bridge continues supplying colors for painted controls and cards. Public docs: docs/tools/show-widget.md. (docs/tools/show-widget.md:92, 65802023cc75)
  • Rendering and security boundary: The production Canvas view uses the changed preview-frame class. Widget wrapper bodies do not paint a background, and the sandbox host already uses transparent backgrounds. The introduced CSS does not change sandbox flags, theme messages, authorization, or dependency contracts. (ui/src/components/canvas-widget-view.ts:350, 65802023cc75)
  • Inspected before-and-after proof: Inspected prepared proof-image-1.png and proof-image-2.png from the media manifest. The PR describes Chrome verification using the equivalent stylesheet override on a synthetic widget: the surrounding white backdrop becomes the tinted host surface while the search panel remains white. Both images are embedded in the captured PR body. (65802023cc75)
  • Feature-history routing: Current-main history identifies prior widget-theme work by Peter Steinberger and scrollbar presentation work by Vyctor H. Brzezowski. Exact line-introduction attribution was not established; these are routing candidates. (ui/src/lib/widget-theme.ts, 3f69289f16f7)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Vyctor H. Brzezowski: 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.

History

Review history (5 earlier review cycles)
  • reviewed 2026-09-18T17:10:13.274Z sha e9d663d06b8bb6708e2ad53066fa62dcafc23db9 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T17:45:39.164Z sha 6a454b9b6c1f76d5759d3bc320369916717b4cd9 :: blocked before merge. :: none
  • reviewed 2026-09-18T17:52:54.028Z sha 5ce326e2998209e817e9d1ec0e0d6d3ccc820403 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T18:25:12.733Z sha 5f2666a0abb9c1dbe66a3292924115910d6a32ad :: needs maintainer review before merge. :: none
  • reviewed 2026-09-18T18:58:46.064Z sha 6580202 :: needs maintainer review before merge. :: none

@steipete
steipete force-pushed the codex/fix-chat-widget-transparency branch from 6a454b9 to 5ce326e Compare September 18, 2026 17:46
@steipete
steipete force-pushed the codex/fix-chat-widget-transparency branch from 5f2666a to 6580202 Compare September 18, 2026 18:49
@steipete
steipete merged commit 903be39 into main Sep 18, 2026
95 checks passed
@steipete
steipete deleted the codex/fix-chat-widget-transparency branch September 18, 2026 19:33
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 18, 2026
…pr-149282-proof-20260919

* commit '534100dfb1eda19b0793c14fd0fba67eaf729ee0': (1800 commits)
  perf(gateway): avoid roster scans in catalog delivery (#151938)
  fix(telegram): preserve dispatcher composition under Bun (#152055)
  test(gateway): seed fixture auth without native plugin imports (#152058)
  test: restore document focus after shared cleanup (#152065)
  fix(ui): preserve attachment reader focus during link refresh (#151858)
  perf(tests): isolate metadata heap checks (#152063)
  fix(ui): make RTL side panel resizing follow input direction (#151989)
  fix(doctor): move Workshop diagnostic reads off the caller thread (#149905)
  fix(google): prevent Gemini errors from optional schema metadata (#151327)
  test: retain safe quota recovery failure evidence (#152003)
  test(qa-lab): stabilize self-yield follow-up release proof (#152048)
  perf(codex): reduce residual app-server framing overhead (#152035)
  improve(cron): batch automation names in chat history (#152054)
  fix(ui): preserve transparent chat widget backgrounds (#151972)
  fix(ui): HTML attachment previews leave most of the side panel unused (#152031)
  perf(gateway): coalesce person presence activity broadcasts (#152042)
  fix(ui): keep session Actions clickable beside attachments (#151975)
  refactor(qa): reuse Matrix CLI JSON parser (#152087)
  feat(ui): navigate message images in the lightbox (#152027)
  fix(codex): avoid fallback replies after intentional silence (#151951)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 19, 2026
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