Repository navigation
docs(octane): describe urgent updates during a running View Transition - #2119
Conversation
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.
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website-mcp | 1bf4915 | Commit Preview URL Branch Preview URL |
Oct 16 2026, 08:16 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
octane-website | 1bf4915 | Commit Preview URL Branch Preview URL |
Oct 16 2026, 08:16 PM |
Benchmark report🟢 No byte growth, no added work, and no timing changes beyond ±3%. Compares js-framework: 1k/10k row operationsAll 20 timed operations (20 without a verdict)
All 64 work counters are unchanged. Application bundle size (bytes)No changes across 93 measured values. Public-import reachability bundles (bytes)No changes across 120 measured values. |
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.
Summary
#2117 changed when an urgent update skips a View Transition. This follow-up updates the one doc that still described the old rule, and pins the part of #2117 that no test covered: held passive effects run before the urgent work.
Why
docs/view-transitions.mdsaid "An urgent update skips active transitions it touches;flushSyncskips all active scopes." Since #2117, both skip only while the transition is still preparing (beforeready), as React does.#2117's second commit releases and drains a committed session's held passive effects before an urgent update, matching React's
flushPendingEffects→flushPassiveEffects. No test pinned that ordering, so a regression back to running those effects atfinishedwould have passed CI.Changes
docs/view-transitions.md: as in React, an urgent update orflushSyncskips a transition while it is still preparing. Once every boundary in the batch is animating (readyresolved for each scope), they commit under the animation. Two cases are scoped out explicitly. A multi-scope batch keeps one capture until the last scope is ready, so urgent work in that window still skips the scopes that already started. Removing the last element-scoped boundary on a host still skips that host's animation (vtReleaseScopeBoundary). The later "Urgent work finishes pending layout work and skips the animation" now says it applies during the font/image/navigation waits, which are part of the preparing phase. It also notes that urgent work which only touches the capture's held blocks is held, not skipped (holdsPendingQueue). The passive-effect ordering is left to the test rather than the docs: it holds forflushSyncand owner-matched urgent updates, and stating it generally would overclaim.browser/view-transition-parity: new test (pins theflushSyncpath)runs a running animation’s held passive effects before an urgent update. It pauses the animation, checks that the transition commit's passive effect hasn't run, then firesflushSync. It asserts the order is transition mount, transition cleanup, urgent mount, and that the animation is still running (no cleanups until it's resumed and finishes). It uses the fixture's existing passive log, so there are no fixture changes.Validation
prettier --checkon the test file. Markdown is excluded by.prettierignore.view-transition-parityon this branch (dev and prod): 38/38 pass locally, including the new test. An independent rerun sawremoves an optional sidebar returning undefined after its native exit animation(the suite's first test, outside this diff) time out at 5000 ms on a cold start, in 1–2 of 38. The new test passed in every run.6143e18fb, before the passive release) in both modes:expected [ { generation: 2, kind: 'mount' } ]to equal all three entries. The held transition passive hadn't run when the urgent effects did.pnpm test: not run. Only this browser suite runs the changed code.Provenance
agent-authored)Note
Low Risk
Documentation and browser test coverage only; no production runtime changes in this diff.
Overview
Aligns view-transition docs with React’s urgent/
flushSyncrules and adds a browser parity test for passive-effect ordering during a running animation.docs/view-transitions.mdno longer says urgent updates always skip transitions they touch. It now states they skip only while a transition is still preparing; once every boundary in the batch hasready, urgent work commits under the running animation (with notes on multi-scope batches and removing the last element-scoped boundary). The commit-ordering section clarifies that “urgent work skips the animation” applies during font/image/navigation waits, except when the update only touches work the capture already holds.The new
view-transition-paritytest pauses a native animation, fires an urgent update viaflushSync, and asserts transition passive mount/cleanup run before the urgent mount while the animation stays alive until resumed.Reviewed by Cursor Bugbot for commit 1bf4915. Bugbot is set up for automated code reviews on this repo. Configure here.