project_panel: Fix dragged folders remaining highlighted even after the drag has ended (#64038)
# Objective
When dragging a folder outside of Zed, it is considered a platform drag,
instead of a GPUI native drag event. Currently when this platform drag
finishes, the selected folder remains highlighted, until unhighlighted
by initiating a GPUI native drag event.
Found this while testing #64033, I did not find an issue related to this
bug.
## Solution
- Clear the drag state when no gpui **or** platform drag event is
active.
## Testing
- Added asserts to relevant parts of previous tests
- Tested this locally
I can record a showcase if requested, skipping it for now since its
quite time consuming
## 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 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
- [x] Performance impact has been considered and is acceptable
Release Notes:
- Fixed folders remaining highlighted even after dragging the folder has
stopped
---------
Co-authored-by: Kirill Bulatov <kirill@zed.dev>
1a84d5d92btidely committed on 9/10/2026, 9:42:22 PM· committed by GitHubparenta57ba9b