aboutsummaryrefslogtreecommitdiff
path: root/bundle/AGENTS
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-10-22 02:46:30 +0000
committer_ov4 <ov4@ov4.org>2026-10-22 02:46:30 +0000
commit77098c720639a421f81ee14e47250d167d7af7bd (patch)
treedcf4d021f7828e34d9f463b8cf5159326617f242 /bundle/AGENTS
parent9efee50d405b8ca990d30114fb6ec6a57e2e92f1 (diff)
feat(bundle): add a native menu bar listing the shortcuts
One Tauri menu definition serves the macOS menu bar and the top of each window on Windows. Menu clicks run the same frontend commands as the keyboard shortcuts in the focused window. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'bundle/AGENTS')
-rw-r--r--bundle/AGENTS/DEVELOPMENT.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/bundle/AGENTS/DEVELOPMENT.md b/bundle/AGENTS/DEVELOPMENT.md
index 52d13ba..a77e1e8 100644
--- a/bundle/AGENTS/DEVELOPMENT.md
+++ b/bundle/AGENTS/DEVELOPMENT.md
@@ -30,6 +30,6 @@ The Rust runner launches the packaged compiler directly, using the source direct
After building the compiler, run `cargo test --release --manifest-path src-tauri/Cargo.toml`. The two native tests exercise real compilation, prefilled input, EOF, Unicode, diagnostics, output before process exit, stopping, single-run exclusion and restart, including source paths with spaces. CI runs them on all three native platforms.
-Keyboard shortcuts are Monaco `KeyMod.CtrlCmd` keybindings: the editor registers Find and Toggle Line Comment, and the document handler matches New, New Window (Shift), Open, Save and Find with `StandardKeyboardEvent.equals`. Never test `ctrlKey`/`metaKey` directly; Monaco resolves CtrlCmd to Cmd on macOS and Ctrl elsewhere.
+The native menu is defined once in `src-tauri/src/menu.rs` with Tauri's menu API; macOS shows it in the system menu bar, Windows and Linux at the top of each window. Only the macOS application menu is platform-specific. Edit keeps the predefined clipboard and undo items, which macOS needs in the webview. Other platforms have no Quit item because it exits without unsaved-changes prompts. Custom item ids name commands in `src/main.js`; a click emits a `menu` event with the id to the focused window. Keyboard shortcuts are Monaco `KeyMod.CtrlCmd` keybindings: the editor registers Find and Toggle Line Comment, and the document handler matches the menu's commands with `StandardKeyboardEvent.equals`, so a shortcut runs once whether the webview or the native menu receives the key first. Keep menu accelerators and handler bindings in sync. Never test `ctrlKey`/`metaKey` directly; Monaco resolves CtrlCmd to Cmd on macOS and Ctrl elsewhere.
Use brief English UI labels and messages. Keep one document per window and prefilled stdin. More documents use native OS windows created by the `new_window` command from the configured window; do not add tabs or in-page switching. Before feature commits, run affected plugin tests, build the frontend and check native compilation as appropriate. Do not add a separate UI test framework for routine changes.