Repository navigation
fix(octane): keep a committed View Transition running through urgent updates - #2117
Merged
Merged
Conversation
…updates React skips only a transition still preparing (flushPendingEffects). Once the update callback committed, urgent work (flushSync, an event setState, a layout-effect setState) changes the live DOM under the running animation instead of skipping it.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website-mcp | 416a1a5 | Commit Preview URL Branch Preview URL |
Oct 16 2026, 06:00 PM |
Contributor
Benchmark report
Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)
71 other measured values are unchanged. Public-import reachability bundles (bytes)No changes across 120 measured values. |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website | 416a1a5 | Commit Preview URL Branch Preview URL |
Oct 16 2026, 05:58 PM |
trueadm
marked this pull request as ready for review
October 16, 2026 17:41
An urgent update against a committed View Transition now runs that commit's held passive effects first, as React's flushPendingEffects does. wrapResume's urgent-sibling branch uses the same committed-only skip. 'committed' is set when ready resolves, which is where React clears pendingViewTransition.
domgan-oai
added a commit
to openai-oss-forks/octane
that referenced
this pull request
Oct 16, 2026
Port the behavior from octanejs#2117 to the split next runtime, including passive-effect release and partial-capture handling.
4 of 5 tasks
trueadm
pushed a commit
that referenced
this pull request
Oct 16, 2026
#2119) * docs(octane): describe urgent updates during a running View Transition Pin the held-passive ordering from #2117 with a parity browser test: an urgent update runs the animating commit's passive effects before its own. * docs(octane): scope the urgent-skip sentences to the preparing phase * docs(octane): scope the running-animation rule to fully started batches A multi-scope batch keeps one capture until every scope is ready, and removing the last element-scoped boundary on a host still skips that host's animation.
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
An urgent update skipped a View Transition even after
readyresolved and the animation was running. React only skips a transition that is still preparing. Octane now does the same: an urgent commit afterreadychanges the live DOM under the running animation.Why
We found this in a production app. Opening a foreground view (art details) animated the first time and was skipped every time the same item was reopened. On reopen the image is cached, so a layout effect calls
setStatesynchronously, and a measuring hook'sResizeObserverschedules more urgent work while the animation runs.routeFlushsees an urgent update against an owner with an active handle and callsvtInterruptOwners, which callsskipTransition()on the running animation.flushSynctakes the same path throughdriver.interrupt.react-dom 19.3 skips in one place:
flushPendingEffectscallspendingViewTransition.skipTransition().pendingViewTransitionis cleared influshSpawnedWork, which runs fromtransition.ready.then. After that, urgent work commits normally and the live::view-transition-newcapture shows it.flushPendingEffectsthen also runs the animating commit's passive effects before the urgent render.Standalone Chromium repro:
startTransitionmounts a<ViewTransition enter="auto">, thenflushSyncupdates a sibling 0, 30 or 120 ms later.The 0 ms row is the case where React and Octane both still skip, as intended.
Changes
runtime.ts:VTSessionrecordscommitted, set when the handle'sreadyresolves, and areleasecallback for the commit's held passive effects. The newvtInterruptPreparing(owners)interrupts a pending capture and skips only handles whose session hasn't committed. An external handle has no receipt, so it still counts as preparing. For committed sessions it releases the held passives and drains them before the urgent work, as React'sflushPendingEffectsdoes.vtInterruptPreparing:routeFlush's active-handle branch,wrapResume's urgent-sibling branch, anddriver.interrupt(flushSync, a direct root render, and a public unmount). Unchanged callers ofvtInterrupt/vtInterruptOwners:routeFlushwhen passives don't settle or a capture is still pending,wrapResumewhen passives don't settle, the staged-layout interruption, and scope release. Untilreadyresolves, those paths still skip, matching React.view-transition-scoped-effects.test.ts: an urgent update after both scope captures completed skips neither animation. A binding commit observesskipped: falsefor the committed scope.browser/view-transition-scopes: an urgent update to a committed sibling scope keeps both scopes animating, with no cleanups until they finish.browser/view-transition-parity: with the animation paused,flushSynccommits under it without cleanup. The animation finishes once resumed.octanepatch.Validation
prettier --checkon the changed files.octane-tsc -p packages/octane/tsconfig.json: clean.view-transition*,conformance/view-transition,transition*,flush-sync*,behavior-root,stable-event-authority,native-resume-staged-publication,style-transaction-rollback,signals-*,event-signal-owner, andhydration/deferred-*) inoctaneandoctane-prod: 70 files, 1953/1955 pass. The 2 failures werebehavior-roottextarea-retirement tests under load (one took 5.3 s). Run alone, that file passes 706/706, and the same tests pass onorigin/maintoo. Before the test updates, the two scoped-effects tests failed in both projects.view-transition-parity,view-transition-scopes,activity-view-transitionandview-transition-streaming(dev and prod): 89/89 pass. Before the test updates, the scopes test failed on itsactiveassertion and the parity test timed out on the paused animation.vtInterruptOwnersat 67–116 ms.pnpm test: not run.Risk / follow-ups
::view-transition-newinstead of cancelling the animation. That matches React. Code that relied onflushSyncto stop an animation should callskipTransition()on the handle explicitly.vtInterruptOwnersis still used where Octane has to abandon a capture. I didn't change those paths.Provenance
agent-authored)Note
Medium Risk
Changes when
flushSyncand other urgent commits interact with in-flight view transitions; behavior now matches React but may break code that relied on urgent updates to cancel animations.Overview
Urgent updates (
flushSync, discrete events, layout-effectsetState) no longer cancel a View Transition after its update has committed and the native animation is running. Octane now mirrors React 19.3: only transitions still preparing (beforehandle.ready) are interrupted viaskipTransition(); committed sessions are left animating while the urgent commit updates the live DOM underneath.VTSessiongains acommittedflag (set whenreadyresolves) and an optionalreleasehook for held passive effects.vtInterruptPreparingreplaces broad skip logic onflushSync,routeFlush’s active-handle path, andwrapResume’s urgent-sibling branch—committed handles get passive release + drain instead ofskipTransition(). FullvtInterruptremains for unsettled passives and abandoned captures.Browser and unit tests are updated to expect animations and scoped siblings to stay active through urgent work, with DOM/cleanup assertions aligned to React.
Reviewed by Cursor Bugbot for commit 416a1a5. Bugbot is set up for automated code reviews on this repo. Configure here.