fix(ui): polish subscription billing settings#3781
Conversation
Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Polishes subscription settings UI by stabilizing Written by Cursor Bugbot for commit 4281eba. Configure here. |
.../[workspaceId]/settings/components/subscription/components/credit-balance/credit-balance.tsx
Show resolved
Hide resolved
Greptile SummaryThis PR polishes the subscription billing settings UI. In Confidence Score: 5/5Safe to merge — the modal lifecycle fix is correct and the layout changes are purely cosmetic improvements. Prior review concerns (onPurchaseComplete skipping, redundant rounded corner) have been addressed. The new timeout management is correct: onPurchaseComplete fires immediately, the timeout is cleared on manual close and on unmount, and the pending guard prevents premature dismissal. Layout changes in subscription.tsx are straightforward and carry no functional risk. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Modal
participant purchaseCredits
participant Parent
User->>Modal: Click "Add Credits" (openModal)
Note over Modal: resetModalState(), new requestId
User->>Modal: Enter amount & click Purchase
Modal->>purchaseCredits: mutate({ amount, requestId })
purchaseCredits-->>Modal: onSuccess
Modal->>Parent: onPurchaseComplete?.() (immediate)
Modal->>Modal: schedule closeModal() in 1500ms
alt User waits 1500ms
Modal->>Modal: auto closeModal()
Note over Modal: clearTimeout, setIsOpen(false), resetModalState()
else User manually closes modal (ESC / backdrop)
User->>Modal: onOpenChange(false)
Note over Modal: isPending=false → closeModal()
Modal->>Modal: clearTimeout (cancels auto-close), resetModalState()
end
Reviews (2): Last reviewed commit: "fix(ui): trigger purchase refresh on suc..." | Re-trigger Greptile |
.../[workspaceId]/settings/components/subscription/components/credit-balance/credit-balance.tsx
Show resolved
Hide resolved
apps/sim/app/workspace/[workspaceId]/settings/components/subscription/subscription.tsx
Show resolved
Hide resolved
Made-with: Cursor
|
@greptile |
|
@cursor review |
Summary
Type of Change
Testing
Tested manually
Checklist