Conversation
🦋 Changeset detectedLatest commit: d8d5c89 The changes in this PR will be included in the next version bump. This PR includes changesets to release 29 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
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:
WalkthroughIntroduces optional private networking support end-to-end. Billing and run-engine types now include Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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 |
bd1484d to
a9d6231
Compare
Code reviewFound 1 issue:
Both trigger.dev/apps/webapp/app/features.server.ts Lines 17 to 21 in a9d6231 🤖 Generated with Claude Code - If this code review was useful, please react with 👍. Otherwise, react with 👎. |
d8d5c89 to
73db571
Compare
| disabled: !hasInProgressConnections, | ||
| }); | ||
|
|
||
| const hasPrivateNetworking = true; |
There was a problem hiding this comment.
🟡 Hardcoded hasPrivateNetworking = true makes plan-based UI gating dead code
On line 176, hasPrivateNetworking is hardcoded to true, which means the !hasPrivateNetworking branch on line 204 is unreachable dead code. The "Private Connections require upgrading to Pro or an Enterprise plan" message will never be shown to any user. This variable was clearly intended to be derived from the user's billing plan (similar to how limit on line 177 reads from plan?.v3Subscription?.plan?.limits), but was left as a hardcoded true — likely a placeholder that was never replaced with the actual plan check.
Prompt for agents
In apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.private-connections._index/route.tsx at line 176, replace the hardcoded `const hasPrivateNetworking = true;` with an actual check against the billing plan. The plan object is already available via `useCurrentPlan()` on line 157. The check should look something like:
const hasPrivateNetworking = plan?.v3Subscription?.plan?.limits?.hasPrivateNetworking ?? false;
This will make the UI correctly show the upgrade message for users whose plan does not include private networking, and hide the Add Connection button.
Was this helpful? React with 👍 or 👎 to provide feedback.
| isPaying = (lockedTaskRun.planType ?? "free") !== "free"; | ||
| } else { | ||
| isPaying = billingResult.val.isPaying; | ||
| hasPrivateLink = billingResult.val.hasPrivateLink; | ||
| } |
There was a problem hiding this comment.
🚩 Billing cache fallback omits hasPrivateLink — pods lose private networking label during billing outage
When the billing cache fails or returns no value (dequeueSystem.ts:499), the hasPrivateLink variable remains undefined (declared on line 498). This means during a billing cache outage, pods for orgs with private networking won't get the privatelink Kubernetes label, potentially breaking their CiliumNetworkPolicy-based network access. This is a deliberate conservative degradation (don't grant network access you can't verify), but it could cause unexpected connectivity failures for paying customers during transient billing issues. The billing cache has 5-minute fresh / 10-minute stale TTLs (billingCache.ts:17-18) so the window is typically small.
(Refers to lines 498-518)
Was this helpful? React with 👍 or 👎 to provide feedback.
No description provided.