Skip to content

test(motion): add React parity harness - #522

Closed
jonkwheeler wants to merge 51 commits into
octanejs:mainfrom
jonkwheeler:jon/motion-react-parity-harness
Closed

jonkwheeler wants to merge 51 commits into
octanejs:mainfrom
jonkwheeler:jon/motion-react-parity-harness

Conversation

@jonkwheeler

@jonkwheeler jonkwheeler commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • pin Motion 12.42.2 and record its React/browser/type suite disposition and port-test classification ledger
  • add an exact motion/react vs Octane host rendering and update lane with fail-closed fixture compilation
  • authenticate the initial-only style divergence and generalize the global audit to required lanes on every binding manifest

Verification

  • Motion Vitest project: 21 files, 41 tests passed
  • Motion differential and adapted-divergence harness lanes passed
  • focused classification/check helper tests passed
  • generated binding status and parity-gap checks passed
  • global React parity audit passed (stable: 5,345 cases; canary: 5,413 cases)

Provenance

  • An agent produced this diff (agent-authored)

Note

Medium Risk
Changes inline transform and style-effect lifecycle on motion hosts (interacts with layout FLIP and exit clones); coverage is strong but wrong patching could cause visual glitches in animated UIs.

Overview
Runtime: Style MotionValue bindings now depend on the style bag and rebind when identities change (matching upstream useMotionValue swap behavior). Transforms are patched on the live transform string instead of rebuilt from scratch, with tracking of managed keys so unmount/exit clones keep visual state. Layout FLIP compounds (translate(x,y), asymmetric scale(sx,sy)) are decomposed for axis shorthands where safe, and compound/asymmetric forms are left alone on unbind so layout-owned transforms are not stripped. Switching a key from a MotionValue to a plain static value no longer clears the host style.

Parity & docs: Pins Motion 12.42.2, vendors the curated useMotionValue Jest suite (upstream:verify, pristine/adapted inventories), adds Octane vs motion/react differential host rendering, paired pristine/adapted public-surface type probes, react-parity.json / test classifications, and vitest projects (motion-pristine, motion-upstream, motion-differential). Documents a new known divergence: initial without animate does not materialize inline styles (conformance + bindings status).

Tooling: Extends react-parity check to verify every binding manifest’s classifications, motion-types-lib, and conformance: case ids on divergence markers.

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

@vercel

vercel Bot commented Aug 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
octane-website Ready Ready Preview Aug 7, 2026 3:57pm
octane-website-mcp Ready Ready Preview Aug 7, 2026 3:57pm

Request Review

@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 01:01 Inactive
@github-actions github-actions Bot added agent-authored Diff or issue body substantially produced by an AI agent test PR: tests only labels Aug 3, 2026
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 01:02 Inactive
Comment thread packages/motion/audit/react-parity.json Resolved
@jonkwheeler
jonkwheeler marked this pull request as draft August 3, 2026 01:49
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 05:58 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 05:59 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 06:16 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 06:16 Inactive
@jonkwheeler
jonkwheeler force-pushed the jon/motion-react-parity-harness branch from 0ff1a94 to 3cc63cb Compare August 3, 2026 07:58
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 3, 2026 07:59 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 3, 2026 08:00 Inactive
@jonkwheeler
jonkwheeler marked this pull request as ready for review August 3, 2026 08:30
@jonkwheeler
jonkwheeler marked this pull request as draft August 3, 2026 08:49
Follow the hook-form pattern: tag parity lanes with
testExecution group react-parity, move differential tests into a
dedicated project with globalSetup precompile, and drop per-file
beforeAll compile hooks.
@vercel
vercel Bot temporarily deployed to Preview – octane-website-mcp August 7, 2026 15:55 Inactive
@vercel
vercel Bot temporarily deployed to Preview – octane-website August 7, 2026 15:57 Inactive
jonkwheeler and others added 2 commits August 7, 2026 13:50
Resolve merge conflicts preserving PR intent and the react-parity vitest
differential split; refresh lockfile and vitest integrity hashes.

Co-authored-by: Cursor <[email protected]>
Align vitest differential wiring with the split-project pattern and
refresh react-parity evidence hashes.

Co-authored-by: Cursor <[email protected]>
Comment thread vitest.config.js Resolved
Comment thread packages/motion/audit/react-parity.json Resolved
Resolve motion package conflicts by keeping main's layout/lazy/reduced-motion
surfaces while retaining this PR's parity-harness style-rebind behavior,
OCTANE DIVERGENCE markers, and upstream test scripts.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Addressed currency: merged origin/main into jon/motion-react-parity-harness (no rebase). Resolved conflicts in motion package/docs/status by keeping main's layout/lazy/reduced-motion surfaces while retaining this PR's parity-harness style-rebind behavior, OCTANE DIVERGENCE markers, and upstream test scripts. Motion Vitest project: 27 files / 72 tests passed locally.

Comment thread packages/motion/src/useMotionValue.ts Resolved
When a style MotionValue patches over a layout FLIP compound translate/scale,
consult the shared transformState for sibling axes so bound peers are not
overwritten until they emit again.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Addressed Bugbot finding on sibling-axis compound FLIP patching: transformState now preserves bound peer axes; regression tests added.

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

REVIEW WITHDRAWN

Merging origin/main to clear DIRTY conflicts; prior ready signal is void until Bugbot completes on the new head.

Comment thread packages/motion/src/useMotionValue.ts Resolved
A style scale MotionValue shares the scale( token with layout FLIP's
two-arg compound, so exact replace was collapsing sx/sy mid-animation.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is behind main; restoring merge currency before re-checking readiness.

REVIEW WITHDRAWN

@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 is ON, but it could not run because the branch was deleted or merged before autofix could start.

Reviewed by Cursor Bugbot for commit 08442e5. Configure here.

Comment thread packages/motion/src/useMotionValue.ts Resolved
Style scale shares the scale( token with layout FLIP's two-arg form, so
removeTransformFn was wiping the layout axis when a MotionValue unbound.

Co-authored-by: Cursor <[email protected]>
@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Merge currency restored, Bugbot finding on FLIP scale unbind fixed and resolved, Bugbot SUCCESS on current head with no open threads.

READY FOR REVIEW

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Branch is behind main again; restoring merge currency before re-checking readiness.

REVIEW WITHDRAWN

@jonkwheeler

Copy link
Copy Markdown
Contributor Author

Merge currency restored via update-branch; Cursor Bugbot completed successfully on current head with no unresolved findings or review threads.

READY FOR REVIEW

@leonidaz

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! This pull request was incorporated into main as commit 60a725182d96 through consolidated PR #699.

@leonidaz leonidaz closed this Aug 12, 2026
kotarotaniguchi0523 pushed a commit to kotarotaniguchi0523/octane that referenced this pull request Aug 12, 2026
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 READY FOR REVIEW REVIEW COMPLETE test PR: tests only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants