git_ui: Keep view options menu state fresh (#59744)

# Objective

- Keep the Git panel view options menu open when changing view, sort, or
group options.
- Make the open menu reflect the selected option immediately, including
showing the Sort By section as soon as List view is selected.

## Solution

- Use a persistent context menu for the Git panel view options menu so
selecting an item rebuilds the menu instead of dismissing it.
- Track the open menu's view options state locally with
`GitPanelViewOptionsMenuState` so checkmarks and conditional sections
update before the settings file change is observed.
- Continue dispatching the existing Git panel actions so persisted
settings and panel updates keep using the current code path.

## 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)
- [ ] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

## Showcase

- N/A

---

Release Notes:

- Fixed Git Panel view options menu selections updating only after
reopening the menu.
d753a31db5Sathwik Chirivelli committed on 6/23/2026, 12:15:46 PM· committed by GitHubparentd3756f3
1 file changedLine totals unavailable