Certificate: Fix preview popup blocked on Safari and mobile#1923
Conversation
|
Warning Review limit reached
Next review available in: 40 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: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
📝 Pull Request Template
Use this template to provide all necessary information for reviewing and testing your changes.
✨ What is the change?
The certificate template preview now opens reliably in Safari and on mobile.
handlePreviewinSettingsPage.tsxopened the preview tab withwindow.open(url, '_blank')only after awaiting the preview compilation, so the call was no longer inside the click gesture and Safari/mobile popup blockers silently swallowed it. The tab is now opened synchronously within the click handler and pointed at the generated blob once it is ready, with an anchor-based fallback if the browser still returns no window.📌 Reason for the change / Link to issue
Closes #1291. On Safari and mobile browsers the "Preview" button did nothing because the popup was blocked. Browsers only allow
window.openwhen it runs synchronously in a user-initiated event handler; after anawaitthat context is lost.🧪 How to Test
🖼️ Screenshots (if UI changes are included)
✅ PR Checklist