You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: address code review findings for billing feature (#142)
## Summary
Review fixes for #141 that were pushed after the PR was merged.
- Fix comma-operator bug in Stripe product ID resolution (could fail
silently)
- Paginate cron query with batches of 500 for multi-tenant scale
- Warn admin when custom price change doesn't sync to Stripe
subscription
- Surface warnings in add/edit member forms instead of swallowing them
- Use plan currency instead of hardcoded EUR in member detail
- Use Postgres enum type for `billing_mode` instead of text+CHECK
- Calculate credit validity as next anniversary date, not fixed 30 days
- Add TODO comments for post-migration type regen
## Test plan
- [x] 351 unit tests pass, type-check clean
- [ ] Verify Stripe product ID resolution works for plans without
existing Stripe product
- [ ] Verify cron processes members in batches correctly
- [ ] Verify warning appears when changing custom price on Stripe-billed
member
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
warning: "Custom price updated in the database. The active Stripe subscription was not changed — update it manually in the Stripe dashboard if needed.",
108
+
};
109
+
}
110
+
84
111
return{success: trueasconst};
85
112
}
86
113
@@ -280,10 +307,17 @@ export async function addMember(input: unknown) {
0 commit comments