`/tmp` does not exist on Windows, and native `save()` never creates the
parent directory, so every capture in styles, events, img and the diff
example failed the whole test there with
Failed to save screenshot: The system cannot find the path
specified. (os error 3)
That is 34 of the 41 failures in the new Windows test job.
`SHOTS_DIR` already pointed at packages/react/screenshots for exactly
this reason, so the fix is to use it, and to create it where it is
defined rather than in a `beforeAll` each file had to remember. The
examples diff test gets the same treatment against
examples/screenshots.
Session: ses_fc0b7cd62ffe3aBw0pyYBOBDjf
Compile the retained GPUIX renderer for wasm32-unknown-unknown and expose the React mutation interface through wasm-bindgen while keeping napi-rs as the desktop host.
Publish the browser loader and Wasm asset, add the ChatGPT browser example and isolated development server, and prepare the release workflow with the required Rust and wasm-bindgen toolchains.
Use GPUI Web bundled IBM Plex Sans and Lilex fonts, add portable raw SVG source rendering, and embed the chat icons so the browser canvas matches the native layout.
Validation: 86 Rust tests, 12 example tests, 3 native image/SVG tests, React builds and package lints, Bun package dry-run, and Playwriter WebGPU visual checks.
Session: ses_fd2303a27ffeNl7JAmV7905R7z
Three fixes for the diff viewer example:
**Black-on-black text**: WordDiffTokens rendered <text> elements with
no explicit color, so GPUI defaulted to black — invisible on dark
backgrounds. Added CODE_FG (#e6edf3) to all word-diff tokens and
plain-text fallback paths. GPUI does not inherit text color from
parent elements like CSS does.
**Window width fill**: Test containers used fixed pixel widths (800,
900, 1000, 1200) smaller than the 1280x800 test canvas, leaving a
black gap on the right. Changed to width/height: '100%' so containers
fill the full viewport. Scroll test keeps height: 300 (needs overflow).
**Scroll container background**: Set backgroundColor on the scroll
container itself rather than on the DiffViewer inner div, because
minHeight: '100%' does not resolve inside GPUI scroll containers
(children get infinite available height). The remaining bottom gap
is the GPUI window background — needs a Rust-side fix for window
background color.
Also added a README note: GPUI defaults text color to black, not
white, and does not inherit color from parent elements. Every <text>
needs explicit color or it will be invisible on dark backgrounds.
Port of critique's diff.tsx from opentui to GPUIX. Renders unified or
split diff views with shiki syntax highlighting, word-level diff
highlights, line number gutters, and scrollable containers.
Key rendering differences from opentui:
- opentui <box> → GPUIX <div>
- opentui <span fg> → GPUIX <text style={{ color }}> (flex-row layout)
- opentui <span bg> → GPUIX <text style={{ backgroundColor }}>
- opentui RGBA → hex/rgba() color strings
Components:
- DiffViewer: top-level component, accepts hunks/filePath/splitView
- HighlightedTokens: renders shiki tokens as colored text in flex rows
- WordDiffTokens: word-level diff with background highlights
- UnifiedView / SplitView: two layout modes controlled by splitView prop
Visual tests (6 total) use the native GPUI test renderer with Metal
rendering and screenshot capture for before/after validation.
Also:
- Export hasNativeTestRenderer from @gpuix/react (was missing)
- Add README note about GPUI defaulting text color to black (not white,
no CSS inheritance) — every <text> needs explicit color