feat(editor): the menu bar (workspace-shell B4) - #196
Merged
Merged
Conversation
Nine menus (File / Edit / Add / Note / Part / View / Transport / Tempo-Grid / Help) re-homing the EDITOR_SHORTCUT_COMMANDS registry, organized by musical object per charrette $2.2 — Tempo/Grid is the time-model pillar's own top-level menu. A RE-PRESENTATION, never a re-plumb: registry items dispatch through input.js's _editorRunEofCommand (now exported — the same switch the keyboard uses), and the handful of pre-registry file/panel actions call their existing window.editor* entry points. Nothing is implemented twice. - Accelerators FOLLOW the active shortcut profile: dropdown content renders at OPEN time from _editorShortcutRowsPure(profile), so a FeedBack <-> EOF swap relabels every accelerator with zero swap-time bookkeeping. - status:'planned' commands render greyed with a 'soon' tag and never dispatch (no false rungs). - Mode discipline: sync-point items grey outside Tempo Map mode (they act on a selected sync point); Sync-to-audio HIDES without a recording. - No Alt-mnemonics (browsers/hosts own Alt+F and friends): click-open + arrow-nav + Enter/Escape, the charrette's sanctioned fallback. Menu keystrokes stop propagation — the canvas shortcut layer never sees them. - Flyout submenus (Import etc.) render as in-menu section headers for now: same disclosure, no nested-popover machinery. Charrette items with nothing behind them (Vocals, Chord palette, Bake stems) are NOT invented as dead rows — greyed+soon is reserved for registry-backed planned commands. - The one document-level listener (click-away) rides the teardown registry. tests/menu_model.test.mjs (10): every registry-backed item resolves to a live registry id (no dangling ids as the registry evolves), one home per command, profile-swap relabels accelerators, planned items are greyed and dispatch-less, the two mode gates, missing entry points grey instead of crash, vanished registry ids drop instead of dangling, and no menu renders empty. Suite 91/91, ESLint 0 errors. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EBQCHCNA81E9tHmSDHSe2Q Signed-off-by: ChrisBeWithYou <chris@rifflarr.local>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds a nine-menu editor menu bar backed by the command registry and active shortcut profile. It supports state-gated and planned commands, command or window-function dispatch, keyboard and click interactions, click-away teardown, scoped styling, editor initialization, and menu-model tests. ChangesEditor menu bar
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
actor EditorUser
participant MenuBar
participant MenuModel
participant CommandDispatcher
participant WindowFunction
EditorUser->>MenuBar: Open menu
MenuBar->>MenuModel: Resolve current registry and editor state
MenuModel-->>MenuBar: Return menu items and accelerator states
EditorUser->>MenuBar: Activate item
MenuBar->>CommandDispatcher: Dispatch command item
MenuBar->>WindowFunction: Invoke function item when available
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
editorToggleStemMixer has no implementation anywhere (the screen.html toolbar button that calls it is class="hidden"), so windowFns() never found it and the View menu rendered a permanently-greyed row. Remove the item; wiring the function is out of scope. 91 test files green, lint clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 12, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The workspace-shell's nine-menu bar (charrette §2.2 / D-C2): File · Edit · Add · Note · Part · View · Transport · Tempo/Grid · Help, re-homing the
EDITOR_SHORTCUT_COMMANDSregistry organized by musical object — Tempo/Grid is the time-model pillar's own top-level menu.A re-presentation, not a re-plumb. Registry items dispatch through
input.js's_editorRunEofCommand(now exported — the exact switch the keyboard uses), and the pre-registry file/panel actions (New/Open/Build/Replace-audio/mixers) call their existingwindow.editor*entry points. Nothing is implemented twice.Locked behaviors
_editorShortcutRowsPure(profile), so a FeedBack ⇄ EOF Legacy swap relabels every accelerator with zero swap-time bookkeeping (Help has a profile-swap item that demonstrates it live).status:'planned'commands render greyed with a "soon" tag and never dispatch — no false rungs.Deliberate adaptations (noted for review)
plannedcommands.Tests
tests/menu_model.test.mjs(10, real-import): every registry-backed item resolves to a live registry id (the menu can't dangle as the registry evolves), exactly one home per command, profile-swap relabels accelerators, planned items greyed + dispatch-less, both mode gates, missing entry points grey instead of crash, vanished ids drop cleanly, no menu renders empty. Full suite 91/91 · ESLint 0 errors · CHANGELOG updated.Screenshots (Tempo/Grid gating + SOON tags, the Note technique catalog, File under the EOF profile) shared with Christian during review.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EBQCHCNA81E9tHmSDHSe2Q
Summary by CodeRabbit