fix: project-count-grammar - #2313
Conversation
ConsoleProject ID: Sites (2)
Note Appwrite has a Discord community with over 16 000 members. |
WalkthroughUpdates the alert title text generation in src/routes/(console)/organization-[organization]/+page.svelte for archived projects. Replaces a two-part plural/verb handling with a single dynamic prefix: difference !== 1 ? Possibly related PRs
Suggested reviewers
✨ 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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/routes/(console)/organization-[organization]/+page.svelte (2)
135-139: Verify banner copy when over limit but none archived (difference === 0).The banner shows for
(projectsToArchive.length > 0 || data.projects.total > $currentPlan.projects). If it triggers only due to over-limit whileprojectsToArchive.length === 0, the title becomes “0 projects are archived,” which reads misleading next to “Upgrade your plan to restore archived projects.” Consider gating the “archived” copy ondifference > 0, or using alternate copy for the over-limit-only case.Example minimal adjustment:
- <Alert.Inline title={`${messagePrefix} archived`}> + <Alert.Inline + title={ + difference > 0 + ? `${messagePrefix} archived` + : `You’ve reached your project limit` + }>
137-139: Small cleanup (optional): inline the title and drop the temporary variable.Keeps the logic in one place and avoids the extra
messagePrefixidentifier.- {@const messagePrefix = - difference !== 1 ? `${difference} projects are` : `${difference} project is`} - <Alert.Inline title={`${messagePrefix} archived`}> + <Alert.Inline + title={`${difference} ${difference === 1 ? 'project is' : 'projects are'} archived`}>
📜 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)
src/routes/(console)/organization-[organization]/+page.svelte(1 hunks)
⏰ 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/routes/(console)/organization-[organization]/+page.svelte (1)
137-139: Grammar fix LGTM for 0/1/n counts."0 projects are archived" and "1 project is archived" now render correctly. Nice, simple ternary.

What does this PR do?
(Provide a description of what this PR does.)
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