Skip to content

fix(octane): render transition-priority work in a later task - #1873

Merged
trueadm merged 9 commits into
mainfrom
fix/transition-flush-task
Oct 8, 2026
Merged

trueadm merged 9 commits into
mainfrom
fix/transition-flush-task

Conversation

@trueadm

@trueadm trueadm commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Step 2 (G1) of #1864. A flush that holds only transition-priority work now runs in a posted host task (postHostTask), not in queueMicrotask(flush). A backlog of ready Action results, or transitions started after each await, therefore renders once, after the browser has had a chance to paint and deliver input.

Octane main this PR React 19.2.7
100 synchronous useActionState dispatches 101 commits (0P, 1P … 99P, 100) 2 commits (0P, 100) 2
Released backlog of 12 form actions, Chromium Event Timing on the release click, 1× / 4× CPU 176 ms / 184 ms, 12 result commits no entry ≥ 16 ms, 1 commit no entry ≥ 16 ms, 1 commit

Merge order: the budget-only #1874 has to land immediately before this one. Until it does, shard 1/4 and the PR bench fail their byte budgets. See "Bundle" below.

Why

Transition renders were flushed on a microtask, exactly like urgent ones. Every ready continuation in a burst paid for its own render and commit inside one microtask checkpoint, so nothing could paint and no input could be delivered until the last one finished. React renders a transition lane in a Scheduler task. The investigation comment on #1864 proposed this as G1, and the progress comment listed the design points that are settled below.

Changes

packages/octane/src/runtime.ts:

  • TRANSITION_QUEUE and its task. A transition-mode scheduleRender from outside a render or flush pushes the block to TRANSITION_QUEUE and posts one task. The task adopts the queue into QUEUE and runs the ordinary flush().
    • Work scheduled while that task runs joins its flush instead of posting another task. That includes the passives the ViewTransition driver drains before capture, and the useDeferredValue swap task.
    • A flush that absorbs the queue early (flushSync, sync act(), a VT-wrapped Suspense resume, the controlled-input restore in maybeFlushDiscrete) retires the posted task by id. Transitions scheduled after that point post a fresh task rather than joining one queued before input that arrived in between.
  • Mixed queues: React lane parity. The microtask flush never drains TRANSITION_QUEUE, so transition blocks wait for their task even while urgent work flushes. An urgent update to a waiting block moves it onto the microtask flush (upgradeTransitionBlock). The existing urgent-ancestor machinery (UrgentTransitionRender) still renders a waiting child's committed cells under an urgent parent.
  • Pending cues stay urgent-timed. useTransition and useActionState raising isPending, and useOptimistic adding a value, pass a cue argument to scheduleRender. They keep the microtask flush at their computed priority, so the cue commits before the work it announces, as React's urgent cue does.
  • Pending release follows the flush. A transition's finish step moves from queueMicrotask to afterTransitionFlush, which runs it as a microtask after the task's flush. That step covers tickTransitionCount(-1), finishTransitionHookBatch, form resets and useFormStatus. Without the move, isPending would fall before the transition rendered.
  • Hold bookkeeping survives an urgent flush. flushWork keeps FLUSHED_TRANSITION_UPDATES while transition renders still wait. Otherwise a cue flush that runs first would clear them, and the deferred render could no longer hold when it suspended.
  • Every flush site audited:
    • scheduleRender, makeRoot's transition render, and the native signal transition flush now use the task.
    • The flush() re-entrancy backstop, the flushSync tail, the deferred-layout re-arm, endDetachedBoundaryRender, the first-render commit, and the hydration commit stay urgent. They re-arm work that is already in QUEUE.
    • vtScheduleQueuedWork re-arms work that is already in QUEUE; it is also used to flush adopted transitions on the resume fallback path.
  • The async-Action window stays global. While any async Action is pending, updates from outside a delegated event, flushSync, or a commit callback are already transition-tagged, so they now also wait for a task. React schedules those updates (DefaultLane) in a Scheduler task too, so this moves them toward React. Narrowing the window would need AsyncContext. Documented.
  • act() and hasPendingWork(). Async act() keeps draining while a transition task is posted. hasPendingWork() now counts waiting transition renders, which flushSync drains synchronously, so testing-library's settleSync still reaches quiescence.
  • Reachability. The task path is a TRANSITION_TASK_DRIVER installed by ensureTransitionSwapDriver. An application that never starts a transition pays only the checks in scheduleRender, flushSync, flushWork and maybeFlushDiscrete.

packages/octane/src/hydration/independent-island.ts: the private postActivationTask is replaced by the shared postHostTask. The island bootstrap chunk is neutral: esbuild minified 23,991 → 23,996 raw, gzip 8,693 → 8,693.

Contract and docs:

  • docs/differences-from-react.md:
    • §Actions no longer claims "match React 19". It now says what matches (the commit pattern) and what does not: queue threading after an error, and the one-microtask dispatch delay.
    • §Scheduler describes the transition task, the cues, upgrades, the async-Action window, and the remaining lack of time-slicing.
  • website core APIs, Forms section: one sentence on backlog rendering.

Tests:

  • New transition-flush-task.test.ts (jsdom, pre-armed MessageChannel marker):
    • 100 sync dispatches give ['0', '0P', 'task', '100'];
    • Promise.resolve results give the same;
    • a gated first action then 100 ready ones give ['0', '0P', 'task', '1100'];
    • an error continues the queue: ['0', '0P', 'task', '3'];
    • unmount before the task drops the backlog;
    • async act() and flushSync drain it;
    • 100 startTransition after await give ['0', 'task', '100'];
    • neighbors that must not move: urgent stays on the microtask, an urgent update upgrades a waiting block, flushSync and sync act() drain;
    • the cue commits before the transition in another component: ['button pending', 'task', 'panel 1', 'button idle'];
    • a suspending transition after its cue still holds;
    • useOptimistic shows its value at once and its clear commits with the settled value;
    • a transition-only controlled input still commits in its event through startViewTransition.
  • New browser/action-backlog (octane-events-browser): the same fixture runs on Octane and React with Chromium Event Timing, asserting one result render and a release latency under half the backlog's cost.
  • Deliberately updated tests that pinned microtask commit timing for transitions:
    • conformance/async-actions.test.ts now asserts the pre-task state, then waits a task;
    • layout-effect-update-priority.test.ts;
    • view-transition.test.ts: the delegated click transition reaches startViewTransition after a task;
    • view-transition-scoped-effects.test.ts.
  • benchmarks/transition-hooks:
    • quiesce now also waits for a host task;
    • the cycle_runtime_objects one-time allowance goes 1 → 3. main already measured 706 against the 705 ceiling, with two lazily installed driver records (swap and root); the task driver is the third.

Validation

  • Every new test fails on main:
    • 10 of the 14 original jsdom cases;
    • the hold-after-cue case fails if the FLUSHED_TRANSITION_UPDATES retention is reverted;
    • the controlled-input case fails without the maybeFlushDiscrete adopt;
    • the browser test measures 12 commits and 168–184 ms on main.
  • Targeted local runs, final runtime:
    • octane: 129 files / 2,559 tests (transition, action, Suspense, scheduler, hooks, effects, events, roots);
    • octane: 169 files / 3,712 tests (controlled, event, form, input, select, transition, view-transition);
    • octane-prod: 9 files / 163 tests;
    • octane-signals: 6 files / 110 tests;
    • octane-profile devtools transitions;
    • testing-library: 12 files / 69 tests;
    • island hydration: 9 files / 167 tests;
    • octane-events-browser (action-backlog, continuous-actions, form-actions): 3 files / 42 tests.
  • pnpm typecheck:files on every changed source, test and fixture.
  • pnpm format:files; pnpm sync clean.
  • pnpm test, pnpm typecheck, pnpm format:check: left to CI, per the local-load rule.

Performance audit

  • js-framework work counters (pair.mjs --work-only, main vs this branch): every calls_* and dom_* counter is identical for octane-tsrx and octane-jsx. scheduleRender gained no call: the transition path sits behind mode === 'transition' and an optional driver.
  • node benchmarks/bench.mjs --ratios transition-hooks: 42 of 42 guards pass, and the render-sequence, DOM, hold/release and bail controls are unchanged. Held cycles add one MessageChannel and its handler per cycle, which is postHostTask in Node (640/704 functions, 834/961 constructors).
  • Bundle, run-minimal.mjs, main → this branch:
    • apps without transitions: about +189 raw / +43 to +106 gzip (cli-spa-starter +189 / +80, root-static +189 / +68, hydrate-frame +189 / +45);
    • apps with transitions: +1,034 to +1,040 raw / +381 to +446 gzip (suspense-transition, base-ui, radix, apollo-client);
    • run.mjs framework gzip: octane-tsrx +88, octane-jsx +106, todomvc +86, chat-stream +72, weather +92, bindings +378; ceiling +415.
  • Event Timing: the table above, two trials each at 1× and 4× CPU.

Perf review (node scripts/perf-review-scan.mjs, 6 candidates)

Hot path touched: scheduleRender, on every update. It gains one string compare plus an optional-chained driver call, only when mode === 'transition', and a TRANSITION_QUEUE.length check on the already-pending path. It allocates nothing, and the work counters are identical.

# Severity Location Dimension Finding Evidence Provided?
1 note runtime.ts scheduleTransitionTask allocation One closure per posted task (id check), plus postHostTask's channel in Node. This is per burst, not per update. transition-hooks ratio guards yes
2 needs-evidence bundle budgets bytes Every budget grows. Raised in the budget-only #1874. CI bundle rows after #1874 lands

Dismissed candidates:

  • upgradeTransitionBlock queueMicrotask(flush) [microtask-hop]: guarded by scheduled, so one arm per flush, and it moves already-queued work.
  • adoptTransitionQueue / afterTransitionFlush queueMicrotask [microtask-hop]: these replace the existing per-transition finish microtask one for one and render nothing themselves.
  • scheduleRender(block, false, …) ×3 [schedule-render]: existing call sites that gained the cue argument.

Risk / follow-ups

  • Same-component useTransition. When the component that raises isPending also holds the transition's update (the canonical tabs example), both render together in the microtask flush, as on main. Octane keeps one live tree and the cells are already written. React parity there needs the transition's cells staged until the task, as async Actions already do. Documented in §Scheduler.
  • Controlled-input restores still commit a waiting transition synchronously, before the restore (main behavior). React would restore the old value until the transition commits.
  • Native signal Action frames queued for the task can still ride along if an urgent microtask flush runs first, because drainQueue ends with the native coordinator's flush. Step 3 (G2a) owns signal publication coalescing.
  • Code that awaited only microtasks after a transition or Action result now needs a task or act(). Binding suites that pin that timing will show up in CI.

Provenance

  • An agent produced this diff (agent-authored)

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Note

High Risk
Changes core scheduler commit timing for transitions, Actions, flushSync/act, and view transitions; tests that assumed microtask-only commits must await a host task.

Overview
Transition-priority renders now flush in a deferred host task (scheduler.postTask → MessageChannel → setTimeout) instead of the urgent microtask checkpoint, matching React’s transition lane scheduling (#1864).

The runtime adds a TRANSITION_QUEUE and lazily installed task driver: transition work scheduled outside an active flush is queued and adopted into a single flush() when the posted task runs, so bursts of ready useActionState results or post-await startTransition updates commit once rather than once per microtask hop. Pending cues (useTransition / useActionState isPending, useOptimistic) still use the microtask path via a cue flag on scheduleRender; urgent updates can upgrade waiting blocks off the transition queue. flushSync, act(), view-transition resume, and controlled-input restore paths adopt the queue; transition finish hooks move to afterTransitionFlush.

independent-island activation posting is deduplicated onto shared postHostTask. Docs, website copy, transition-hooks benchmark quiesce logic, bundle budget baselines, and broad tests (including browser Event Timing for action backlog) reflect the new timing.

Reviewed by Cursor Bugbot for commit 56aabcc. Bugbot is set up for automated code reviews on this repo. Configure here.

trueadm and others added 3 commits October 8, 2026 00:57
Transition renders were flushed on a microtask, like urgent ones, so every
ready continuation paid for its own render and commit inside one microtask
checkpoint. A hundred synchronous useActionState dispatches committed 101
times where React 19 commits twice, and the browser could neither paint nor
deliver input until the last one finished (#1864, step 2, G1).

Transition renders scheduled outside a render or flush now wait in a
TRANSITION_QUEUE for a host task of their own (postHostTask), as React renders
a transition lane in a Scheduler task. That covers startTransition updates,
Action results, transitions started after an await, and the updates of the
async-Action window. The microtask flush never drains the queue; the task,
flushSync and act() do. An urgent update to a waiting block moves it onto the
microtask flush, and the pending cues (useTransition and useActionState raising
isPending, useOptimistic showing a value) keep the microtask flush so they
commit before the work they announce.

A transition's pending-count release waits for the task's flush
(afterTransitionFlush), and its retained FLUSHED_TRANSITION_UPDATES survive an
urgent flush that runs first, so a suspending transition still holds. Work
scheduled while the task (or the useDeferredValue swap task) runs joins its
own flush, and a view-transition-wrapped Suspense resume adopts the queue. The
task path is a driver installed with the first transition, so applications
that never start one keep the old scheduler shape. The island activation gate
now uses the shared postHostTask.

differences-from-react.md §Actions and §Scheduler, the website's Forms
section, and the transition-hooks benchmark harness (which now waits for the
host task) describe the new timing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…tore

maybeFlushDiscrete decided between the view-transition flush and flushSync from
QUEUE alone, so a transition-only controlled input (onInput calling
startTransition) waiting for its task fell to flushSync and skipped
startViewTransition. Adopt the waiting transitions first, as before #1864 step 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent fix PR: bug fix labels Oct 8, 2026
@trueadm
trueadm marked this pull request as ready for review October 8, 2026 00:06

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Autofix Details

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Resume adopt releases followups too early
    • Saved and cleared TRANSITION_FOLLOWUPS before adoptTransitionQueue in wrapResume, then dispatched them at each exit path's correct flush point: before synchronous flushWork/vtFlush, after vtScheduleQueuedWork for the !vtNativeAvailable path, and re-injected into TRANSITION_FOLLOWUPS for the promise-deferred path's recursive wrapResume to handle.

Create PR

Or push these changes by commenting:

@cursor push df5bd81b14
Preview (df5bd81b14)
diff --git a/packages/octane/src/runtime.ts b/packages/octane/src/runtime.ts
--- a/packages/octane/src/runtime.ts
+++ b/packages/octane/src/runtime.ts
@@ -7051,6 +7051,13 @@
 			// then include every sibling update those passives scheduled. Transitions
 			// waiting for their task join too, so one view transition captures them.
 			const passivesSettled = vtDrainPassivesBeforeCapture();
+			// adoptTransitionQueue dispatches TRANSITION_FOLLOWUPS as microtasks
+			// under the contract that the caller flushes synchronously in the same
+			// turn. wrapResume may wait on in-flight handles or return without
+			// flushing, so save and clear followups here, then dispatch them at
+			// each exit path's flush point.
+			const savedFollowups = TRANSITION_FOLLOWUPS;
+			TRANSITION_FOLLOWUPS = null;
 			adoptTransitionQueue();
 			const capture = VT_CAPTURE;
 			const resumed = getBlocks?.() ?? [];
@@ -7061,6 +7068,8 @@
 				// can touch further owners, so only that fallback interrupts all scopes.
 				if (passivesSettled) vtInterruptOwners(owners);
 				else vtInterrupt();
+				if (savedFollowups !== null)
+					for (let i = 0; i < savedFollowups.length; i++) queueMicrotask(savedFollowups[i]);
 				work();
 				flushWork();
 				return true;
@@ -7068,7 +7077,11 @@
 			const handles = vtActiveHandles(owners);
 			if (capture !== null || handles.size > 0) {
 				vtWaitForHandles(handles, owners);
+				const deferred = savedFollowups;
 				const resume = (): void => {
+					// Re-inject so the recursive wrapResume's adopt dispatches
+					// them at the right point before its own flush.
+					if (deferred !== null) (TRANSITION_FOLLOWUPS ??= []).push(...deferred);
 					if (!driver.wrapResume(work, getBlocks)) work();
 				};
 				const waits: Promise<void>[] = [];
@@ -7079,9 +7092,14 @@
 			}
 			if (!vtNativeAvailable(owners)) {
 				// The caller commits only the resume; adopted transitions still need a flush.
+				// Queue followups after the scheduled flush microtask so they run after it.
 				vtScheduleQueuedWork();
+				if (savedFollowups !== null)
+					for (let i = 0; i < savedFollowups.length; i++) queueMicrotask(savedFollowups[i]);
 				return false;
 			}
+			if (savedFollowups !== null)
+				for (let i = 0; i < savedFollowups.length; i++) queueMicrotask(savedFollowups[i]);
 			vtFlush(
 				() => {
 					work();

You can send follow-ups to the cloud agent here.

Comment thread packages/octane/src/runtime.ts Resolved
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 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 56aabcc Commit Preview URL

Branch Preview URL
Oct 08 2026, 07:32 AM

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Benchmark report

  • 🔴 bundle-size: 46 value(s) increased within budget
  • 🔴 bundle-reachability: 74 value(s) increased within budget

Compares 573127fd3, the merge commit's first parent with 0d6e6885a on the same runner. A byte value over its committed budget or any increase in a js-framework work counter fails this check. 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.692 3.533 ±0.0% −8.1% … +1.5% ⚪ within noise
octane-tsrx replace 9.925 8.733 −3.8% −12.7% … −0.5% ⚪ within noise
octane-tsrx add 3.342 3.758 +3.4% −1.6% … +11.6% ⚪ within noise
octane-tsrx update 0.156 0.156 +1.5% −3.4% … +7.5% ⚪ within noise
octane-tsrx select 0.007 0.007 −1.2% −7.2% … +0.8% ⚪ within noise
octane-tsrx swap 0.056 0.053 −2.0% −4.9% … +5.2% ⚪ within noise
octane-tsrx remove 0.028 0.028 +2.8% −2.1% … +7.8% ⚪ within noise
octane-tsrx runlots 24.700 25.733 +1.7% −1.7% … +5.1% ⚪ within noise
octane-tsrx select_lots 0.006 0.006 +1.9% −0.5% … +5.7% ⚪ within noise
octane-tsrx clear 44.175 43.575 −1.6% −3.4% … +1.9% ⚪ within noise
octane-jsx run 3.892 4.208 +1.0% −5.6% … +5.2% ⚪ within noise
octane-jsx replace 8.442 7.767 −6.0% −11.5% … +0.8% ⚪ within noise
octane-jsx add 3.333 3.350 +0.0% −6.7% … +5.1% ⚪ within noise
octane-jsx update 0.265 0.266 +0.3% −1.4% … +2.0% ⚪ within noise
octane-jsx select 0.135 0.135 −1.7% −2.4% … +1.5% ⚪ within noise
octane-jsx swap 0.255 0.255 +0.3% −4.8% … +5.1% ⚪ within noise
octane-jsx remove 0.183 0.190 +2.2% −1.8% … +6.4% ⚪ within noise
octane-jsx runlots 32.875 32.092 −0.5% −4.6% … +1.3% ⚪ within noise
octane-jsx select_lots 1.764 1.789 −1.6% −4.5% … +0.9% ⚪ within noise
octane-jsx clear 48.875 51.783 +3.1% +0.3% … +6.8% ⚪ within noise

All 64 work counters are unchanged.

Application bundle size (bytes)

target metric base head Δ
octane-tsrx js_raw 112,895 113,084 +189 (+0.2%) 🔴
octane-tsrx js_gzip 36,769 36,856 +87 (+0.2%) 🔴
octane-tsrx js_brotli 32,544 32,630 +86 (+0.3%) 🔴
octane-tsrx app_gzip 2,336 2,335 −1 (−0.0%) 🟢
octane-tsrx app_brotli 2,034 2,029 −5 (−0.2%) 🟢
octane-tsrx fw_raw 105,949 106,138 +189 (+0.2%) 🔴
octane-tsrx fw_gzip 34,433 34,521 +88 (+0.3%) 🔴
octane-tsrx fw_brotli 30,510 30,601 +91 (+0.3%) 🔴
octane-tsrx todo_js_raw 121,303 121,492 +189 (+0.2%) 🔴
octane-tsrx todo_js_gzip 39,557 39,643 +86 (+0.2%) 🔴
octane-tsrx todo_js_brotli 34,779 34,884 +105 (+0.3%) 🔴
octane-tsrx todo_app_brotli 1,886 1,878 −8 (−0.4%) 🟢
octane-tsrx todo_fw_raw 116,685 116,874 +189 (+0.2%) 🔴
octane-tsrx todo_fw_gzip 37,337 37,423 +86 (+0.2%) 🔴
octane-tsrx todo_fw_brotli 32,893 33,006 +113 (+0.3%) 🔴
octane-tsrx chat_js_raw 120,052 120,241 +189 (+0.2%) 🔴
octane-tsrx chat_js_gzip 39,401 39,474 +73 (+0.2%) 🔴
octane-tsrx chat_js_brotli 34,765 34,771 +6 (+0.0%) 🔴
octane-tsrx chat_app_gzip 2,714 2,715 +1 (+0.0%) 🔴
octane-tsrx chat_app_brotli 2,388 2,387 −1 (−0.0%) 🟢
octane-tsrx chat_fw_raw 114,287 114,476 +189 (+0.2%) 🔴
octane-tsrx chat_fw_gzip 36,687 36,759 +72 (+0.2%) 🔴
octane-tsrx chat_fw_brotli 32,377 32,384 +7 (+0.0%) 🔴
octane-tsrx weather_js_raw 156,607 156,796 +189 (+0.1%) 🔴
octane-tsrx weather_js_gzip 50,769 50,863 +94 (+0.2%) 🔴
octane-tsrx weather_js_brotli 44,305 44,362 +57 (+0.1%) 🔴
octane-tsrx weather_app_gzip 7,871 7,873 +2 (+0.0%) 🔴
octane-tsrx weather_app_brotli 6,671 6,674 +3 (+0.0%) 🔴
octane-tsrx weather_fw_raw 134,453 134,642 +189 (+0.1%) 🔴
octane-tsrx weather_fw_gzip 42,898 42,990 +92 (+0.2%) 🔴
octane-tsrx weather_fw_brotli 37,634 37,688 +54 (+0.1%) 🔴
octane-tsrx bindings_js_raw 686,350 687,393 +1,043 (+0.2%) 🔴
octane-tsrx bindings_js_gzip 224,189 224,574 +385 (+0.2%) 🔴
octane-tsrx bindings_js_brotli 190,565 190,765 +200 (+0.1%) 🔴
octane-tsrx bindings_app_brotli 96,236 96,233 −3 (−0.0%) 🟢
octane-tsrx bindings_fw_raw 338,712 339,755 +1,043 (+0.3%) 🔴
octane-tsrx bindings_fw_gzip 108,522 108,907 +385 (+0.4%) 🔴
octane-tsrx bindings_fw_brotli 94,329 94,532 +203 (+0.2%) 🔴
octane-tsrx full_fw_raw 565,336 566,237 +901 (+0.2%) 🔴
octane-tsrx full_fw_gzip 170,070 170,500 +430 (+0.3%) 🔴
octane-tsrx full_fw_brotli 143,118 143,508 +390 (+0.3%) 🔴
octane-jsx js_raw 187,494 187,683 +189 (+0.1%) 🔴
octane-jsx js_gzip 59,400 59,507 +107 (+0.2%) 🔴
octane-jsx js_brotli 51,679 51,719 +40 (+0.1%) 🔴
octane-jsx app_gzip 2,857 2,858 +1 (+0.0%) 🔴
octane-jsx fw_raw 179,229 179,418 +189 (+0.1%) 🔴
octane-jsx fw_gzip 56,543 56,649 +106 (+0.2%) 🔴
octane-jsx fw_brotli 49,275 49,315 +40 (+0.1%) 🔴
octane-jsx full_fw_raw 565,336 566,237 +901 (+0.2%) 🔴
octane-jsx full_fw_gzip 170,070 170,500 +430 (+0.3%) 🔴
octane-jsx full_fw_brotli 143,118 143,508 +390 (+0.3%) 🔴

9 other measured values are unchanged.

Public-import reachability bundles (bytes)

target metric base head Δ
cli-spa-starter raw 101,944 102,133 +189 (+0.2%) 🔴
cli-spa-starter gzip 33,866 33,946 +80 (+0.2%) 🔴
cli-spa-starter brotli 29,761 29,830 +69 (+0.2%) 🔴
root-static-specialized raw 72,459 72,648 +189 (+0.3%) 🔴
root-static-specialized gzip 23,722 23,790 +68 (+0.3%) 🔴
root-static-specialized brotli 21,181 21,274 +93 (+0.4%) 🔴
root-chained-jsx raw 74,337 74,526 +189 (+0.3%) 🔴
root-chained-jsx gzip 24,216 24,293 +77 (+0.3%) 🔴
root-chained-jsx brotli 21,630 21,737 +107 (+0.5%) 🔴
root-static raw 165,310 165,499 +189 (+0.1%) 🔴
root-static gzip 52,176 52,244 +68 (+0.1%) 🔴
root-static brotli 45,436 45,469 +33 (+0.1%) 🔴
root-static-local raw 72,458 72,647 +189 (+0.3%) 🔴
root-static-local gzip 23,704 23,772 +68 (+0.3%) 🔴
root-static-local brotli 21,188 21,269 +81 (+0.4%) 🔴
root-callback-local raw 74,363 74,552 +189 (+0.3%) 🔴
root-callback-local gzip 24,232 24,305 +73 (+0.3%) 🔴
root-callback-local brotli 21,660 21,731 +71 (+0.3%) 🔴
hooks-state raw 84,180 84,369 +189 (+0.2%) 🔴
hooks-state gzip 27,687 27,754 +67 (+0.2%) 🔴
hooks-state brotli 24,655 24,711 +56 (+0.2%) 🔴
prop-attributes raw 84,434 84,623 +189 (+0.2%) 🔴
prop-attributes gzip 27,688 27,758 +70 (+0.3%) 🔴
prop-attributes brotli 24,659 24,783 +124 (+0.5%) 🔴
context raw 96,387 96,576 +189 (+0.2%) 🔴
context gzip 31,386 31,462 +76 (+0.2%) 🔴
context brotli 27,877 27,913 +36 (+0.1%) 🔴
hydrate-root raw 137,834 138,023 +189 (+0.1%) 🔴
hydrate-root gzip 44,108 44,164 +56 (+0.1%) 🔴
hydrate-root brotli 38,620 38,557 −63 (−0.2%) 🟢
deferred-hydration raw 221,130 221,319 +189 (+0.1%) 🔴
deferred-hydration gzip 69,612 69,655 +43 (+0.1%) 🔴
deferred-hydration brotli 60,045 60,091 +46 (+0.1%) 🔴
hydrate-frame raw 364,285 364,474 +189 (+0.1%) 🔴
hydrate-frame gzip 112,876 112,921 +45 (+0.0%) 🔴
hydrate-frame brotli 96,526 96,525 −1 (−0.0%) 🟢
suspense-transition raw 139,083 140,125 +1,042 (+0.7%) 🔴
suspense-transition gzip 43,880 44,333 +453 (+1.0%) 🔴
suspense-transition brotli 38,593 38,876 +283 (+0.7%) 🔴
component-owned-effects raw 76,822 77,012 +190 (+0.2%) 🔴
component-owned-effects gzip 25,045 25,131 +86 (+0.3%) 🔴
component-owned-effects brotli 22,381 22,475 +94 (+0.4%) 🔴
binding-hooks raw 82,680 82,868 +188 (+0.2%) 🔴
binding-hooks gzip 27,330 27,395 +65 (+0.2%) 🔴
binding-hooks brotli 24,394 24,464 +70 (+0.3%) 🔴
binding-base-ui-vite raw 197,275 198,316 +1,041 (+0.5%) 🔴
binding-base-ui-vite gzip 61,976 62,363 +387 (+0.6%) 🔴
binding-base-ui-vite brotli 53,904 54,216 +312 (+0.6%) 🔴
binding-base-ui-esbuild raw 212,781 213,827 +1,046 (+0.5%) 🔴
binding-base-ui-esbuild gzip 68,907 69,286 +379 (+0.6%) 🔴
binding-base-ui-esbuild brotli 59,731 60,118 +387 (+0.6%) 🔴
binding-aria-esbuild brotli 2,979 2,982 +3 (+0.1%) 🔴
binding-radix-vite raw 199,305 200,346 +1,041 (+0.5%) 🔴
binding-radix-vite gzip 62,568 62,965 +397 (+0.6%) 🔴
binding-radix-vite brotli 54,371 54,725 +354 (+0.7%) 🔴
binding-radix-esbuild raw 214,606 215,651 +1,045 (+0.5%) 🔴
binding-radix-esbuild gzip 69,485 69,861 +376 (+0.5%) 🔴
binding-radix-esbuild brotli 60,342 60,572 +230 (+0.4%) 🔴
binding-mantine-hooks-vite raw 86,237 86,426 +189 (+0.2%) 🔴
binding-mantine-hooks-vite gzip 28,284 28,364 +80 (+0.3%) 🔴
binding-mantine-hooks-vite brotli 25,235 25,290 +55 (+0.2%) 🔴
binding-mantine-hooks-esbuild raw 90,602 90,795 +193 (+0.2%) 🔴
binding-mantine-hooks-esbuild gzip 30,402 30,478 +76 (+0.2%) 🔴
binding-mantine-hooks-esbuild brotli 27,056 27,182 +126 (+0.5%) 🔴
binding-apollo-client-vite raw 339,718 340,759 +1,041 (+0.3%) 🔴
binding-apollo-client-vite gzip 104,291 104,683 +392 (+0.4%) 🔴
binding-apollo-client-vite brotli 91,009 91,413 +404 (+0.4%) 🔴
binding-apollo-client-esbuild raw 362,919 363,966 +1,047 (+0.3%) 🔴
binding-apollo-client-esbuild gzip 115,266 115,658 +392 (+0.3%) 🔴
binding-apollo-client-esbuild brotli 100,615 100,843 +228 (+0.2%) 🔴
binding-usehooks-ts-vite raw 87,003 87,192 +189 (+0.2%) 🔴
binding-usehooks-ts-vite gzip 28,510 28,577 +67 (+0.2%) 🔴
binding-usehooks-ts-vite brotli 25,430 25,476 +46 (+0.2%) 🔴
binding-usehooks-ts-esbuild raw 91,368 91,561 +193 (+0.2%) 🔴
binding-usehooks-ts-esbuild gzip 30,613 30,719 +106 (+0.3%) 🔴
binding-usehooks-ts-esbuild brotli 27,303 27,405 +102 (+0.4%) 🔴

35 other measured values are unchanged.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 8, 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 56aabcc Commit Preview URL

Branch Preview URL
Oct 08 2026, 07:34 AM

trueadm and others added 2 commits October 8, 2026 01:21
wrapResume adopted the transition queue before it knew whether it would drain:
on the paths that wait for an in-flight view transition or fall back to an
unwrapped resume, that retired the posted task and released the transition's
follow-ups (isPending's falling edge, form resets) before its render. Owners
now include the waiting blocks without adopting them; only the urgent-sibling
drain and the vtFlush update callback adopt, and the other paths leave the
queue to its own task.

Also move the website a11y baseline's /docs/core-apis table selector from
nth-child(204) to nth-child(205): the new Forms paragraph shifts that table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Shard 1/4 fails its byte budgets until #1874 merges, and fail-fast then cancels
shards 2-4. This commit only lets those shards report; it is reverted before
merge, and the raise lands through #1874.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm

trueadm commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator Author

Agent-authored note (Claude Code, for @trueadm).

The head commit temporarily carries #1874's budgets. Without them, shard 1/4 fails its byte budget and fail-fast cancels shards 2–4, so their tests never report. Expect "Check that byte budget raises land alone" to fail while that commit is here. I'll revert it once the shards report; the raise itself lands through #1874, which still merges immediately before this PR.

trueadm and others added 2 commits October 8, 2026 01:39
…task

Router updates are transitions, which now commit in a later task (#1864), so a
synchronous revalidation loader coalesced "loading" and "idle" into one
render and the boundary never saw the loading -> idle edge it resets on, as
under React's Scheduler. Keep the loader pending across tasks so the loading
state commits, and assert the caught error persists until the revalidation
completes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test shards reported on a17a35a (all four passed with identical code).
The raise lands through #1874, which merges immediately before this PR.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm

trueadm commented Oct 8, 2026

Copy link
Copy Markdown
Collaborator Author

Agent-authored note (Claude Code, for @trueadm).

The temporary budget commit is reverted in f6e2990. While it was here, a17a35a ran every test shard (1/4–4/4), the React parity shards, the website suite, the heavy integration lanes and the benchmark report, and all of them passed. The code is identical now.

  • Remix-router fix: shard 4's one failure was remix-router's revalidation test. The router wraps its state updates in transitions, so its synchronous loader's loading and idle states now merge into one render, as they would under React's Scheduler. The test now keeps that loader pending across a task.
  • Mailroom flake: example apps (2/3) failed once, on mailroom's resets the editor between draft routes…. The same runtime passed it on e21d674 and 2d993e4, and locally it passes 20 of 20 runs and 10 of 10 at 6× CPU. I'm treating it as flaky unless the new run repeats it.
  • What still fails: shard 1/4's budget step and the benchmark report fail on byte budgets until ci(bundle-size): raise budgets for the transition task flush (#1873) #1874 lands. Merge ci(bundle-size): raise budgets for the transition task flush (#1873) #1874 immediately before this PR.

trueadm added a commit that referenced this pull request Oct 8, 2026
…1874)

Budget-only raise for #1873 (#1864 step 2), which renders transition-priority
work in a posted host task. Every budget moves to #1873's measured bytes + 32.

Co-authored-by: Claude Opus 5.5 <[email protected]>

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix prepared a fix for the issue found in the latest run.

  • ✅ Fixed: Upgrade leaves transition queue leftovers
    • upgradeTransitionBlock now splices the block out of TRANSITION_QUEUE on upgrade and retires the transition task (flushing followups) when the queue becomes empty, preventing leftover entries from corrupting queueAllTransition and delaying isPending.

Create PR

Or push these changes by commenting:

@cursor push a1f1e0a1f4
Preview (a1f1e0a1f4)
diff --git a/packages/octane/src/runtime.ts b/packages/octane/src/runtime.ts
--- a/packages/octane/src/runtime.ts
+++ b/packages/octane/src/runtime.ts
@@ -7665,18 +7665,16 @@
 
 /** An urgent update or pending cue moves a waiting block onto the microtask flush. */
 function upgradeTransitionBlock(block: Block, mode: 'urgent' | 'transition', cue?: boolean): void {
-	if (
-		(mode !== 'urgent' && !cue) ||
-		block.pendingMode !== 'transition' ||
-		syncFlush ||
-		!TRANSITION_QUEUE.includes(block)
-	)
-		return;
+	if ((mode !== 'urgent' && !cue) || block.pendingMode !== 'transition' || syncFlush) return;
+	const idx = TRANSITION_QUEUE.indexOf(block);
+	if (idx === -1) return;
+	TRANSITION_QUEUE.splice(idx, 1);
 	QUEUE.push(block);
 	if (!scheduled) {
 		scheduled = true;
 		queueMicrotask(flush);
 	}
+	if (TRANSITION_QUEUE.length === 0) adoptTransitionQueue();
 }
 
 function scheduleTransitionTask(): void {

You can send follow-ups to the cloud agent here.

Reviewed by Cursor Bugbot for commit 85cbe3f. Configure here.

Comment thread packages/octane/src/runtime.ts Resolved
upgradeTransitionBlock copied a waiting block onto QUEUE but left it in
TRANSITION_QUEUE. Once that render committed, the stale entry was adopted with a
null pendingMode, so the task's flush no longer looked all-transition and lost
its ViewTransition wrap, and the transition's follow-ups (isPending's falling
edge) stayed on a task with nothing left to do. Splice the block out, and when
the queue empties, retire the task so the follow-ups run after the microtask
flush that now renders the work.

The change shrinks brotli for suspense-transition and the bindings app, so their
budgets ratchet down with --write-budgets (lowerings only).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trueadm
trueadm merged commit d788d32 into main Oct 8, 2026
32 checks passed
@trueadm
trueadm deleted the fix/transition-flush-task branch October 8, 2026 11:05
trueadm added a commit that referenced this pull request Oct 8, 2026
…sition test (#1902)

"commits without animation when a pre-render passive adds urgent sibling
work" relies on a passive effect from a sync commit still being pending when
the transition's host task (#1873) starts rendering. In the test, that passive
is drained at the next animation frame, which then posts to the runtime's
long-lived post-paint port. When jsdom's frame timer comes due before the
transition task runs, as it can on a loaded CI worker, the passive drains
first and the transition animates. The test's capture mock never runs the
update, so the left scope stays 'initial', and `vi.waitFor` timed out in
octane-prod on #1893.

The test now fakes setTimeout and requestAnimationFrame, so no frame and no
fallback timer can drain the passive early. It waits for the transition with
a host task posted after the runtime's, not by polling, because `vi.waitFor`
would advance the fake timers.

The host-task `nextTask()` helper moves to tests/_helpers.ts. It replaces the
local copies in view-transition.test.ts and view-transition-matching.test.ts.
#1875 already made the matching tests wait for the native transition start.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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 fix PR: bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant