fix: stripe addon - #2294
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
2 issues found across 4 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
|
@claude review |
|
Claude finished @mxkaske's task in 2m 4s —— View job PR Review
SummaryThis PR centralizes the "rebuild workspace limits from Stripe subscription" logic into a single testable function Overall: Looks good with a few things worth flagging. Cubic Issue #2 — Is it actually unresolved?
This appears to be a false alarm on the current code. if (!feature) {
throw new Error(
`Unsupported Stripe price on subscription: ${item.price.id}`,
);
}The JSDoc at the top of the function also documents this invariant. Cubic may have flagged an intermediate commit before the throw was added. Issues Found[P2] return FEATURES.find(
(feature) => feature.price.monthly.priceIds[env] === priceId,
);If a yearly addon price is ever introduced (or already exists on Stripe), it won't match here and will hit the plan.price.monthly.priceIds[env] === priceId ||
plan.price.yearly.priceIds[env] === priceId,The [P2] Behavior asymmetry between the two webhook handlers ( When
This is probably the right behavior — [P3] Unknown prices propagate as unhandled exceptions in When
[Nit] Debug console.log("getCheckoutSession");This is unrelated to this PR but worth cleaning up — it'll appear in Vercel/production logs on every checkout session creation. What's Done Well
|
|
@claude review |
|
Claude finished @mxkaske's task in 2m 3s —— View job PR Review
SummaryThis PR extracts Overall: Looks good to merge. What's Fixed and Working WellAccumulation bug is correctly resolved. The key change is reading
Tests are well-structured. Deriving price IDs from the source tables (
Issues Found[Nit] Redundant const built = buildFromSubscriptionOrThrow(subscription);
if (!built) {
console.error("Invalid plan"); // <-- redundant
throw new TRPCError({ code: "BAD_REQUEST", message: "Invalid plan" });
}
[Observation] Addressed Since Previous Review
|
There was a problem hiding this comment.
1 issue found across 3 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
* fix: stripe addon * fix: review * wip: * fix: review
Uh oh!
There was an error while loading. Please reload this page.