feat(admin): open stripe customer portal from billing section#1715
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a billing portal update action to the organization billing side panel. The header now uses an edit button that starts a checkout mutation, opens the returned URL in a new tab, and adds matching layout and disabled-state styling. ChangesBilling Portal Checkout Flow
Estimated code review effort🎯 4 (Complex) | ⏱️ ~35 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
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
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a9ca3b12-42cf-4d07-9b52-8b1a14c39ada
📒 Files selected for processing (1)
web/sdk/admin/views/organizations/details/side-panel/billing-details-section.tsx
Coverage Report for CI Build 28439458386Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 43.819%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
23b6ec0 to
d23f5bb
Compare
d23f5bb to
a02faf2
Compare
a02faf2 to
f14e452
Compare
f14e452 to
30cfb5c
Compare
30cfb5c to
42e8ace
Compare
42e8ace to
18639e1
Compare
18639e1 to
3fc0a5f
Compare
3fc0a5f to
d831e6b
Compare
d831e6b to
16ee67c
Compare
16ee67c to
2a4dcd4
Compare

What
Adds an edit (pencil) action to the right of the Billing section header in the organization details side panel of the admin app (matching the Figma). Clicking it opens the Stripe customer portal for that org so a super user can update the customer's billing address / details.
This works even when the org's KYC is completed — unlike the client app, the admin app does not gate the action on KYC.
How
FrontierService/CreateCheckoutRPC withsetupBody.customerPortal = true(the same call the client app's billing view uses). Super-user authorization already resolves via theplatform->superuserschema cascade, so no backend change is needed.aria-disabled(not the native attribute) so it stays hoverable and shows a tooltip — "No billing account for this organization" when disabled, "Update billing details" otherwise. Errors surface viatoastManager.1.0.0-rc.12ships no edit/pencil icon, so this usesPencil1Iconfrom@radix-ui/react-icons(already used across the admin app). The header lays the title + action out as a flex row so the icon is right-aligned.Related
Test plan
eslintpasses on the changed file.CreateCheckoutand opens the portal in a new tab.