Skip to content

Fix zed irresponsive on symlinked directory events outside the editor#50746

Merged
probably-neb merged 18 commits intozed-industries:mainfrom
prayanshchh:fix/symlink_dir
Apr 21, 2026
Merged

Fix zed irresponsive on symlinked directory events outside the editor#50746
probably-neb merged 18 commits intozed-industries:mainfrom
prayanshchh:fix/symlink_dir

Conversation

@prayanshchh
Copy link
Copy Markdown
Contributor

@prayanshchh prayanshchh commented Mar 4, 2026

Closes #48729, closes #27263, closes #45954

This PR aims to make zed responsive on symlinked directory events outside the editor.

Before you mark this PR as ready for review, make sure that you have:

  • Added a solid test coverage and/or screenshots from doing manual testing
  • Done a self-review taking into account security and performance aspects
  • Aligned any UI changes with the UI checklist

new-linked-folder is inside /zed-test/zed-project

output of ls -ld new-linked-folder
lrwxr-xr-x 1 prayanshchhablani staff 42 28 Mar 23:20 new-linked-folder -> /Users/prayanshchhablani/new-target-folder

this shows new-linked-folder is a symlink folder whose target is new-target-folder which is outside the root dir of the project opened in zed.

Screen.Recording.2026-04-02.at.3.54.02.PM.mov

Release Notes:

  • Fixed file watching of symlinks that point outside of the project/watched directory. Zed should now properly respond to changes in files in symlinked directories

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Mar 4, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1370f3ca27

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/fs/src/fs.rs Outdated
@maxdeviant maxdeviant changed the title Fix Zed config in a symlinked directory not applied when modified Fix settings in a symlinked directory not applied when modified Mar 5, 2026
@yeskunall
Copy link
Copy Markdown
Member

@prayanshchh I think the bigger issue is #45954, which would also handle #48729. Have you taken a look at #45954? Wdyt?

@prayanshchh
Copy link
Copy Markdown
Contributor Author

I agree, I didn't see this issue, will change this PR to resolve that one

@zelenenka zelenenka added the guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions label Mar 16, 2026
@probably-neb probably-neb marked this pull request as draft March 17, 2026 02:56
@probably-neb
Copy link
Copy Markdown
Collaborator

Let us know when this is ready @prayanshchh!

@probably-neb probably-neb self-assigned this Mar 17, 2026
@prayanshchh prayanshchh marked this pull request as ready for review April 1, 2026 14:19
@zed-codeowner-coordinator zed-codeowner-coordinator Bot requested review from a team, cameron1024 and smitbarmase and removed request for a team April 1, 2026 14:19
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 790324d847

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/worktree/src/worktree.rs Outdated
Comment thread crates/worktree/src/worktree.rs
@prayanshchh
Copy link
Copy Markdown
Contributor Author

this is ready @probably-neb

@prayanshchh prayanshchh changed the title Fix settings in a symlinked directory not applied when modified Fix zed irresponsive on symlinked directory events outside the editor Apr 2, 2026
@prayanshchh
Copy link
Copy Markdown
Contributor Author

just checking, I am seeing more users facing the symlink issue can we get this reviewed?

@auwi-nordic
Copy link
Copy Markdown

This PR may address the same issue as my PR here?
#46338

No opinion about which one is better, just thought I'd mention it

@auwi-nordic
Copy link
Copy Markdown

This PR may also relate to issue #27263 ?

@prayanshchh
Copy link
Copy Markdown
Contributor Author

This PR may address the same issue as my PR here? #46338

No opinion about which one is better, just thought I'd mention it

no worries lemme just push tests for this and lets review each other's PR just for fun..if u are down

@prayanshchh
Copy link
Copy Markdown
Contributor Author

This PR may also relate to issue #27263 ?

yes

Comment thread crates/settings/src/settings_file.rs
Comment thread crates/worktree/src/worktree.rs Outdated
@probably-neb
Copy link
Copy Markdown
Collaborator

sorry for the delay on the follow up review! I got this one and #46338 mixed up

@auwi-nordic
Copy link
Copy Markdown

@prayanshchh FYI, probably-ned mentioned he'll be merging this PR rather than mine, as the solution here is better, which I agree with. You don't have to review the implementation in my PR, but you can check if there are tests you want to bring over.

@prayanshchh
Copy link
Copy Markdown
Contributor Author

will do!

@prayanshchh
Copy link
Copy Markdown
Contributor Author

prayanshchh commented Apr 15, 2026

sorry for the delay on the follow up review! I got this one and #46338 mixed up

np!

@prayanshchh
Copy link
Copy Markdown
Contributor Author

lmk if something more is needed from this.

@Malix-Labs
Copy link
Copy Markdown

Malix-Labs commented Apr 20, 2026

Could "Closes #48729 #27263 #45954" be written in the description instead?

Edit

Sorry, it needs to be :

Closes #48729, closes #27263, closes #45954

@probably-neb
Copy link
Copy Markdown
Collaborator

Great work. Thanks!

@probably-neb probably-neb merged commit 7620b78 into zed-industries:main Apr 21, 2026
33 checks passed
xab3r pushed a commit to xab3r/zed that referenced this pull request Apr 21, 2026
…zed-industries#50746)

Closes zed-industries#48729, closes zed-industries#27263, closes zed-industries#45954

This PR aims to make zed responsive on symlinked directory events
outside the editor.

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [ ] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

new-linked-folder is inside /zed-test/zed-project

output of ls -ld new-linked-folder 
`lrwxr-xr-x 1 prayanshchhablani staff 42 28 Mar 23:20 new-linked-folder
-> /Users/prayanshchhablani/new-target-folder`

this shows new-linked-folder is a symlink folder whose target is
new-target-folder which is outside the root dir of the project opened in
zed.



https://github.com/user-attachments/assets/ffebafc3-2fc4-4293-bdbf-3a894a45e276

Release Notes:

- Fixed file watching of symlinks that point outside of the
project/watched directory. Zed should now properly respond to changes in
files in symlinked directories
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 guild Pull requests by someone in Zed Guild. NOTE: the label application is automated via github actions

Projects

None yet

8 participants