Skip to content

Fork patch: Settle CSS transitions on jump seeks - #7

Draft
valeriangalliat wants to merge 1 commit into
mainfrom
patch/jump-seek-css-settle
Draft

valeriangalliat wants to merge 1 commit into
mainfrom
patch/jump-seek-css-settle

Conversation

@valeriangalliat

Copy link
Copy Markdown
Collaborator

🤖 AI agent: Arcade fork patch. Do not merge.

This draft shows patch/jump-seek-css-settle against main, the upstream mirror, so the patch has one page for its diff, its revisions and its reason. Arcade's /hyperframes-update rebases the branch onto main and cherry-picks it onto arcade; this PR is not part of that flow. When a rebuild changes the patch, its git range-diff against the previous sync/<date>/jump-seek-css-settle tag is posted as a comment.

Why

A chunk worker starts with a jump seek. Class swaps on that seek spawn CSS transitions, and the worker then replays those fades in its first frames. The patch calls finish() on transitions spawned by a jump seek; swaps that land on the seam snap. Static-frame verification folds the settle into its single seek call, because upstream tests (staticDedupVerifyDensity) count page.evaluate calls.

Upstream

Kept local. Carried before as ArcadeHQ/hyperframes#33.

Drop when

Not recorded yet.

Arcade

ARC-14274 · ARC-14435

@valeriangalliat
valeriangalliat force-pushed the patch/jump-seek-css-settle branch from 56d8fbc to 1f1a377 Compare October 24, 2026 23:23
@valeriangalliat

valeriangalliat commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator Author

🤖 AI agent: sync/2026-10-24 (tags moved the same day): rebased onto upstream 2e397dba5 (v0.8.194). Replayed clean.

First pass on this date, onto 722481214 (0.8.193): Sits beside upstream beginFrameSeekPresented (heygen-com#5812) and captureStep (heygen-com#5450). Iframe loop reads win.frames?.length ?? 0: upstream motion-blur tests run the page function on a stub window without frames.

The range-diff below is against sync/2026-10-05.

git range-diff sync/2026-10-05/base..sync/2026-10-05/jump-seek-css-settle sync/2026-10-24/base..sync/2026-10-24/jump-seek-css-settle
1:  56d8fbcc5 ! 1:  4c51242c1 fix(engine): settle CSS transitions spawned by jump seeks
    @@ packages/engine/src/services/frameCapture-jumpSeek.test.ts (new)
     
      ## packages/engine/src/services/frameCapture.ts ##
     @@ packages/engine/src/services/frameCapture.ts: export interface CaptureSession {
    -   beginFrameIntervalMs: number;
        beginFrameHasDamageCount: number;
        beginFrameNoDamageCount: number;
    +   beginFrameSeekPresented?: boolean;
     +  lastSeekTime?: number;
        /** Optional producer config — when set, overrides module-level env var constants. */
        config?: Partial<EngineConfig>;
    @@ packages/engine/src/services/frameCapture.ts: async function seekPageTimeline(
     +      try {
     +        settleDocument(win.document);
     +      } catch {}
    -+      for (let i = 0; i < win.frames.length; i++) {
    ++      for (let i = 0; i < (win.frames?.length ?? 0); i++) {
     +        const child = win.frames[i];
     +        if (child && child !== win) settleWindow(child);
     +      }
    @@ packages/engine/src/services/frameCapture.ts: async function seekPageTimeline(
        session: CaptureSession,
        frameIndex: number,
     @@ packages/engine/src/services/frameCapture.ts: async function prepareFrameForCapture(
    -   );
      
        const seekStart = Date.now();
    +   session.captureStep = "seeking the timeline";
     -  const hasPendingComposite = await seekPageTimeline(page, quantizedTime, seekOptions);
     +  const { hasPendingComposite } = await seekPageWithJumpSettle(
     +    session,
    @@ packages/engine/src/services/frameCapture.ts: async function prepareFrameForCapt
     +    seekOptions,
     +  );
      
    +   session.captureStep = "decoding CSS background images";
        await decodeDynamicCssBackgroundImages(page);
    - 
     @@ packages/engine/src/services/frameCapture.ts: export async function verifyStaticFramesSafe(
        const seekToFrame = async (frameIdx: number): Promise<void> => {
          stats.seeks++;
    @@ packages/engine/src/services/frameCapture.ts: export async function verifyStatic
     +              }
     +            }
     +          } catch {}
    -+          for (let i = 0; i < win.frames.length; i++) {
    ++          for (let i = 0; i < (win.frames?.length ?? 0); i++) {
     +            const child = win.frames[i];
     +            if (child && child !== win) settleWindow(child);
     +          }

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Edit accuracy: accurate 271 (base branch 271), smooth 156 of those

The gate passes.
Smoothness is reported in the artifact, not gated. A case fails only if it fails 2 of 3 runs.

Quarantined, measured but not gated (0)

Unstable (1)

  • seqplainkeys-none-pct-r0-root-z100: tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo false, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true / tracking 0.06, pressJump 0, drop 0, reload 0, render 0.03, renderKey -, undo true, teleport true

Keep-local: finish() jump-spawned CSS transitions so chunk workers
don't replay class-swap fades. On-seam swaps snap. Do not upstream.
@valeriangalliat
valeriangalliat force-pushed the patch/jump-seek-css-settle branch from 1f1a377 to 4c51242 Compare October 25, 2026 02:43

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant