project_panel: Avoid recording record excluded files changes (#61106)

# Objective

Fix error shown when attempting to undo/redo operations on excluded
files, for example, undoing a creation of a file in an excluded path.

## Solution

Since `worktree::Snapshot::entry_for_path` always returns `None` for
excluded files, these changes will simply avoid calling
`UndoManager::record` in `ProjectPanel::confirm_edit` if the created
entry is excluded. This can be confusing if the user is renaming a file
to another path that is excluded, as that will not be recorded and can't
be undone but we accept it as a limitation for now and will document
that.

In the future we can potentially support undoing of operations for
excluded file paths but that would mean not only introducing new methods
that operate directly on the absolute path instead of the entry id, as
well as changes to the proto messages, in order to ensure it's also
fixed in remote and collab.

## Testing

Tested manually, as shown in the "Showcase" section below and also
introduced a test for this –
`project_panel::tests::undo::excluded_create_is_not_recorded` .

## Self-Review Checklist:

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

## Showcase

<details>
  <summary>Before</summary>


https://github.com/user-attachments/assets/7f8fca3e-2716-40bb-95db-c7119bb39b83

</details>

<details>
  <summary>After</summary>
  

https://github.com/user-attachments/assets/47b0322e-a323-4648-8a56-6e96266888d3

</details>

---

Release Notes:

- N/A
819fe33799Dino committed on 7/16/2026, 12:07:35 PM· committed by GitHubparent68b165e
3 files changedLine totals unavailable