-
Notifications
You must be signed in to change notification settings - Fork 646
[FixBug] The Desktop version's "New Project" button is always hidden #244
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
… conditional logic projects.length > 0, causing it to not display when there are no projects, preventing users from creating new projects.
WalkthroughThe Sidebar component is refactored to introduce a new desktop-only action bar containing New Project and Refresh buttons. These controls are moved out of the search area, and the Search Filter UI is now conditionally rendered only when projects exist. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. 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.
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/components/Sidebar.jsx (1)
584-617: Desktop action bar correctly fixes the hidden “New Project” bugThe new
!isLoading && !isMobiledesktop action bar cleanly decouples the New Project / Refresh buttons fromprojects.length > 0, so the New Project button is now available even when there are no projects, which aligns with the PR goal. The search filter remaining gated onprojects.length > 0 && !isLoadingalso makes sense now that it’s visually separated.One optional improvement to consider: on desktop you currently hide the New Project button while
isLoadingis true, whereas on mobile it stays available. If users are expected to be able to create a project immediately on first load, you might want to drop the!isLoadingguard for the desktop bar as well, or only disable Refresh during loading and keep New Project active.Also applies to: 619-621
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/Sidebar.jsx(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/components/Sidebar.jsx (9)
src/contexts/AuthContext.jsx (1)
isLoading(28-28)src/components/GitPanel.jsx (1)
isLoading(10-10)src/contexts/TaskMasterContext.jsx (2)
isLoading(57-57)projects(51-51)src/components/NextTaskBanner.jsx (2)
isLoading(17-17)isLoading(490-490)src/components/ChatInterface.jsx (1)
isLoading(1658-1658)src/components/LoginForm.jsx (1)
isLoading(8-8)src/components/SetupForm.jsx (1)
isLoading(9-9)src/App.jsx (2)
isMobile(53-53)projects(49-49)src/components/ui/button.jsx (1)
Button(35-43)
The Desktop version's "New Project" button is wrapped by the conditional logic projects.length > 0, causing it to not display when there are no projects, preventing users from creating new projects.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.