Repository navigation
fix(desktop): keep sidebar Projects chevron visible while the section is collapsed - #6150
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workspace header chevron now stays visible when the workspace list is collapsed. When expanded, it appears on hover or keyboard focus and remains rotated to show the expanded state. ChangesWorkspace header interaction
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Greptile SummaryThe PR keeps the Projects chevron visible while the desktop sidebar section is collapsed, making the persisted collapsed state visually apparent.
Confidence Score: 5/5The PR appears safe to merge, with the narrowly scoped visual-state change matching the intended collapsed and expanded behavior. The conditional classes preserve the existing chevron rotation and hover/focus visibility when expanded while explicitly showing the right-pointing chevron when collapsed; no blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspacesHeader/DashboardSidebarWorkspacesHeader.tsx | Updates mutually exclusive Tailwind classes so the collapsed chevron remains visible without changing expanded-state behavior. |
Reviews (1): Last reviewed commit: "fix(desktop): keep sidebar Projects chev..." | Re-trigger Greptile
🧹 Preview Cleanup CompleteThe following preview resources have been cleaned up:
Thank you for your contribution! 🎉 |
Fixes #6009.
What happened
The entire "PROJECTS" header strip is a collapse toggle (
role="button"withonClick={toggleCollapsed}), and the state persists to localStorage (sidebar-workspaces-collapse). One stray click on the strip collapses the section — but the chevron that indicates the collapsed state wasopacity-0unless hovered, so the section just looked empty: header and + button render, zero project rows, survives Cmd+R and restarts. The collapsed icon rail bypasses the gate (isCollapsed || !workspacesListCollapsedinDashboardSidebar.tsx), which is why icons still showed there — exactly the confusing split the reporter described.The macOS App Management prompt in the report is coincidental; nothing ties this store to permissions. The likely sequence is a click into the sidebar afterwards landing on the header strip (same accidental-toggle class as #6000).
The fix
Keep the chevron visible (right-pointing) whenever the section is collapsed, so the state reads as "collapsed, click to expand" instead of "my projects are gone". Expanded behavior is unchanged: chevron stays hover/focus-only.
Evidence (CDP-driven dev app, real header clicks)
Reproduced end-to-end before the fix: one synthetic click on the header persisted
{"isCollapsed":true}and emptied the section; rail icons unaffected; state survivedlocation.reload(); clicking the header again restored all rows.Screenshots captured via
Page.captureScreenshoton this branch's dev app (unhovered — the after-collapsed chevron is visible with no mouse over it).bun run lintandapps/desktoptypecheck pass.Note: #6010 attempted the same idea but was closed unmerged; the reporter never got a build with it.
Summary by cubic
Keep the Projects chevron visible when the section is collapsed in the desktop sidebar, so it’s clear the list is hidden and can be expanded. Fixes #6009 where an accidental header click collapsed Projects and it looked empty across reloads; expanded behavior is unchanged.
Written for commit 03e655c. Summary will update on new commits.