Skip to content

docs(octane): describe urgent updates during a running View Transition - #2119

Merged
trueadm merged 3 commits into
mainfrom
docs/vt-urgent-running-animation
Oct 16, 2026
Merged

trueadm merged 3 commits into
mainfrom
docs/vt-urgent-running-animation

Conversation

@o-alexandrov

@o-alexandrov o-alexandrov commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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.md said "An urgent update skips active transitions it touches; flushSync skips all active scopes." Since #2117, both skip only while the transition is still preparing (before ready), 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 at finished would have passed CI.

Changes

  • docs/view-transitions.md: as in React, an urgent update or flushSync skips a transition while it is still preparing. Once every boundary in the batch is animating (ready resolved 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 for flushSync and owner-matched urgent updates, and stating it generally would overclaim.
  • browser/view-transition-parity: new test (pins the flushSync path) 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 fires flushSync. 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.
  • No changeset: docs and tests only.

Validation

  • prettier --check on the test file. Markdown is excluded by .prettierignore.
  • view-transition-parity on this branch (dev and prod): 38/38 pass locally, including the new test. An independent rerun saw removes 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.
  • The new test fails against fix(octane): keep a committed View Transition running through urgent updates #2117's first commit (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.
  • Full pnpm test: not run. Only this browser suite runs the changed code.

Provenance

  • An agent produced this diff (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/flushSync rules and adds a browser parity test for passive-effect ordering during a running animation.

docs/view-transitions.md no 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 has ready, 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-parity test pauses a native animation, fires an urgent update via flushSync, 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.

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.
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent docs PR: documentation only labels Oct 16, 2026
@github-actions
github-actions Bot marked this pull request as draft October 16, 2026 19:29
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

@o-alexandrov
o-alexandrov marked this pull request as ready for review October 16, 2026 19:48
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

🟢 No byte growth, no added work, and no timing changes beyond ±3%.

Compares 439e5c5fa, the merge commit's first parent (main has moved 1 commit(s) past the pull request's recorded base c1447258f) with 441a2bdcc on the same runner. Any increase in a js-framework work counter fails this check; byte changes are a report. Wall time is a report: base and head samples alternate in one browser, and an operation is called slower or faster only when the 95% confidence interval of its ratio excludes ±3%. Workflow run

js-framework: 1k/10k row operations

All 20 timed operations (20 without a verdict)
target operation base ms head ms head/base 95% CI
octane-tsrx run 3.008 3.233 +3.5% −4.5% … +7.7% ⚪ within noise
octane-tsrx replace 9.708 9.675 −3.9% −9.3% … +1.6% ⚪ within noise
octane-tsrx add 2.950 2.925 ±0.0% −3.6% … +3.8% ⚪ within noise
octane-tsrx update 0.129 0.130 +0.3% −3.2% … +2.0% ⚪ within noise
octane-tsrx select 0.006 0.006 −4.3% −5.7% … −0.3% ⚪ within noise
octane-tsrx swap 0.020 0.021 −1.4% −6.9% … +9.7% ⚪ within noise
octane-tsrx remove 0.018 0.018 −0.4% −3.7% … +1.1% ⚪ within noise
octane-tsrx runlots 30.808 31.367 −0.0% −5.6% … +4.2% ⚪ within noise
octane-tsrx select_lots 0.008 0.008 −0.6% −3.0% … +2.0% ⚪ within noise
octane-tsrx clear 64.825 62.867 +3.6% −3.6% … +5.2% ⚪ within noise
octane-jsx run 5.350 5.608 +1.5% −4.7% … +8.4% ⚪ within noise
octane-jsx replace 14.275 13.808 −0.8% −13.9% … +4.4% ⚪ within noise
octane-jsx add 5.767 5.742 +3.9% −3.8% … +15.2% ⚪ within noise
octane-jsx update 0.625 0.501 +1.6% −10.0% … +20.4% ⚪ within noise
octane-jsx select 0.209 0.276 +11.3% −2.4% … +27.1% ⚪ within noise
octane-jsx swap 0.328 0.330 −0.4% −6.9% … +13.2% ⚪ within noise
octane-jsx remove 0.330 0.303 −14.4% −20.5% … +0.0% ⚪ within noise
octane-jsx runlots 49.275 51.742 −1.6% −8.2% … +8.2% ⚪ within noise
octane-jsx select_lots 5.621 5.588 +15.7% −23.6% … +49.2% ⚪ within noise
octane-jsx clear 78.858 75.808 +0.4% −11.0% … +11.6% ⚪ within noise

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.
@blacksmith-sh

This comment has been minimized.

@trueadm
trueadm merged commit 21bbb01 into main Oct 16, 2026
57 of 61 checks passed
@trueadm
trueadm deleted the docs/vt-urgent-running-animation branch October 16, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-authored Diff or issue body substantially produced by an AI agent docs PR: documentation only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants