Skip to content

fix(desktop): keep sidebar Projects chevron visible while the section is collapsed - #6150

Merged
Kitenite merged 1 commit into
mainfrom
fix-6009-projects-collapsed-chevron
Aug 4, 2026
Merged

Kitenite merged 1 commit into
mainfrom
fix-6009-projects-collapsed-chevron

Conversation

@Kitenite

@Kitenite Kitenite commented Aug 4, 2026 •

Copy link
Copy Markdown
Member

Fixes #6009.

What happened

The entire "PROJECTS" header strip is a collapse toggle (role="button" with onClick={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 was opacity-0 unless 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 || !workspacesListCollapsed in DashboardSidebar.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 survived location.reload(); clicking the header again restored all rows.

Before (collapsed = looks broken) After (collapsed) After (expanded, unchanged)
before after collapsed after expanded

Screenshots captured via Page.captureScreenshot on this branch's dev app (unhovered — the after-collapsed chevron is visible with no mouse over it). bun run lint and apps/desktop typecheck 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.

Review in cubic

@coderabbitai

coderabbitai Bot commented Aug 4, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 073a0222-a8f5-4659-bb49-11f0ba9c446d

📥 Commits

Reviewing files that changed from the base of the PR and between 8538ba8 and 03e655c.

📒 Files selected for processing (1)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspacesHeader/DashboardSidebarWorkspacesHeader.tsx

📝 Walkthrough

Walkthrough

The 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.

Changes

Workspace header interaction

Layer / File(s) Summary
Chevron state styling
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspacesHeader/DashboardSidebarWorkspacesHeader.tsx
The chevron is opaque when collapsed. In the expanded state, it is rotated and hidden until hover or keyboard focus.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: avipeltz

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The change clarifies the collapsed state but does not restore Projects rows in the expanded sidebar as required by issue #6009. Update the expanded-sidebar rendering path so project rows match the collapsed rail, then verify the list after reload and permission changes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the chevron visibility fix and follows the repository's conventional commit format.
Description check ✅ Passed The description explains the cause, fix, testing, screenshots, and validation results, but it omits the repository checklist.
Out of Scope Changes check ✅ Passed The chevron visibility change is directly related to the Projects sidebar behavior described in issue #6009.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-6009-projects-collapsed-chevron

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR keeps the Projects chevron visible while the desktop sidebar section is collapsed, making the persisted collapsed state visually apparent.

  • Applies full opacity to the right-pointing chevron in the collapsed state.
  • Preserves the existing rotated, hover/focus-only presentation while expanded.

Confidence Score: 5/5

The 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.

Important Files Changed

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

@Kitenite
Kitenite merged commit d530b98 into main Aug 4, 2026
12 checks passed

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[bug] Expanded sidebar shows empty Projects section

1 participant