test(card): regression guard for the blank share-asset capture#2305
Conversation
Export waitForAssetReady (with an injectable timeout) and add 4 tests proving the capture gate blocks the html-to-image snapshot until the async card-face <canvas> has mounted — the exact element whose absence produced the launch-day blank share asset (#2302) — plus: bounded so it never hangs, awaits every <img>.decode(), and awaits document.fonts.ready. 6/6 pass.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 7 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Comment |
Code-analysis diffPainscore total: 5843.65 → 5843.65 (0) |
🧪 UI test report — ✅ all greenSuites
📊 Coverage (unit)
⏱ 10 slowest test cases
|
Definitive verification + permanent guard for the blank-share-asset fix (#2302, merged).
The blank asset was a timing race: the card-face hand is an async-mounted
<canvas>, and html-to-image can't wait for a not-yet-mounted canvas, so a fast/first-of-session capture snapshotted a blank card. That race can't be reproduced on-demand, so the definitive check is a unit test of the gate logic:waitForAssetReadywith an injectable timeout (so the bounded-wait is testable without a 2.5s test).does NOT resolve until the card-face <canvas> has mounted— proves capture blocks until the hand canvas is present (a snapshot before it would be blank).<img>.decode(), awaitsdocument.fonts.ready.6/6 pass, prettier + typecheck clean. Off main; back-merge to dev.