git_ui: Prevent crash when selecting collapsed sections (#63164)
## Summary
- Select the first Git panel entry from the visible row indices instead
of treating an entry index as a visible-row position
- Avoid selecting files hidden by collapsed sections in both tree and
flat views
- Add a regression test for collapsing the only populated section in
tree view with no active selection
Fixes ZED-AZ3
Fixes ZED-B0Z
Release Notes:
- Fixed a crash in the Git panel when collapsed sections were used in
tree view.
507a1b994cCole Miller committed on 8/24/2026, 8:30:19 PM· committed by GitHubparent1747596