fix: improve error handling for Paddle checkout and enhance loading logic#3714
Conversation
|
Warning Review limit reached
Next review available in: 58 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)
📝 WalkthroughWalkthroughThe ChangesPaddle Checkout Readiness Wait
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/platform/src/modules/billing/components/SubscriptionSection.tsx`:
- Around line 544-557: The timeout check in SubscriptionSection should match the
polling condition exactly, since the loop waits for both
window.Paddle.Checkout.open and window.Paddle.Initialize. Update the guard after
the wait so it throws when either Checkout.open is missing or Initialize is
still not a function, using the same readiness criteria as the polling logic to
prevent opening checkout in a partially loaded state.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e23f1df6-bead-4861-b173-999dec96078a
📒 Files selected for processing (2)
src/platform/src/modules/billing/components/SubscriptionSection.tsxsrc/platform/src/shared/providers/paddle-provider.tsx
|
New azure analytics_platform changes available for preview here |
|
New azure analytics_platform changes available for preview here |
There was a problem hiding this comment.
Pull request overview
This PR improves the reliability of Paddle checkout initialization by adjusting when the Paddle script initializes and by adding a client-side wait/poll before attempting to open the Paddle checkout overlay.
Changes:
- Updates Paddle script loading/initialization behavior in the global
PaddleProvider. - Adds a bounded poll (up to 10s) to wait for Paddle’s checkout overlay API to become available before calling
Checkout.open. - Improves the user-facing error message when Paddle fails to load.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/platform/src/shared/providers/paddle-provider.tsx | Adjusts script onLoad initialization behavior and changes when the provider renders the Paddle script. |
| src/platform/src/modules/billing/components/SubscriptionSection.tsx | Adds polling/wait logic before opening the Paddle checkout overlay and provides a clearer failure message. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <Script | ||
| id={PADDLE_SCRIPT_ID} | ||
| src={PADDLE_SCRIPT_SRC} | ||
| strategy="afterInteractive" | ||
| onLoad={initializePaddle} | ||
| onLoad={paymentClientToken ? initializePaddle : undefined} |
|
New azure analytics_platform changes available for preview here |
|
New azure analytics_platform changes available for preview here |
1 similar comment
|
New azure analytics_platform changes available for preview here |
…
Summary of Changes (What does this PR do?)
Status of maturity (all need to be checked before merging):
Screenshots (optional)
Summary by CodeRabbit