Skip to content

Conversation

@RemcoSmitsDev
Copy link
Contributor

Before this commit, we would select a non-visible entry when a directory is collapsed. Now we correctly select the visible entry that is visually the previous/next entry in the list.

Note: I removed the cx.notify() call as it's already part of the self.scroll_to_selected_entry(cx) call. So we don't notify twice :).

Follow-up: #45002

Before

Screen.Recording.2025-12-16.at.21.33.26.mov

After

Screen.Recording.2025-12-16.at.21.19.55.mov

Release Notes:

  • git_ui: Fix select next/previous entry selects non-visible entry when tree view is enabled
Before this commit we would select a non-visible entry when a directory
is collapsed. No we correctly select the visible entry that is visually
the previous/next entry.

Follow-up: zed-industries#45002
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 16, 2025
@github-actions github-actions bot added the community champion Issues filed by our amazing community champions! 🫶 label Dec 16, 2025
@github-project-automation github-project-automation bot moved this to Community Champion PRs in Quality Week – December 2025 Dec 16, 2025
@cole-miller
Copy link
Member

cole-miller commented Dec 16, 2025

Thanks Remco, this looks great! Happy to merge but I noticed while testing that we also have a bug with the selection disappearing when we go up past the first (visual) entry, in case you want to fix that as well :)

@RemcoSmitsDev
Copy link
Contributor Author

Hey Cole, thanks for your review. Nice catch, fixed it:

Screen.Recording.2025-12-16.at.22.41.35.mov
@cole-miller cole-miller enabled auto-merge (squash) December 16, 2025 21:46
@cole-miller
Copy link
Member

Thanks!

@cole-miller cole-miller merged commit ab4cd95 into zed-industries:main Dec 16, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from Community Champion PRs to Done in Quality Week – December 2025 Dec 16, 2025
@RemcoSmitsDev RemcoSmitsDev deleted the git-ui-keyboard-navigation-follow-up branch December 16, 2025 21:54
RemcoSmitsDev added a commit to RemcoSmitsDev/zed that referenced this pull request Dec 17, 2025
mode is enabled.

Before this commit we would select a entry that is visually not the
first, but logical wise it is. This happends if the first entry is a
directory with files that are collapsed. We would select entry n of
entries in the directory that is collapsed after it.

Follow-up: zed-industries#45030
cole-miller pushed a commit that referenced this pull request Dec 17, 2025
…hen tree view is enabled (#45108)

This PR fixes a bug where the select first didn't select the first
visual entry when the first entry is a collapsed directory.

Follow-up: #45030

**Before**:


https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41

**After**:


https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998

Release Notes:

- git_ui: Fix select first entry selects the wrong visual first entry
when tree view is enabled
HactarCE pushed a commit that referenced this pull request Dec 17, 2025
… tree view is enabled (#45030)

Before this commit, we would select a non-visible entry when a directory
is collapsed. Now we correctly select the visible entry that is visually
the previous/next entry in the list.

**Note**: I removed the `cx.notify()` call as it's already part of the
`self.scroll_to_selected_entry(cx)` call. So we don't notify twice :).

Follow-up: #45002

**Before**


https://github.com/user-attachments/assets/da0b8084-0081-4d98-ad8a-c11c3b95a1b7

**After**


https://github.com/user-attachments/assets/8a16afb0-fdde-4317-b419-13143d5d608e

Release Notes:

- git_ui: Fix select next/previous entry selects non-visible entry when
tree view is enabled
HactarCE pushed a commit that referenced this pull request Dec 17, 2025
…hen tree view is enabled (#45108)

This PR fixes a bug where the select first didn't select the first
visual entry when the first entry is a collapsed directory.

Follow-up: #45030

**Before**:


https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41

**After**:


https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998

Release Notes:

- git_ui: Fix select first entry selects the wrong visual first entry
when tree view is enabled
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
…hen tree view is enabled (#45108)

This PR fixes a bug where the select first didn't select the first
visual entry when the first entry is a collapsed directory.

Follow-up: #45030

**Before**:


https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41

**After**:


https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998

Release Notes:

- git_ui: Fix select first entry selects the wrong visual first entry
when tree view is enabled
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
… tree view is enabled (zed-industries#45030)

Before this commit, we would select a non-visible entry when a directory
is collapsed. Now we correctly select the visible entry that is visually
the previous/next entry in the list.

**Note**: I removed the `cx.notify()` call as it's already part of the
`self.scroll_to_selected_entry(cx)` call. So we don't notify twice :).

Follow-up: zed-industries#45002

**Before**


https://github.com/user-attachments/assets/da0b8084-0081-4d98-ad8a-c11c3b95a1b7

**After**


https://github.com/user-attachments/assets/8a16afb0-fdde-4317-b419-13143d5d608e

Release Notes:

- git_ui: Fix select next/previous entry selects non-visible entry when
tree view is enabled
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…hen tree view is enabled (zed-industries#45108)

This PR fixes a bug where the select first didn't select the first
visual entry when the first entry is a collapsed directory.

Follow-up: zed-industries#45030

**Before**:


https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41

**After**:


https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998

Release Notes:

- git_ui: Fix select first entry selects the wrong visual first entry
when tree view is enabled
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
… tree view is enabled (zed-industries#45030)

Before this commit, we would select a non-visible entry when a directory
is collapsed. Now we correctly select the visible entry that is visually
the previous/next entry in the list.

**Note**: I removed the `cx.notify()` call as it's already part of the
`self.scroll_to_selected_entry(cx)` call. So we don't notify twice :).

Follow-up: zed-industries#45002

**Before**


https://github.com/user-attachments/assets/da0b8084-0081-4d98-ad8a-c11c3b95a1b7

**After**


https://github.com/user-attachments/assets/8a16afb0-fdde-4317-b419-13143d5d608e

Release Notes:

- git_ui: Fix select next/previous entry selects non-visible entry when
tree view is enabled
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…hen tree view is enabled (zed-industries#45108)

This PR fixes a bug where the select first didn't select the first
visual entry when the first entry is a collapsed directory.

Follow-up: zed-industries#45030

**Before**:


https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41

**After**:


https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998

Release Notes:

- git_ui: Fix select first entry selects the wrong visual first entry
when tree view is enabled
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 community champion Issues filed by our amazing community champions! 🫶

2 participants