M3.9: hamburger app menu

A slim header bar in MainLayout with a menu button (Lucide menu) whose
dropdown lists every command with a menuPath, grouped File, Edit, View,
Go, Help, with shortcuts and dimmed disabled entries. Keyboard: arrows,
Home/End, Enter/Space, Escape/Tab, type-ahead. menu.open (Alt+M) opens
it, also over uiCommand. It is an exclusive modal and a launcher under
the one-modal rule. Menu paths for the user-facing engine and UI
commands (buffer.close as File/Close Tab). Catalog strings, Vitest.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
danny 2026-10-19 18:23:13 +02:00
parent 78709dd76b
commit 27ad30369c
14 changed files with 1004 additions and 25 deletions

View file

@ -19,6 +19,9 @@
* appears with the UI command `find.open` (`Mod+Alt+F`, supplied here so it
* works before the panel exists), collapses to its header and closes from
* its header; the Find store keeps the results while it is closed.
*
* A slim header bar along the top (M3.9) holds the app menu
* ({@link AppMenu}); its `header` slot can replace it.
*/
import { FolderTree, ListTree } from "@lucide/vue";
import { computed, onBeforeUnmount, onMounted, ref } from "vue";
@ -29,6 +32,7 @@ import FindToolWindow from "../find/FindToolWindow.vue";
import ProjectToolWindow from "../project/ProjectToolWindow.vue";
import StatusBar from "../StatusBar.vue";
import StructureToolWindow from "../structure/StructureToolWindow.vue";
import AppMenu from "../menu/AppMenu.vue";
import BottomPanel from "./BottomPanel.vue";
import ToolWindow from "./ToolWindow.vue";
@ -100,6 +104,14 @@ onBeforeUnmount(() => {
<template>
<div class="main-layout">
<header
class="main-layout__header"
data-test="main-header"
>
<slot name="header">
<AppMenu />
</slot>
</header>
<div class="main-layout__row">
<nav
class="main-layout__stripe"
@ -163,6 +175,16 @@ onBeforeUnmount(() => {
height: 100%;
}
.main-layout__header {
display: flex;
align-items: center;
flex: none;
height: 28px;
padding: 0 var(--lt-space-s, 4px);
background: var(--lt-bg);
border-bottom: 1px solid var(--lt-border);
}
.main-layout__row {
display: flex;
flex: 1;