-
Notifications
You must be signed in to change notification settings - Fork 203
Add billingPlanDetails prelim support
#2732
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
Conversation
Console (appwrite/console)Project ID: Tip Storage files get ClamAV malware scanning and encryption by default |
WalkthroughThe pull request updates the Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ 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 |
|
This will have issues with Queries against |
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
🧹 Nitpick comments (1)
src/lib/stores/organization.ts (1)
19-19: MakebillingPlanDetailsoptional with a tracking reference.The
billingPlanDetailsfield is marked as "unused for now!" yet remains non-optional. Since no code currently references this field, making it optional eliminates unnecessary friction when constructingOrganizationobjects.Update to:
billingPlanDetails?: Plan; /* TODO: Cloud#3061 - use once backend support is available */This is a safe change as the field is not accessed anywhere in the codebase.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
package.jsonsrc/lib/stores/organization.ts
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx,svelte}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports
Files:
src/lib/stores/organization.ts
**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.ts: Define types inline or in .d.ts files, avoid creating separate .types.ts files
Use TypeScript in non-strict mode; any type is tolerated in this project
Files:
src/lib/stores/organization.ts
**/*.{ts,tsx,js,jsx,svelte,json}
📄 CodeRabbit inference engine (AGENTS.md)
Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration
Files:
src/lib/stores/organization.tspackage.json
🧠 Learnings (2)
📓 Common learnings
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2670
File: src/routes/(console)/organization-[organization]/+layout.ts:134-150
Timestamp: 2025-12-05T09:24:15.846Z
Learning: In the Appwrite console codebase, `prefs.organization` is maintained to always reference an organization with Platform.Appwrite, so when using preferences.organization as a fallback in redirect logic, no additional platform validation is required.
📚 Learning: 2025-09-26T06:48:57.938Z
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2373
File: src/routes/(console)/project-[region]-[project]/databases/database-[database]/(suggestions)/empty.svelte:629-631
Timestamp: 2025-09-26T06:48:57.938Z
Learning: In the Appwrite console codebase using appwrite.io/pink-svelte, the Icon component automatically handles CSS variable names passed to its color prop by internally wrapping them with var(). Therefore, passing '--some-css-variable' as a string to the Icon color prop works correctly without needing to manually wrap it with var().
Applied to files:
package.json
🧬 Code graph analysis (1)
src/lib/stores/organization.ts (1)
src/lib/sdk/billing.ts (1)
Plan(378-434)
🔇 Additional comments (2)
src/lib/stores/organization.ts (1)
3-3: LGTM!The import follows the project's
$libalias convention and correctly imports thePlantype needed for the newbillingPlanDetailsfield.package.json (1)
25-25: The dependency update is valid and secure. The URL is accessible and resolves correctly via the package registry. No known vulnerabilities are published for@appwrite.io/console. No action required.
|
|
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
🧹 Nitpick comments (1)
src/lib/stores/organization.ts (1)
19-20: Clarify the naming and purpose ofbillingPlanId.The field name
billingPlanIdsuggests a unique identifier (e.g.,"plan_abc123"), but it's typed asTier, which is a string literal union representing tier levels ('tier-0' | 'tier-1'etc.). This creates semantic confusion.Additionally, the existing
billingPlan: Tierfield (line 18) appears to serve a similar purpose. Consider:
- If
billingPlanIdis meant to store a tier level, rename it tobillingPlanTieror similar to avoid the "Id" suffix confusion- If it's meant to store an actual plan identifier, change the type to
string- Clarify whether
billingPlanandbillingPlanIdare meant to coexist or if one replaces the other in the refactor
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
package.jsonsrc/lib/stores/organization.ts
🚧 Files skipped from review as they are similar to previous changes (1)
- package.json
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx,svelte}
📄 CodeRabbit inference engine (AGENTS.md)
**/*.{ts,tsx,js,jsx,svelte}: Import reusable modules from the src/lib directory using the $lib alias
Use minimal comments in code; reserve comments for TODOs or complex logic explanations
Use $lib, $routes, and $themes aliases instead of relative paths for module imports
Files:
src/lib/stores/organization.ts
**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.ts: Define types inline or in .d.ts files, avoid creating separate .types.ts files
Use TypeScript in non-strict mode; any type is tolerated in this project
Files:
src/lib/stores/organization.ts
**/*.{ts,tsx,js,jsx,svelte,json}
📄 CodeRabbit inference engine (AGENTS.md)
Use 4 spaces for indentation, single quotes, 100 character line width, and no trailing commas per Prettier configuration
Files:
src/lib/stores/organization.ts
🧠 Learnings (1)
📓 Common learnings
Learnt from: ItzNotABug
Repo: appwrite/console PR: 2670
File: src/routes/(console)/organization-[organization]/+layout.ts:134-150
Timestamp: 2025-12-05T09:24:15.846Z
Learning: In the Appwrite console codebase, `prefs.organization` is maintained to always reference an organization with Platform.Appwrite, so when using preferences.organization as a fallback in redirect logic, no additional platform validation is required.
🧬 Code graph analysis (1)
src/lib/stores/organization.ts (2)
src/lib/stores/billing.ts (1)
Tier(45-45)src/lib/sdk/billing.ts (1)
Plan(378-434)
⏰ 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). (2)
- GitHub Check: e2e
- GitHub Check: build
🔇 Additional comments (1)
src/lib/stores/organization.ts (1)
2-3: Imports look good.The type imports for the new fields follow the coding guidelines correctly, using the
$libalias.

What does this PR do?
Use
organization.billingPlanIdas a part of internal and planned refactor.Test Plan
N/A.
Related PRs and Issues
Cloud#3061
Have you read the Contributing Guidelines on issues?
Yes.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.