-
-
Notifications
You must be signed in to change notification settings - Fork 811
chore(webapp): a new cancelation reason #2465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
WalkthroughA new option was added to the downgrading dialog in TierFree within apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx. The first item in the "Why are you thinking of downgrading?" reasons list is now "The Free plan is all I need". This updates the CheckboxWithLabel options and ensures this value is included in submitted reasons when selected. No other logic or UI components were changed, and there were no modifications to exported or public declarations. Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx (1)
941-946
: Bug: wrong canExceed flag used for team members.This will show “+” based on concurrentRuns instead of teamMembers.
return ( <FeatureItem checked> {limits.teamMembers.number} - {limits.concurrentRuns.canExceed ? "+" : ""} team members + {limits.teamMembers.canExceed ? "+" : ""} team members </FeatureItem> );
🧹 Nitpick comments (5)
apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx (5)
262-268
: De-stringify the “lacking features” sentinel and centralize reason labels.Avoid string comparisons in onChange and keep a single source of truth for labels.
Apply:
@@ const [isDialogOpen, setIsDialogOpen] = useState(false); const [isLackingFeaturesChecked, setIsLackingFeaturesChecked] = useState(false); const status = subscription?.freeTierStatus ?? "requires_connect"; + const LACKING_FEATURES_LABEL = "Lacking features I need" as const; + const CANCEL_REASONS = [ + "The Free plan is all I need", + "Subscription or usage costs too expensive", + "Bugs or technical issues", + "No longer need the service", + "Found a better alternative", + LACKING_FEATURES_LABEL, + ] as const; @@ - {[ - "The Free plan is all I need", - "Subscription or usage costs too expensive", - "Bugs or technical issues", - "No longer need the service", - "Found a better alternative", - "Lacking features I need", - ].map((label, index) => ( + {CANCEL_REASONS.map((label, index) => ( @@ - onChange={(isChecked: boolean) => { - if (label === "Lacking features I need") { + onChange={(isChecked: boolean) => { + if (label === LACKING_FEATURES_LABEL) { setIsLackingFeaturesChecked(isChecked); } }}Also applies to: 413-420, 429-433
421-421
: Prefer stable keys.Use the label (unique, stable) instead of the index.
- <li key={index}> + <li key={label}>
96-96
: Spelling nit: “cancellation” (double “l”).Internal-only, but good to keep consistent.
- title: "Plan cancelation feedback", + title: "Plan cancellation feedback",
511-511
: Typo: RealtimeConnecurrency → RealtimeConcurrency.Rename for clarity and consistency.
- <RealtimeConnecurrency limits={plan.limits} /> + <RealtimeConcurrency limits={plan.limits} />- <RealtimeConnecurrency limits={plan.limits} /> + <RealtimeConcurrency limits={plan.limits} />- <RealtimeConnecurrency limits={plan.limits} /> + <RealtimeConcurrency limits={plan.limits} />-function RealtimeConnecurrency({ limits }: { limits: Limits }) { +function RealtimeConcurrency({ limits }: { limits: Limits }) {Also applies to: 628-628, 745-745, 1019-1019
53-59
: Simplify schema: reasons is always posted as an array.Given you already use formData.getAll("reasons"), the union isn’t needed.
- reasons: z.union([z.string(), z.array(z.string())]).optional(), + reasons: z.array(z.string()).optional(),
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx
(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}
: Always prefer using isomorphic code like fetch, ReadableStream, etc. instead of Node.js specific code
For TypeScript, we usually use types over interfaces
Avoid enums
No default exports, use function declarations
Files:
apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx
{packages/core,apps/webapp}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
We use zod a lot in packages/core and in the webapp
Files:
apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx
apps/webapp/**/*.{ts,tsx}
📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)
When importing from @trigger.dev/core in the webapp, never import the root package path; always use one of the documented subpath exports from @trigger.dev/core’s package.json
Files:
apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (23)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
- GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
- GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
- GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
- GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
- GitHub Check: e2e / 🧪 CLI v3 tests (ubuntu-latest - npm)
- GitHub Check: typecheck / typecheck
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
apps/webapp/app/routes/resources.orgs.$organizationSlug.select-plan.tsx (1)
413-420
: LGTM: new cancelation reason added and wired correctly.The new label is consistent with the other options and will be submitted via the existing form plumbing.
Adds a new cancelation reason: "The Free plan is all I need"