Repository navigation
Conversation
…uplicate framer-motion runtime
|
@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. |
| beforeAll(async () => { | ||
| await Promise.all(dynamicImports); | ||
| }); |
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!
|
Thanks @07rjain, this is a nice split. It matches what The only open item is Greptile's P2 on The branch is also quite far behind main now (it merges cleanly), so please merge main when you push so CI runs against current code. It needs to reach Greptile 5/5 with green CI before we can merge. You can mention @greptileai in a comment to get a re-review after pushing. Thanks! |
|
Thanks — I agree the P2 is a coverage gap, not evidence that playback chrome is broken: the wrapper handles bubbled playback events, and the existing async-player case checks chrome after the video mounts. One caveat: |
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Split out of #2580 (embed player split).
EmbedVideo now loads the MP4/HLS player and upload tracker through next/dynamic, and uses motion/react for the chrome. An embed downloads the player it needs without adding a second animation runtime.
Metadata handling now captures events on the player container, so a player that mounts after EmbedVideo still applies the URL start-time seek. The seek remains once-only across later metadata events. Pending-loader regressions cover MP4 and HLS playback, start-time seeking, and chrome updates after play/pause.
Main has been merged.
Validation: all 33 embed playback/branding tests and scoped Biome checks pass.
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