Repository navigation
fix(ui): warn refunds cancel the subscription - #3227
Merged
Merged
Conversation
Refunding a plan payment cancels the Stripe subscription outright, but the self-refund dialogs downplayed or omitted it. Spell out that the subscription ends immediately, the remaining cycle credits are lost, and resubscribing is required. Also branch the org billing dialog on the transaction type so plan payments and Reset Passes no longer get credit top-up copy. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QT99FzP9yQUdM8ii1Y45M7
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
WalkthroughRefund interfaces now recognize DevPass and chat plan transactions, presenting cancellation-specific confirmation, toast, and action-label text while preserving separate messaging for non-plan purchases and Reset Pass refunds. ChangesPlan refund messaging
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
steebchen
enabled auto-merge
July 25, 2026 11:25
steebchen
added this pull request to the merge queue
Jul 25, 2026
This was referenced Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Refunding a plan payment cancels the Stripe subscription outright —
handleChargeRefundedcallssubscriptions.cancel(...)on any full refund of a dev/chat plan payment, which ends the plan immediately and wipes the rest of the cycle's credits. The self-refund dialogs either buried that ("your DevPass will be cancelled immediately", as a trailing clause) or never mentioned it at all. This makes the consequence the first thing users read.Changes
apps/code/.../DevPassInvoices.tsx) — plan payments now lead with "Refunding cancels your subscription completely", state that the plan ends right away rather than at the end of the billing period, that the cycle's remaining credits are lost, and that resubscribing means starting from scratch. Title changed to "Refund and cancel your DevPass?". Reset Pass copy is unchanged (it does not touch the subscription).apps/playground/.../chat-billing-history.tsx) — same warning for chat plan payments, plus a "Keep my membership" cancel action and a "Refund and cancel" confirm action so the destructive path is explicit. Credit top-up copy is unchanged.apps/ui/.../billing/transactions-client.tsx) — this dialog rendered credit top-up copy ("N credits will be removed from your balance") for every refundable transaction, including plan payments and Reset Passes, which the endpoint does return here. The copy now branches by transaction type: subscription-cancellation warning for plan payments, pass-specific copy for Reset Passes, existing copy for top-ups. The success toast mentions the cancellation for plan payments too.Copy-only change; no behavior, API, or eligibility logic touched.
Testing
pnpm formatturbo run build --filter=ui --filter=playground --filter=code— all passGenerated by Claude Code
Summary by CodeRabbit
New Features
Bug Fixes