feat(web): graceful error and loading states for billing/offers surfaces#1267
Conversation
Replace silent `null` returns with recoverable error states when the offers fetch fails, across onboarding, the upsell dialog/panel, and feature gates: - Onboarding trial step: reframe the error copy and add a "View pricing" link. - UpsellDialog / UpsellPanel: shared UpsellLoadError fallback with a retry, Status page link, and role-aware copy (owners get an outbound-access hint to deployments.sourcebot.dev + Learn more; members are routed to their admin). - UpsellPanel: add a `loadingVariant` prop so full-area feature gates render a centered spinner while the in-flow license card keeps its skeleton. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
@brendan-kellam your pull request is missing a changelog! |
Fixes SOU-1271
Summary
When the offers/pricing fetch from the deployments server fails, several billing surfaces previously rendered nothing (
return null) or silently dismissed themselves, leaving users with a blank area or a vanished dialog. This PR replaces those with recoverable, role-aware error states and tidies the loading UX.Changes
trialStep.tsx): on error, reframe the copy to "You're all set" and add a View pricing link instead of a bare Continue button.upsellDialog.tsx): introduce a sharedUpsellLoadErrorfallback used by bothUpsellDialogandUpsellPanel:refetch) and a Status page link (status.sourcebot.dev), which is resilient to the very failure that triggered the state.deployments.sourcebot.devplus a Learn more link to the service-ping docs; members are routed to contact their org admin.upsellDialog.tsx+ the five entitlement-message wrappers): add aloadingVariantprop toUpsellPanel. Full-area, centered feature gates (chat, MCP, analytics, account/workspace Ask connectors) now render a centered spinner; the in-flow license-settings card keeps its layout-matching skeleton.Test plan
deployments.sourcebot.dev(or otherwise force the offers fetch to fail) and verify the error state renders on: the onboarding trial step, the upsell dialog, and each feature-gate page.🤖 Generated with Claude Code