Skip to content

Handle changing root paths without splitting in the sidebar#53566

Merged
mikayla-maki merged 5 commits intomainfrom
make-adding-folder-paths-mutating
Apr 10, 2026
Merged

Handle changing root paths without splitting in the sidebar#53566
mikayla-maki merged 5 commits intomainfrom
make-adding-folder-paths-mutating

Conversation

@mikayla-maki
Copy link
Copy Markdown
Member

@mikayla-maki mikayla-maki commented Apr 9, 2026

Self-Review Checklist:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content is consistent with the UI/UX checklist
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

  • N/A

Make test helpers render nicely
Improve property test to capture this case
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Apr 9, 2026
@mikayla-maki mikayla-maki requested a review from eholk April 9, 2026 21:36
@mikayla-maki mikayla-maki marked this pull request as ready for review April 9, 2026 21:36
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Apr 9, 2026
Copy link
Copy Markdown
Contributor

@eholk eholk left a comment

Choose a reason for hiding this comment

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

Just some in-progress comments. Nothing blocking so far!

/// the worktree is the main checkout or a linked git worktree. When
/// multiple main paths exist and a linked worktree's short name alone
/// wouldn't identify which main project it belongs to, the main project
/// name is prefixed for disambiguation (e.g. `project:feature`).
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.

I like this!

///
/// `linked_to_main` maps linked worktree abs paths to their main repo
/// abs path, used to pick the correct prefix. Falls back to a heuristic
/// when no mapping is available.
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.

The ProjectGroupBuilder rises again!

mikayla-maki and others added 3 commits April 9, 2026 16:06
Remove the has_unbacked_linked_worktree filter that was too aggressively
hiding threads whose folder_paths included linked worktree paths not yet
discovered by git state. Since threads are already correctly grouped via
their main_worktree_paths column, this filter was unnecessary and caused
threads belonging to open workspace roots and closed worktree workspaces
to be hidden.

Update test_git_worktree_added_live_updates_sidebar to expect the thread
visible from the start (the chip name is derived from the path heuristic
even before git discovery).

Fix test_worktree_add_key_collision_removes_duplicate_workspace to switch
back to workspace A before the collision, since the collision code keeps
the active workspace and drops the incoming duplicate.
@mikayla-maki mikayla-maki merged commit 4a1fb25 into main Apr 10, 2026
31 checks passed
@mikayla-maki mikayla-maki deleted the make-adding-folder-paths-mutating branch April 10, 2026 01:21
@mikayla-maki mikayla-maki restored the make-adding-folder-paths-mutating branch April 10, 2026 01:58
mikayla-maki added a commit that referenced this pull request Apr 10, 2026
Continuation of #53566, now
with proper thread root mutation.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
rtfeldman pushed a commit that referenced this pull request Apr 10, 2026
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
rtfeldman pushed a commit that referenced this pull request Apr 10, 2026
Continuation of #53566, now
with proper thread root mutation.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
rtfeldman pushed a commit that referenced this pull request Apr 10, 2026
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
rtfeldman pushed a commit that referenced this pull request Apr 10, 2026
Continuation of #53566, now
with proper thread root mutation.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
maxbrunsfeld pushed a commit that referenced this pull request Apr 10, 2026
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Closes #ISSUE

Release Notes:

- N/A

---------

Co-authored-by: Eric Holk <eric@zed.dev>
maxbrunsfeld pushed a commit that referenced this pull request Apr 10, 2026
Continuation of #53566, now
with proper thread root mutation.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A
maxbrunsfeld added a commit that referenced this pull request Apr 10, 2026
Cherry-picked PRs (in order applied):

1. #53386
2. #53400
3. #53396
4. #53428
5. #53356
6. #53215
7. #53429
8. #53458
9. #53436
10. #53451
11. #53454
12. #53419
13. #53287
14. #53521
15. #53463
16. #52848
17. #53544
18. #53556
19. #53566
20. #53579
21. #53575
22. #53550
23. #53585
24. #53510
25. #53599
26. #53099
27. #53662
28. #53660
29. #53657
30. #53654


Release Notes:

- N/A

---------

Co-authored-by: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Co-authored-by: Ben Brandt <benjamin.j.brandt@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
Co-authored-by: Nathan Sobo <nathan@zed.dev>
Co-authored-by: Anthony Eid <anthony@zed.dev>
Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
Co-authored-by: Eric Holk <eric@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Cameron Mcloughlin <cameron.studdstreet@gmail.com>
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla Maki <mikayla@zed.dev>
Co-authored-by: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com>
Co-authored-by: Katie Geer <katie@zed.dev>
Co-authored-by: ojpro <contact@ojpro.me>
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 staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants