fix(demo): preload the Cal.com booking embed while the visitor fills the form#5616
Conversation
…the form The embed script, booker iframe, and its assets only started downloading after the visitor pressed Continue, so the calendar took several seconds to appear. Warm the whole path on first form focus via the embed's documented preload instruction (hidden ?preload=true iframe caches the booker assets) plus a preconnect to app.cal.com. Nothing Cal.com-related loads at initial page load, so Lighthouse/LCP are untouched.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 9e49846. Configure here. |
Greptile SummaryThis PR preloads the Cal.com demo scheduler after the visitor starts the form.
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "fix(demo): retry embed warm-up on failur..." | Re-trigger Greptile |
…ocus Reset the preload guard when embed.js fails to load so a later focus can retry, and move the app.cal.com preconnect from render into the focus-triggered preload path so initial page load makes zero Cal.com connections.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9e49846. Configure here.
Summary
preloadinstruction — it caches the booker's assets in a hidden?preload=trueiframe while the visitor fills the formpreconnectto app.cal.com (React 19react-domAPI) so the first embed request skips connection setupType of Change
Testing
Tested manually with Playwright against the running app: confirmed no cal.com requests on page load, preload iframe attaches ~200ms after first form focus, and the booker renders fully ~815ms after submit
Checklist