add Zed-style application menu bar: File / View / Help (T-48)

A custom in-window menu bar in the hat (no native menu, D-7), built from
the command registry so it stays in sync and satisfies D-6 parity.

- Menu model + hybrid resolver (menu_model.dart): a curated File/View/Help
  tree where a MenuAutoFill node sweeps in unplaced view.* commands; titles
  + keybindings come from the registry/keymap; unregistered or
  enabledWhen-false items render disabled (greyed), never hidden.
- Widgets: MenuBar row in the hat (chrome tokens), anchored MenuDropdown
  overlay (dropdown tokens), two-column MenuItemRow with inline keybinding.
- Full keyboard: Alt+mnemonic opens (hook in _RootShell._onKey), arrows
  navigate, Enter activates, Esc closes, Left/Right switch menus.
- Commands: file.openFolder / file.newWindow / file.closeWorkspace /
  help.about, registered by MenuBarExtension(services:). File logic lifted
  out of the project switcher into FileActions (one source of truth; the
  switcher now dispatches the commands). Ctrl+O / Ctrl+Shift+N are now real
  keybindings in default.yaml.
- Help → About: version/commit/date/repo from build-info + the bundled
  dependency licenses parsed from assets/licenses.yaml.

Edit/Selection menus are deferred to T-271/T-272 (need focused-surface
command routing).

Tests: resolver + controller + licenses parse (pure); menu-bar widget
(open/close/execute/disabled/Esc/arrow/Enter/Left-Right); FileActions +
Open dialog; app-level Alt+F, non-repo dialog, and closeWorkspace.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-07 17:39:56 +02:00
co-authored by Claude Opus 4.8
parent c28d3d31d3
commit e0fba4a3bc
18 changed files with 1581 additions and 187 deletions
+7
View File
@@ -18,6 +18,13 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
### Added
- A Zed-style **application menu bar** in the hat — **File**, **View**, and
**Help** menus built from custom widgets (no native menu, D-7). Items are
pulled from the command registry with their keybindings shown inline;
unplaced `view.*` commands auto-fill the View menu. Full keyboard support:
`Alt`+mnemonic opens a menu, arrows navigate, Enter activates, Esc closes.
Help → About shows version + bundled licenses. `Ctrl+O` (Open Folder) and
`Ctrl+Shift+N` (New Window) are now real keybindings. (T-48)
- The sidebar/dock **filter boxes are now CLI-addressable** (D-6 parity): `clide
ui filter <address> <text>` drives a pane's filter as typing would, and `clide
ui filter <address>` reads it back. Addresses are box ids from `clide pane