Skip to content

test(ui): React parity — child state isolation + automatic bailout#39

Merged
monstercameron merged 1 commit into
masterfrom
react-parity/state-isolation
Jun 25, 2026
Merged

test(ui): React parity — child state isolation + automatic bailout#39
monstercameron merged 1 commit into
masterfrom
react-parity/state-isolation

Conversation

@monstercameron

Copy link
Copy Markdown
Owner

Ports ReactIncremental state-preservation/bailout: child keeps state across parent re-render; child bails out when props unchanged (GWC auto-memoizes). All pass; no bug. No version bump.

🤖 Generated with Claude Code

Ports React's ReactIncremental state-preservation / bailout behavior:
- a child component keeps its own state across a parent re-render
- a parent re-render that does not change the child's props bails out of
  re-rendering the child (GWC auto-memoizes by prop equality — no React.memo
  wrapper needed)

Verified via the native reconciler harness. All pass; no GWC bug. No version bump.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@monstercameron monstercameron merged commit 08b862b into master Jun 25, 2026
2 checks passed
@monstercameron monstercameron deleted the react-parity/state-isolation branch June 25, 2026 03:43
monstercameron pushed a commit that referenced this pull request Jul 6, 2026
…ure (#39)

The framework's real target is GOOS=js GOARCH=wasm, but no CI lane ran the many
*_wasm_test.go suites — native `go test ./...` skips them entirely, so a wasm-only
regression could merge unseen. New wasm-tests workflow runs every package that ships
a wasm test (examples + vendored third_party excluded) under the JS/wasm target via
Go's Node-backed exec wrapper, enumerated from the tree so new suites are picked up
automatically. API-baseline tests are skipped (they pin the native surface, which
differs under wasm build tags, and are already gated by the API Baseline workflow).

Turning the gate on immediately surfaced a pre-existing failure the missing gate had
hidden: virtualization's TestListWASMRestoresViewportAndPersistsSnapshots panicked
because its mock document lacked dispatchEvent — the app fires a "gwc:ready"
CustomEvent on document after first commit (ui/ready_wasm.go). Added the dispatchEvent
stub (+ release) to the harness. Locally verified: all 27 wasm-test packages pass
under the exact CI command.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants