# git_panel: Fix focus navigation across Changes and History \(\#62215\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/d61e80b85debf0c56ecdcadf635ffa2660ddfd37)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: d61e80b85debf0c56ecdcadf635ffa2660ddfd37

Requested commit: d61e80b85debf0c56ecdcadf635ffa2660ddfd37

Commit: d61e80b85debf0c56ecdcadf635ffa2660ddfd37

Tree: 6e3a81da72b710ec97e6a006c094b3ad87c25057

Author: feeiyu

Committer: GitHub

## Message

```
git_panel: Fix focus navigation across Changes and History (#62215)

# Objective

Fix several Git panel focus issues:

- Directional navigation could not move focus into the History tab.
- History focus state was not updated when the panel received focus.
- Switching back to Changes could leave focus on the panel instead of
the commit editor.

Fixes #62211


## Solution

- Use the Git panel root as the activation focus target when History is
active.
- Reuse the panel's focus handle for focus events.
- Use the appropriate activation target when switching tabs.


## Testing

- Add a regression test
`test_history_tab_pane_navigation_focuses_rendered_panel` for navigating
between the editor and History.

## 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

## Showcase

after fix:

[2026-08-05
22-45-38.webm](https://github.com/user-attachments/assets/fdb3f87a-f1af-4ae1-95f7-0d61acfb3095)



---

Release Notes:

- Fixed directional focus navigation into the Git panel's History tab.
```

## Parents

- [82878540b5410b288a2c92cb9ee5675533e4d807](https://git.cafe/gitcafe/zed/commit/82878540b5410b288a2c92cb9ee5675533e4d807?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/d61e80b85debf0c56ecdcadf635ffa2660ddfd37?format=markdown)
