Skip to content

fix(desktop): keep projects list expanded when using the add-repo menu - #6000

Merged
AviPeltz merged 1 commit into
mainfrom
fix-add-repo-menu-collapse
Jul 27, 2026
Merged

AviPeltz merged 1 commit into
mainfrom
fix-add-repo-menu-collapse

Conversation

@AviPeltz

@AviPeltz AviPeltz commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Selecting any item in the PROJECTS header's add-repository dropdown ("Open from folder", "Clone from URL", …) collapsed the projects list. The dropdown content portals to document.body, but React synthetic events still bubble up the component tree to the header row's click-to-collapse handler.

Restores the stopPropagation guard on the dropdown content that #5956 introduced and its revert (#5996) removed — this piece was an independent fix that got swept out with the sort feature.

https://claude.ai/code/session_01SSUQYFamkYAjs5sDQC5RLS


Open in Stage

Summary by cubic

Keep the Projects list expanded when selecting items in the add-repository menu. Stops React event bubbling by calling stopPropagation on the dropdown content’s click and keydown so the header’s collapse toggle doesn’t trigger.

Written for commit 10edd86. Summary will update on new commits.

Review in cubic

The add-repository dropdown lives inside the PROJECTS header row, which
toggles the list's collapse on click. The dropdown content portals to
body, but React synthetic events still bubble up the component tree, so
selecting any menu item collapsed the projects list. Restores the
stopPropagation guard that #5956 introduced and its revert (#5996)
removed.

Claude-Session: https://claude.ai/code/session_01SSUQYFamkYAjs5sDQC5RLS
@ghost

ghost commented Jul 27, 2026

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 1 individual chapter for you:

Title
1 Prevent projects list collapse on dropdown interaction
Open in Stage

Chapters generated by Stage for commit 10edd86 on Jul 27, 2026 9:46pm UTC.

@coderabbitai

coderabbitai Bot commented Jul 27, 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: 013679a2-d82e-45b9-b049-24573fcab097

📥 Commits

Reviewing files that changed from the base of the PR and between 45c4376 and 10edd86.

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

📝 Walkthrough

Walkthrough

The add-repository dropdown now stops click and keydown events from propagating to the workspace header, preventing those interactions from toggling header collapse state.

Changes

Workspace dropdown interaction

Layer / File(s) Summary
Stop dropdown event propagation
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/components/DashboardSidebarWorkspacesHeader/DashboardSidebarWorkspacesHeader.tsx
DropdownMenuContent stops click and keydown events before they reach the header collapse toggle.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

Suggested reviewers: roshvan

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is a concise conventional commit and accurately summarizes the desktop sidebar behavior fix.
Description check ✅ Passed It explains the bug, root cause, and fix; the required testing and checklist sections are missing but the description is still mostly complete.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ 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-add-repo-menu-collapse

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.

@AviPeltz
AviPeltz merged commit f95badd into main Jul 27, 2026
11 checks passed
@github-actions

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.

1 participant