Skip to content

fix(web): render transparent previews on white - #9463

Merged
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
UtkarshUsername:fix/preview-canvas-background
Sep 3, 2026
Merged

fix(web): render transparent previews on white#9463
juliusmarminge merged 2 commits into
pingdotgg:mainfrom
UtkarshUsername:fix/preview-canvas-background

Conversation

@UtkarshUsername

@UtkarshUsername UtkarshUsername commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

What Changed

Changed the embedded preview webview backing surface from the T3 theme background to white.

Why

Transparent top-level documents currently inherit the selected T3 application theme because the webview is composited over the app background. In dark themes this renders otherwise unstyled pages black and changes how semi-transparent page backgrounds appear.

Using a white backing surface matches the default canvas users see when opening the same page in a regular browser. Explicit page backgrounds continue to render unchanged.

UI Changes

Before:
T3 Code is on the right
Screenshot 2026-09-03 123216
image

After:
image
image

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes (not applicable)

Verification:

  • vp fmt --check apps/web/src/browser/HostedBrowserWebview.tsx
  • vp lint apps/web/src/browser/HostedBrowserWebview.tsx
  • vp run --filter @t3tools/web typecheck

Created with GPT-5.6 in the Codex harness.


Note

Low Risk
Single visual styling change on the preview webview container with no auth, data, or routing impact.

Overview
Sets the hosted preview webview backing layer to a fixed white (bg-white) instead of the theme bg-background, so transparent or unstyled pages no longer pick up the app theme (especially dark mode) behind the guest content.

Active-tab ring/shadow and other preview chrome are unchanged; only the compositing surface behind the embedded page matches a normal browser canvas.

Reviewed by Cursor Bugbot for commit 7e42800. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Render transparent previews on white in HostedBrowserWebview

Changes the webview container background from the theme background color to a fixed white so transparent previews display correctly. Active-tab ring and shadow styling remain unchanged.

Macroscope summarized 7e42800.

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Sep 3, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This small, isolated Electron UI change makes transparent preview content render against hard-coded white rather than the theme background, affecting existing preview and related presentation states. Because it changes the default preview appearance, explicit human review is warranted.

You can add or adjust custom eligibility rules. Learn more.

@UtkarshUsername
UtkarshUsername marked this pull request as draft September 3, 2026 18:54
@UtkarshUsername
UtkarshUsername marked this pull request as ready for review September 3, 2026 19:43
@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). size:XS 0-9 changed lines (additions + deletions). and removed size:XS 0-9 changed lines (additions + deletions). size:L 100-499 changed lines (additions + deletions). labels Sep 3, 2026
@juliusmarminge
juliusmarminge merged commit db8d60f into pingdotgg:main Sep 3, 2026
24 checks passed
@UtkarshUsername
UtkarshUsername deleted the fix/preview-canvas-background branch September 3, 2026 19:46
github-actions Bot added a commit to omarcresp/t3code-flake that referenced this pull request Sep 4, 2026
## What's Changed
* fix(web): make right panel tabs easier to scroll by @maria-rcks in pingdotgg/t3code#9461
* fix(web): render transparent previews on white by @UtkarshUsername in pingdotgg/t3code#9463
* fix(mobile): show loading and syncing in the working pill by @juliusmarminge in pingdotgg/t3code#9466
* fix(server): keep a/ and b/ prefixes in rendered git patches by @Mnigos in pingdotgg/t3code#9438
* fix(server): full-access OpenCode threads no longer ask for approvals by @shivamhwp in pingdotgg/t3code#9282
* fix(web): reuse pull request list data while loading by @maria-rcks in pingdotgg/t3code#9467
* feat(web): let users turn off composer collapse on blur and scroll by @juliusmarminge in pingdotgg/t3code#9469

## New Contributors
* @Mnigos made their first contribution in pingdotgg/t3code#9438

**Full Changelog**: pingdotgg/t3code@v0.0.39-nightly.20260903.1272...v0.0.39-nightly.20260903.1273

Upstream release: https://github.com/pingdotgg/t3code/releases/tag/v0.0.39-nightly.20260903.1273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants