Allow downloading projects that match fwdata project#1934
Conversation
📝 WalkthroughWalkthroughIntroduces explanatory comments in CombinedProjectsService and updates Server.svelte’s validateCodeForDownload to require both matching project code and server ID when checking for already-downloaded projects. No public API changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ 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 (
|
UI unit Tests 1 files 40 suites 22s ⏱️ Results for commit a75dfe4. ♻️ This comment has been updated with latest results. |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
backend/FwLite/FwLiteShared/Projects/CombinedProjectsService.cs (1)
167-169: Minor grammar fix in commentNit: “current only relevant” → “currently only relevant”.
- // Note: the project might be from a different server, but that's current only relevant for devs + // Note: the project might be from a different server, but that's currently only relevant for devs // and we still can't download two projects with the same codefrontend/viewer/src/home/Server.svelte (1)
84-86: Block duplicate CRDT downloads by code invalidateCodeForDownloadThe backend rejects any CRDT project with the same code across servers, but the current client check only blocks when the server IDs match. To keep the UI in sync and avoid a backend‐side
ProjectAlreadyDownloadederror, narrow the check to CRDT projects by code:- if (localProjects.some(p => p.code === projectCode && p.server?.id === server?.id)) { + if (localProjects.some(p => p.code === projectCode && p.crdt)) { return $t`You have already downloaded the ${projectCode} project`; }• Ensure your
Projectinterface includes acrdt: booleanflag.
• This also removes reliance onserver?.id, handling cases whenserveris undefined.
📜 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 (2)
backend/FwLite/FwLiteShared/Projects/CombinedProjectsService.cs(1 hunks)frontend/viewer/src/home/Server.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). (7)
- GitHub Check: Build API / publish-api
- GitHub Check: Build UI / publish-ui
- GitHub Check: check-and-lint
- GitHub Check: Analyze (csharp)
- GitHub Check: frontend
- GitHub Check: Build FW Lite and run tests
- GitHub Check: frontend-component-unit-tests
I coudn't download a project using the fancy admin download-by-code feature, because I had a fwdata project with that name (because fwdata projects are in
localProjects).