PM: merge M3.9 hamburger app menu
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> # Conflicts: # docs/architecture.md # docs/gaps.md
This commit is contained in:
commit
d4e1ba0981
14 changed files with 1004 additions and 25 deletions
|
|
@ -1,6 +1,6 @@
|
|||
# Architecture
|
||||
|
||||
> **Status:** M0 decisions recorded, M1 workspace, desktop bridge, tabs and editor, message catalog, engine construction, settings, themes, the recovery journal, notifications, UI commands, the palette, the settings dialog, the app icon and the syntax layer documented; M2 highlighting and `editor.reveal`, plus the search backend, the Find tool window, the symbol index, the Structure tool window and the go-to popup; M3 CLI and single instance, LSP client library, toolchain (PHP detection, Phpactor download) · **Last updated:** 2026-10-18
|
||||
> **Status:** M0 decisions recorded, M1 workspace, desktop bridge, tabs and editor, message catalog, engine construction, settings, themes, the recovery journal, notifications, UI commands, the palette, the settings dialog, the app icon and the syntax layer documented; M2 highlighting and `editor.reveal`, plus the search backend, the Find tool window, the symbol index, the Structure tool window and the go-to popup; M3 CLI and single instance, LSP client library, toolchain (PHP detection, Phpactor download), the app menu · **Last updated:** 2026-10-19
|
||||
|
||||
## Overview
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ Watched directories: the VFS watcher is non-recursive, so `project.children` wat
|
|||
- **Listing:** `listCommands` returns one list in id order: engine commands and UI commands. `CommandInfo` has `ui: bool`; UI commands also carry `labelKey`, use it as `label` (the engine has no English for them) and are always `enabled` as far as the engine knows.
|
||||
- **Running from outside:** `Engine::execute` on a UI command id queues `uiCommand {id, params}` and returns `null` (params are passed on unchanged). The desktop publishes the event to the window and to control subscribers like any other. The frontend runs the command, so `engine.execute palette.open` over the control channel opens the palette. A `uiCommand` the frontend cannot run (no handler, or disabled) becomes a warning toast.
|
||||
- **Frontend:** `ui/src/commands/`:
|
||||
- `uiCommands.ts` lists the UI commands: `editor.reveal` (no shortcut, M2.2), `find.open` `Mod+Alt+F` (M2.4), `palette.open` `Mod+Shift+P`, `settings.open` `Mod+,`, `view.toggleProjectTree` `Mod+1`.
|
||||
- `uiCommands.ts` lists the UI commands: `editor.reveal` (no shortcut, M2.2), `find.open` `Mod+Alt+F` (M2.4), `menu.open` `Alt+M` (M3.9), `palette.open` `Mod+Shift+P`, `settings.open` `Mod+,`, `view.toggleProjectTree` `Mod+1`. Since M3.9 the user-facing ones carry a `menuPath`.
|
||||
- `keymap.ts` parses Lutra notation and matches by key code (letters, digits and US punctuation by `code`, so Alt and Shift layout effects don't matter). It also formats shortcuts for display with catalog modifier names.
|
||||
- `rank.ts` ranks for the palette.
|
||||
- `store.ts` (Pinia `commands`) holds the merged list, the keymap, the handlers and the recent commands.
|
||||
|
|
@ -213,6 +213,16 @@ Watched directories: the VFS watcher is non-recursive, so `project.children` wat
|
|||
- **Rows:** disabled rows are dimmed with `aria-disabled`.
|
||||
- **Accessibility:** combobox with listbox and `aria-activedescendant`.
|
||||
|
||||
### App menu (M3.9)
|
||||
|
||||
- **Where:** `MainLayout.vue` has a slim header bar (28 px, `--lt-bg`, a `header` slot) whose default content is `ui/src/components/menu/AppMenu.vue`: a button with the Lucide `menu` icon top left.
|
||||
- **Contents (`menu.ts`):** every command in the store's entries with a `menuPath` (engine and UI), grouped by the path's first segment. Groups in Lutra's order File, Edit, View, Go, Help (unknown groups before Help, empty ones hidden), group headings from the catalog (`menu.group.*`). Items follow a fixed id order, others sorted by label after them. A UI command shows its catalog label; an engine command shows the rest of its path (the engine has no catalog, and the path is written for menus), so `buffer.close` reads Close Tab. Deeper paths are flattened as `A › B`.
|
||||
- **Paths:** File (`project.openDialog`, `file.save`, `file.saveAll`, `buffer.close` → `File/Close Tab`, `project.close`, `app.quit`), View (`palette.open`, `view.toggleProjectTree`, `view.toggleStructure`, `find.open`, `settings.open`), Go (`goto.fileOpen`, `goto.classOpen`, `goto.symbolOpen`), Help (`app.about`). Edit stays empty until there are edit commands; the terminal toggle gets `View/Terminal` when M3.6 lands (its id is already in the order list).
|
||||
- **Opening:** the button (a second click closes) or `menu.open` (`Alt+M`, Lutra's own; also as `uiCommand`). It refreshes the enabled states and focuses the first item.
|
||||
- **Keyboard:** WAI-ARIA menu with roving focus: arrows wrap, Home/End, Enter/Space runs, Escape or Tab closes, printable keys type ahead (500 ms buffer; one letter cycles through items with that initial). Disabled items are focusable, dimmed (`aria-disabled`) and do nothing.
|
||||
- **Modal rule:** `menu` is an exclusive `ModalId`; the menu is a launcher like the palette: `commands/store.ts` › `execute` closes it for every command but `menu.open`, so a shortcut, a palette command or an agent's `uiCommand` never leaves it open. A chosen command runs after the menu closed and returned the focus.
|
||||
- **Why a dropdown with headings instead of a menu bar:** one keyboard path (open, type, Enter) like the palette, no nested popups to manage, and it fits the slim header. A native macOS menu bar and a display-mode setting are follow-ups.
|
||||
|
||||
### Settings dialog (M1.9b)
|
||||
|
||||
- **Store:** `ui/src/stores/settings.ts` (Pinia `settings`, started by `App.vue`) loads `settings.list` and `settings.get`, reads both defensively (unknown types and malformed entries dropped, values must be scalars), changes values through `settings.set`/`settings.reset` and keeps a refused change's message per key. `settingsChanged` reloads the named keys with `settings.get {keys}` and drops their errors, so changes from the control channel or an agent show at once.
|
||||
|
|
@ -333,6 +343,7 @@ Watched directories: the VFS watcher is non-recursive, so `project.children` wat
|
|||
|
||||
| Date | Change | Summary |
|
||||
|---|---|---|
|
||||
| 2026-10-19 | minor | M3.9: app menu (header bar, `menu.open`, grouping by `menuPath`, launcher under the modal rule); menu paths for user commands |
|
||||
| 2026-10-18 | minor | M3.1: toolchain (PHP detection, pinned Phpactor download with SHA-256 check, network access note, D15), `toolchain.status`/`toolchain.downloadPhpactor`, `toolchainChanged`, bool and string settings |
|
||||
| 2026-10-18 | minor | M3.2: LSP client library (`crates/lsp`: framing, supervision and restart, initialize, requests with timeout and cancel, server requests, document sync, fake server tests) |
|
||||
| 2026-10-17 | minor | M3.7: `lutra` CLI, single instance, rendezvous file and token listener, `app.auth`/`app.focus`, CLI to L6 |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue