Conversation
update: redirect to org page when the project is not active.
Console (appwrite/console)Project ID: Tip Trigger functions via HTTP, SDKs, events, webhooks, or scheduled cron jobs |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThis PR removes the project archival feature and related alerts: deletes components src/lib/components/archiveProject.svelte, src/lib/components/billing/alerts/projectsLimit.svelte, and src/lib/components/billing/alerts/selectProjectCloud.svelte; removes checkForProjectsLimit from src/lib/stores/billing.ts and its invocation from layout; renames archive-related variables/messages to "delete" in organizationUsageLimits; simplifies organization page loader and UI to fetch/display only active projects and removes archived-project UI and selection flows; updates routing/imports (resolve usage) and adds an early redirect for non-active projects to their organization page. Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
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)
src/lib/components/organizationUsageLimits.svelte (1)
17-24:⚠️ Potential issue | 🟡 MinorUnused
organizationprop in Props type.The
organizationproperty is declared in thePropstype (line 21) but not destructured from$props()on line 24. The component uses$organizationfrom the store (line 268) instead of the prop.Either remove the unused prop from the type definition, or destructure and use it if it was intended to override the store value.
🧹 Option 1: Remove unused prop from type
type Props = { storageUsage?: number; projects?: Models.Project[]; members?: Models.Membership[]; - organization: Models.Organization; }; - const { projects = [], members = [], storageUsage = 0 }: Props = $props(); + const { projects = [], members = [], storageUsage = 0 } = $props<Props>();
🧹 Nitpick comments (2)
src/routes/(console)/organization-[organization]/+page.svelte (1)
121-121: Consider consistency in optional chaining usage.This line uses
data?.projects.totalwith optional chaining, while lines 52 and 60 accessdata.projects.totaldirectly. Sincedata.projectsis guaranteed from the page loader, the optional chaining here is defensive but inconsistent with nearby usage.♻️ Optional: Align optional chaining usage
- const activeProjectsTotal = $derived(data?.projects.total); + const activeProjectsTotal = $derived(data.projects.total);src/lib/components/organizationUsageLimits.svelte (1)
122-122: Minor grammar improvement."Projects selected for deleting" reads awkwardly. Consider using "deletion" for better grammar.
📝 Suggested fix
- addNotification({ type: 'success', message: `Projects selected for deleting` }); + addNotification({ type: 'success', message: `Projects selected for deletion` });
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@src/lib/components/organizationUsageLimits.svelte`:
- Around line 57-61: The excessUsage.projects calculation is missing subtraction
of the free plan limit; update the derived value for projects inside the
$derived block (excessUsage) to compute Math.max(0, currentUsage.projects -
freePlanLimits.projects) so it mirrors the logic used for members and storage
and only shows projects exceeding the limit.
- Around line 307-313: The Alert.Inline title currently contains raw HTML tags
which will render literally; update the Alert.Inline usage so the title prop
contains plain text only (e.g., remove the <b> tags and any HTML around
toLocaleDate($organization.billingNextInvoiceDate) and messagePrefix) and move
any bold/HTML formatting into the component body/default slot where you can use
Svelte markup to wrap formatProjectsToDelete() and the date in <b> or other
styling; specifically modify the Alert.Inline instance (title prop,
toLocaleDate, $organization.billingNextInvoiceDate, and
formatProjectsToDelete()) so the title is plain text and the formatted content
is rendered inside the Alert.Inline children.
🧹 Nitpick comments (1)
src/lib/components/organizationUsageLimits.svelte (1)
17-24: Unusedorganizationprop in type definition.The
organizationproperty is defined inPropsbut never destructured from$props(). The component uses the$organizationstore instead (lines 271, 309). Consider removing it from the Props type to avoid confusion for consumers of this component.♻️ Proposed fix
type Props = { storageUsage?: number; projects?: Models.Project[]; members?: Models.Membership[]; - organization: Models.Organization; };

What does this PR do?
Removes archiving based on latest cloud changes.
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)
Summary by CodeRabbit
Bug Fixes
Refactor