Skip to content

project panel: Collapse All improvements#47328

Merged
smitbarmase merged 12 commits intozed-industries:mainfrom
austincummings:collapse-selected-entry-and-children
Feb 5, 2026
Merged

project panel: Collapse All improvements#47328
smitbarmase merged 12 commits intozed-industries:mainfrom
austincummings:collapse-selected-entry-and-children

Conversation

@austincummings
Copy link
Contributor

@austincummings austincummings commented Jan 21, 2026

Thanks to @jackTabsCode for the original commit that I based my work off of.

See: #27703

Release Notes:

  • Fixed clicking "Collapse All" from context menu on a project root collapsing all project roots instead of that one.
  • Added new project panel: collapse selected entry and children action that collapses the selected directory and all its subdirectories.
  • Added "Collapse All" option to the context menu for all directories, not just project roots.

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 21, 2026
@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jan 21, 2026
Copy link
Member

@smitbarmase smitbarmase left a comment

Choose a reason for hiding this comment

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

Thanks, I have added few comments:

@austincummings austincummings force-pushed the collapse-selected-entry-and-children branch 2 times, most recently from d0aa57d to 70b992c Compare February 4, 2026 17:38
smitbarmase added a commit that referenced this pull request Feb 5, 2026
…ot completely (#48443)

For: #47328

Release Notes:

- Fixed an issue where selecting "Collapse All" on the root directory or
triggering the collapse all action would sometimes collapse the entire
root instead of keeping it expanded when there's a single worktree.
jackTabsCode and others added 11 commits February 5, 2026 11:46
Added a test to cover collapsing the project panel selected entry and
its children.

Added `project` and `recent_projects` to dev-dependencies to fix a
non-exhaustive pattern match error when running `cargo test -p project_panel`.
Addresses PR feedback: When collapsing a root entry in a multi-worktree
project, only the selected worktree should be collapsed, not all worktrees.

- Single-worktree projects: Keep root expanded, collapse all children (unchanged)
- Multi-worktree projects: Only collapse the selected worktree and its children
@smitbarmase smitbarmase force-pushed the collapse-selected-entry-and-children branch from 70b992c to 30eab4e Compare February 5, 2026 07:27
Copy link
Member

@smitbarmase smitbarmase left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @austincummings!

I made a few changes on top of your work. All actions are sound. I realized we definitely need different "Collapse All" behavior from the context menu for root entries. So I changed that to handle the special case of single vs multi-project workspaces. We don't need this for actions, but it felt really important for the context menu.

@smitbarmase smitbarmase merged commit 86f307e into zed-industries:main Feb 5, 2026
29 checks passed
@smitbarmase smitbarmase changed the title Add "Collapse All" context menu item for every directory in the project panel project panel: Collapse All improvements Feb 5, 2026
rtfeldman pushed a commit that referenced this pull request Feb 5, 2026
…ot completely (#48443)

For: #47328

Release Notes:

- Fixed an issue where selecting "Collapse All" on the root directory or
triggering the collapse all action would sometimes collapse the entire
root instead of keeping it expanded when there's a single worktree.
rtfeldman pushed a commit that referenced this pull request Feb 5, 2026
Thanks to @jackTabsCode for the original commit that I based my work off
of.

See: #27703

Release Notes:

- Fixed clicking "Collapse All" from context menu on a project root
collapsing all project roots instead of that one.
- Added new `project panel: collapse selected entry and children` action
that collapses the selected directory and all its subdirectories.
- Added "Collapse All" option to the context menu for all directories,
not just project roots.

---------

Co-authored-by: Jack T <jack@jackt.space>
Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
@austincummings austincummings deleted the collapse-selected-entry-and-children branch February 11, 2026 14:17
naaiyy added a commit to Glass-HQ/Glass that referenced this pull request Feb 16, 2026
Key changes:
- Thermal state detection (zed-industries#45638) - GPUI detects system thermal state, throttles to ~60fps when overheating
- Checkerboard shader for side-by-side diff (zed-industries#48417) - visual pattern for diff backgrounds
- cosmic-text v0.17 (zed-industries#48504) - fixes font ligatures on Linux
- Middle click tab close (zed-industries#44916) - on_aux_click/is_middle_click API additions
- Soft wrap modes for wrap width (zed-industries#46422)
- Tab switcher mode similar to vim/helix buffer picker (zed-industries#47079)
- Multi_buffer optimization batch (zed-industries#48519)
- TreeMap for diagnostics (zed-industries#48482) - performance improvement
- Semantic token follow-up fixes (zed-industries#48485)
- Claude Opus 4.6 and 1M context window model variants (zed-industries#48508)
- Anthropic adaptive thinking types (zed-industries#48517)
- Side-by-side diff: hunk gutter highlights restored, toolbar buttons for SplittableEditor
- Shell quote bypass fix in terminal permission system (zed-industries#48436)
- Project panel: Collapse All improvements (zed-industries#47328, zed-industries#48443)
- Edit prediction: trailing newlines fix, cursor position in global coords
- Properly discard tokens on language server stop (zed-industries#48490)
- AgentTool::NAME const instead of hardcoded strings (zed-industries#48506)

Conflict resolution:
- collab/editor_tests.rs: deleted (collab removed)
- vim (helix, motion, increment): deleted (vim removed)
- GPUI (17 files): deleted from Glass (handled in Obsydian-HQ/gpui)
- editor/items.rs: merged imports (added BufferId, kept Theme)
- project_diff.rs: removed old native_button toggle (upstream uses toolbar buttons now)
- lsp_store.rs: added SemanticTokenConfig, removed GlobalLogStore/LanguageServerKind
- project_panel.rs: merged UI imports (added ContextMenuEntry, ScrollAxes)
- Keymaps: took upstream JetBrains bindings

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants