Repository navigation
perf(web): dedupe framer-motion onto the version motion already ships - #3533
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Member
Author
|
hey @greptileai, please re-review the PR |
richiemcilroy
marked this pull request as ready for review
October 29, 2026 00:51
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The web app shipped two builds of the animation library on every dashboard route.
apps/webpinnedframer-motion@^11, whilemotion@12(imported asmotion/reactelsewhere in the app) brings its own nestedframer-motion@12. Turbopack bundles both, so every dashboard page loadedframer-motion11 andframer-motion12 together.This PR pins
apps/webtoframer-motion@^12.42.2, the exact versionmotionalready depends on. Bun then resolves a single copy, and thebun.lockdiff is only the motion entries:motion,AnimatePresence,VariantsandMotionPropfromframer-motion. Motion's upgrade guide says: "There are no breaking changes in Motion for React in version 12."ease. The first commit annotates five variant objects asVariants(type only). InNavbar/Items.tsx:220it changestype: "easeInOut"(not a valid generator type) toease: "easeInOut". Thatmotion.divhas noanimate,initial,layoutor gesture props, so itstransitionis never read on either version.Numbers
Initial JS per route, gzipped (route entry chunks plus root main files, from the build manifests). Measured from a clean install; an in-place
bun installleaves the old nested copy innode_modules/motion/node_modulesand shows no saving./dashboard/caps/dashboard/folder/[id]/dashboard/spaces/[spaceId]/dashboard/settings/organization/login,/signup,/verify-otp/,/pricing,/download,/s/[videoId]The auth pages only ever loaded v11. v12 on its own is 5.5 to 5.9 KB larger, and they need
layoutanimations, so they can't drop to a lighter feature set.Runtime: production builds on a Mac mini against the same seeded database and storage, both servers restarted and warmed before the run. Headless Chromium, cold load, median of 9 runs, base and head alternating. Throttled is 4x CPU and 10 Mbps / 40 ms.
/dashboard/caps/dashboard/settings/organization/dashboard/caps/dashboard/capsVisual check
Both builds were driven through the same interactions, and the settled screenshots compared pixel by pixel. The states were: caps page, sidebar collapsed, spaces list expanded, org dropdown, user menu, notifications with the Comments tab, multi-select bar, Add Videos with a selection, the web recorder dialog, org settings, analytics, developers, Loom import, mobile nav, home (two scroll depths), student discount, Google Drive page, login and signup. All of them match, apart from a CSS
animate-pingdot and a few antialiased pixels that also differ between two runs ofmain.For the sidebar collapse, the spaces expansion, the notifications panel and the multi-select bar, frames were captured every 40 ms for 600 ms under Playwright's fake clock. Base against head stays within the frame-to-frame variance of base against base.


Confidence Score: 5/5
The PR appears safe to merge; no blocking issues were found.Summary
Updates
apps/webto shareframer-motion@12.42.2withmotion, removing the separate version 11 dependency tree.Build and browser checks were not run; installed dependencies were unavailable.
Reviews (2) · Last reviewed commit: "perf(web): dedupe framer-motion onto the..." · Reviewed by Greptile