Skip to content

Fix project grouping for Git repo subdirectories - #57998

Merged
Anthony-Eid merged 4 commits into
zed-industries:mainfrom
alisinabh:main
Jun 17, 2026
Merged

Fix project grouping for Git repo subdirectories#57998
Anthony-Eid merged 4 commits into
zed-industries:mainfrom
alisinabh:main

Conversation

@alisinabh

@alisinabh alisinabh commented May 28, 2026

Copy link
Copy Markdown
Contributor

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
    • No unsafe blocks added.
  • The content is consistent with the UI/UX checklist
    • No new UI components; behavior better matches user intent for opened folders.
  • Tests cover the new/changed behavior
    • Added sibling-subdirectory project group regression coverage.
    • Extended subfolder Git-status test to ensure Git still uses the parent repo while project identity stays at the opened folder.
  • Performance impact has been considered and is acceptable
    • Change adds one small enum/optional field check when computing worktree paths; no meaningful performance impact expected.

Closes #57997

Release Notes:

  • Fixed project grouping for opened subdirectories that share the same parent Git repository.

Screenshots

Before

Screenshot 2026-05-28 at 5 29 55 PM Screenshot 2026-05-28 at 5 28 36 PM

After

Screenshot 2026-05-28 at 5 29 40 PM Screenshot 2026-05-28 at 5 29 22 PM

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label May 28, 2026
@alisinabh alisinabh changed the title Fix project separation in shared git repos Fix project grouping for Git repo subdirectories May 28, 2026
@smitbarmase smitbarmase added the area:workspace Feedback for workspace management, layout, interactions, etc label May 29, 2026
@Anthony-Eid
Anthony-Eid added this pull request to the merge queue Jun 17, 2026
Merged via the queue into zed-industries:main with commit 45afbac Jun 17, 2026
32 checks passed
This was referenced Jun 18, 2026
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
  - No unsafe blocks added.
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- No new UI components; behavior better matches user intent for opened
folders.
- [x] Tests cover the new/changed behavior
  - Added sibling-subdirectory project group regression coverage.
- Extended subfolder Git-status test to ensure Git still uses the parent
repo while project identity stays at the opened folder.
- [x] Performance impact has been considered and is acceptable
- Change adds one small enum/optional field check when computing
worktree paths; no meaningful performance impact expected.

Closes zed-industries#57997

Release Notes:

- Fixed project grouping for opened subdirectories that share the same
parent Git repository.

## Screenshots

### Before
<img width="334" height="224" alt="Screenshot 2026-05-28 at 5 29 55 PM"
src="https://github.com/user-attachments/assets/ad5b13c5-11a7-4fa4-a074-a519521641da"
/>
<img width="485" height="201" alt="Screenshot 2026-05-28 at 5 28 36 PM"
src="https://github.com/user-attachments/assets/9cd2c138-92f5-4ff2-bf8f-21cdbeff0b79"
/>

### After

<img width="343" height="253" alt="Screenshot 2026-05-28 at 5 29 40 PM"
src="https://github.com/user-attachments/assets/56a4dca7-f0a1-4530-8c89-3c4773b90486"
/>
<img width="420" height="206" alt="Screenshot 2026-05-28 at 5 29 22 PM"
src="https://github.com/user-attachments/assets/d118340a-955e-4483-9888-4b566f59b931"
/>

---------

Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:workspace Feedback for workspace management, layout, interactions, etc cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening multiple directories in the same git repo confuses Zed and the Agent Threads panel

3 participants