Repository navigation
Conversation
…uplicate framer-motion runtime
Contributor
|
@07rjain is attempting to deploy a commit to the Cap Software Inc Team on Vercel. A member of the Team first needs to authorize it. |
6 tasks
Comment on lines
+201
to
+203
| beforeAll(async () => { | ||
| await Promise.all(dynamicImports); | ||
| }); |
Contributor
There was a problem hiding this comment.
The new next/dynamic mock starts every loader immediately, and beforeAll waits for all of them before rendering. This skips the loading behavior introduced by this PR, so the tests cannot catch problems when a player arrives after EmbedVideo mounts. Keep a loader pending during at least one test, resolve it after rendering, and check that playback events still update the chrome.
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/__tests__/unit/embed-video-playback-chrome.test.ts
Line: 201-203
Comment:
**Late loading goes untested**
The new `next/dynamic` mock starts every loader immediately, and `beforeAll` waits for all of them before rendering. This skips the loading behavior introduced by this PR, so the tests cannot catch problems when a player arrives after `EmbedVideo` mounts. Keep a loader pending during at least one test, resolve it after rendering, and check that playback events still update the chrome.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
This branch has not been 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.
Split out of #2580 (embed player split).
EmbedVideostatically imported both players, the upload progress tracker and a second framer-motion runtime. These now load withnext/dynamic, so an embed only downloads the player it uses. Playback behavior is unchanged, andembed-video-playback-chrome.test.tscovers the split.The PR appears safe to merge, with a non-blocking gap in tests for delayed player loading.
Findings
Fix with agent prompt
Summary
The PR loads the embed players and upload tracker through
next/dynamicand switches the embed chrome tomotion/react.Tests were not run.
Reviews (1) · Last reviewed commit: "perf(embed): code-split the players and ..." · Reviewed by Greptile