Skip to content

project_panel: Fix selection not updating for already-visible gitignored files#49521

Merged
smitbarmase merged 3 commits intozed-industries:mainfrom
skyline69:fix/project-panel-gitignored-selection
Feb 25, 2026
Merged

project_panel: Fix selection not updating for already-visible gitignored files#49521
smitbarmase merged 3 commits intozed-industries:mainfrom
skyline69:fix/project-panel-gitignored-selection

Conversation

@skyline69
Copy link
Contributor

@skyline69 skyline69 commented Feb 18, 2026

Summary

  • Keep auto-reveal behavior for ignored files unchanged (no implicit reveal).
  • When an ignored file is already visible in the project panel, mark it as selected on ActiveEntryChanged.
  • Add regression coverage for switching back to a visible gitignored file.

Testing

  • project_panel_tests::test_autoreveal_and_gitignored_files
  • project_panel_tests::test_gitignored_and_always_included
  • project_panel_tests::test_explicit_reveal

Closes #49515

Release Notes:

  • Fixed project panel not updating selection when switching to a gitignored file that was already visible.

@skyline69 skyline69 requested a review from a team as a code owner February 18, 2026 20:06
@cla-bot
Copy link

cla-bot bot commented Feb 18, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Ö. Efe D..
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@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 Feb 18, 2026
@skyline69 skyline69 force-pushed the fix/project-panel-gitignored-selection branch from 003df04 to b7f975b Compare February 18, 2026 20:08
@cla-bot
Copy link

cla-bot bot commented Feb 18, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @skyline69 on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@skyline69
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 18, 2026
@cla-bot
Copy link

cla-bot bot commented Feb 18, 2026

The cla-bot has been summoned, and re-checked this pull request!

@maxdeviant maxdeviant changed the title Project panel: Mark visible gitignored entry as selected project_panel: Mark visible gitignored entry as selected Feb 18, 2026
@smitbarmase smitbarmase self-assigned this Feb 24, 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.

Rest looks good to me, just a minor nit.

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!

@smitbarmase smitbarmase changed the title project_panel: Mark visible gitignored entry as selected project_panel: Fix selection not updating for already-visible gitignored files Feb 25, 2026
@smitbarmase smitbarmase merged commit 706faa9 into zed-industries:main Feb 25, 2026
28 checks passed
@skyline69
Copy link
Contributor Author

skyline69 commented Feb 26, 2026

Thanks!

You're welcome!

@skyline69 skyline69 deleted the fix/project-panel-gitignored-selection branch February 26, 2026 08:21
tahayvr pushed a commit to tahayvr/zed that referenced this pull request Mar 4, 2026
…red files (zed-industries#49521)

## Summary
- Keep auto-reveal behavior for ignored files unchanged (no implicit
reveal).
- When an ignored file is already visible in the project panel, mark it
as selected on `ActiveEntryChanged`.
- Add regression coverage for switching back to a visible gitignored
file.

## Testing
- `project_panel_tests::test_autoreveal_and_gitignored_files`
- `project_panel_tests::test_gitignored_and_always_included`
- `project_panel_tests::test_explicit_reveal`

Closes zed-industries#49515

Release Notes:

- Fixed project panel not updating selection when switching to a
gitignored file that was already visible.
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.

Relocating to a git ignored file doesn't mark the file as selected in the project panel

2 participants