Repository navigation
test(octane): pin Activity effects for updates under a held visibility change - #2248
Merged
Merged
Conversation
…y change Issue #1351 reported two symptoms of a root render that changes an Activity's visibility and then suspends with no boundary: the hidden panel was revealed before commit, and an update accepted inside a still-visible Activity ran no effects until the held render was cancelled. The runtime redesign (#2103) fixed both; its dropped-render test covers the first. Cover the second in both directions and at both priorities: while the visibility change is held, an update inside a visible Activity runs its layout and passive effects, and one inside a hidden Activity keeps them disconnected. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jonkwheeler
marked this pull request as ready for review
October 27, 2026 11:48
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website | 3b5bc8b | Commit Preview URL Branch Preview URL |
Oct 27 2026, 11:50 AM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website-mcp | 3b5bc8b | Commit Preview URL Branch Preview URL |
Oct 27 2026, 11:49 AM |
Contributor
Benchmark report
Compares js-framework: 1k/10k row operations
All 20 timed operations (19 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)No changes across 111 measured values. Public-import reachability bundles (bytes)No changes across 129 measured values. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1351.
#1351 reported two symptoms. Both happen when a root render changes an
Activity's visibility and a later sibling then suspends with no Suspense boundary:Activityran no layout or passive effects until the held render was cancelled.Neither reproduces on current main. The runtime redesign (#2103,
175b85dfcf) fixed both by making visibility a commit op: "A changing Activity journals its visibility record, its Block's inactive flag and its suspense handler, and reveals at commit, so a dropped render leaves it as it was." #2103 also addedstructure-commit.test.ts's "a dropped … render leaves a … Activity …" cases, which pin the first symptom. Nothing pinned the second.This PR adds that coverage. While the root render that changes visibility is held, an update inside the
Activityruns its effects when the committed screen is visible and keeps them disconnected when it is hidden. It covers both directions at urgent and transition priority. It is test-only.Changes
packages/octane/tests/_fixtures/structure-commit.tsrx: addsActivityCounterApp, a counter inside anActivitythat logs layout and passive effects, with the file's existing never-settlingGatesibling.ActivityLeafis unchanged, so the existing dropped-render cases log the same entries.packages/octane/tests/structure-commit.test.ts: adds four cases (two directions × two priorities) to "Activity visibility changes at commit".Validation
pnpm format:check(not run;pnpm format:files:checkon both changed files is clean)pnpm typecheck(not run;pnpm typecheck:fileson both changed files exits 0)pnpm test(not run; the local machine is too loaded for the full suite)vitest run --project octane --project octane-prodoverstructure-commit,activity,activity-suspense-retryandstyle-hidden-commit: 148/148 pass, including the 8 new runs.e43390610c, the parent of refactor: integrate next runtime redesign #2103, in both compile modes.expected '' to be 'none'.expected [] to deeply equal ['layout:1', 'passive:1'].e43390610c(display: '', ref detached) and passes on175b85dfcfand main.pnpm syncleaves the tree clean.Risk / follow-ups
Provenance
agent-authored)🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Note
Low Risk
Test and fixture changes only; no runtime or production code paths modified.
Overview
Adds test-only coverage for #1351: while a root render that toggles
Activityvisibility is held (never-settling siblingGate), an update inside theActivitymust follow committed visibility—layout and passive effects run when still visible, and stay skipped when still hidden.The fixture gains
ActivityCounterAppwith a clickable counter that logsuseLayoutEffect/useEffecton count changes, mirroring the existingActivityApp+Gatesuspend pattern.structure-commit.test.tsadds four cases (visible↔hidden × urgent/transition) under Activity visibility changes at commit, asserting DOMdisplay, counter state, and effect logs during the held render.Reviewed by Cursor Bugbot for commit 3b5bc8b. Bugbot is set up for automated code reviews on this repo. Configure here.