Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
description: "Tasks for 093 — Menu button and a hideable menu bar"
Tasks: Menu button and a hideable menu bar
Input: Design documents from specs/093-menu-button-title-bar/
Prerequisites: plan.md, spec.md, research.md, data-model.md, contracts/ui.md, quickstart.md
Tests: SC-002 asks for an automated comparison of the two menus → one smoke-test suite
(MenuMirrorTests). The rest is verified per quickstart.md.
Organization: grouped by user story (spec.md priorities).
Format: [ID] [P?] [Story] Description
- [P]: can run in parallel (different files, no dependency on unfinished tasks)
- [Story]: US1…US5 from spec.md
Phase 1: Setup
- T001 Add
GlyphKind.Menu(three strokesM4 6.5 H20 M4 12 H20 M4 17.5 H20, stroke only) to the enum and thePathstable insrc/managed/Nota.App/Controls/Glyph.cs - T002 [P] Add English localisation keys
main.menu("Menu"),main.show_menu_bar("Show menu bar"),commands.show_menu_bar("Show menu bar"),main.commands.menu_bar_shown/main.commands.menu_bar_hidden(status line),preferences.menu_bar("Menu bar"),preferences.menu_bar_hidden("Hidden"),preferences.menu_bar_shown("Shown"),preferences.menu_bar_caption(one sentence: the whole menu is also under the ☰ key at the start of the transport bar; Alt or F10 opens it),preferences.open_the_menu("Open the menu") insrc/managed/Nota.Application/Localization/en.json(other languages follow the usual translation flow; add the keys where the catalogue check requires them)
Phase 2: Foundational (blocks all stories)
- T003 Add
public bool ShowMenuBar { get; set; }— defaultfalse, doc comment "Windows / Linux: the in-window menu row is shown (#518). Off = the ☰ Menu key at the start of the transport bar gives the menu. Ignored on macOS." — next toArrangementHeadersRightinsrc/managed/Nota.Application/Settings.cs - T004 Create
src/managed/Nota.App/MenuMirror.cs(SPDX header; Avalonia base only):static IReadOnlyList<Control> Build(NativeMenu source)making a freshMenuItem/Separatortree per research R1 / data-model mirror table (Header, InputGesture ← Gesture, ToggleType / IsChecked, IsEnabled, ToolTip, submenus; click →((INativeMenuItemExporterEventsImplBridge)src).RaiseClicked()), plusstatic MenuShape Describe(NativeMenu)/Describe(IEnumerable<Control>)producing a comparable plain record tree for tests - T005 Link
MenuMirror.csintotests/Nota.SmokeTest/Nota.SmokeTest.csprojand addtests/Nota.SmokeTest/MenuMirrorTests.cs(SPDX header): build aNativeMenuwith a nested submenu, a separator, checked and unchecked checkbox items, a gesture, a disabled item, a tooltip and a header with__; assertDescribe(source) == Describe(Build(source)); flip a check mark and add an item, rebuild, assert again (freshness); register the suite where the smoke runner lists its suites
Checkpoint: mirror proven equal to its source.
Phase 3: User Story 1 — the whole menu from a Menu button, row hidden (P1) 🎯 MVP
Goal: ☰ leads the transport bar on Windows / Linux and opens the full menu; the row is hidden by default.
Independent test: quickstart steps 1–6.
- T006 [US1] In
src/managed/Nota.App/MainWindow.axaml: name the menu-row borderMenuBarRow(and the barMenuBarHost= theNativeMenuBar); add, first in transport column 0'sStackPanel, aBorder x:Name="MenuKeyWell" Classes="segmented view"holdingToggleButton x:Name="MenuBtn" Classes="seg view"with<app:Glyph Kind="Menu" Size="16"/>,ToolTip.Tip/AutomationProperties.Name={app:T 'main.menu'},IsVisible="False"(code shows it); update the transport comment to mention the Menu key - T007 [US1] Create
src/managed/Nota.App/MainWindow.MenuButton.cs(SPDX header):InitMenuButton()— on macOS leaveMenuKeyWellhidden and return; else giveMenuBtnaContextMenu(placement bottom, anchored to the key) whoseOpeningclears and refillsItemsfromMenuMirror.Build(NativeMenu.GetMenu(this)), keepMenuBtn.IsCheckedtrue while open, save / restore keyboard focus around it (FR-015);OpenMenuFromKeyboard()opens it with the first item selected;ApplyMenuBar(bool shown)— Windows / Linux:MenuBarRow.Child = shown ? MenuBarHost : null,MenuBarRow.IsVisible = shown,MenuKeyWell.IsVisible = !shown(FR-011), tickMenuItemFor("view.menuBar"),RequestTransportFit() - T008 [US1] Wire it in
src/managed/Nota.App/MainWindow.axaml.cs: callInitMenuButton()afterInitRecentMenu()and applyApplyMenuBar(settings.Current.ShowMenuBar)fromApp.Services'ISettingsServicein the constructor (first frame right, SC-005); in thevm.Settings.Changedhandler callApplyMenuBar(vm.Settings.Current.ShowMenuBar) - T009 [US1] Confirm
MenuKeyWellis not inTransportShedOrderand add a one-line note to the header comment ofsrc/managed/Nota.App/MainWindow.TransportFit.csthat the Menu key, like the view switch, never goes (FR-006)
Checkpoint: US1 works with the row permanently hidden.
Phase 4: User Story 2 — bring the menu row back (P2)
Goal: "Show menu bar" in View and Settings → Appearance, persisted.
Independent test: quickstart steps 7–8.
- T010 [P] [US2] Add
C("view.menuBar", Loc.T("commands.show_menu_bar"), Loc.T("commands.view"), "", "menu bar menubar hamburger file edit row classic")afterview.fullscreeninsrc/managed/Nota.Application/Palette/CommandCatalog.cs - T011 [US2] Add
<NativeMenuItem Header="{app:T 'main.show_menu_bar'}" app:Commands.Id="view.menuBar" ToggleType="CheckBox"/>after the Toggle full screen item in the View menu ofsrc/managed/Nota.App/MainWindow.axaml - T012 [US2] In
src/managed/Nota.App/MainWindow.Commands.csbindB("view.menuBar", ToggleMenuBar);ToggleMenuBar()(macOS: return) flips_vm.Settings.Current.ShowMenuBar, saves, sets the status line (main.commands.menu_bar_shown/_hidden);Settings.Changedapplies it via T008 - T013 [US2] In
src/managed/Nota.App/MainWindow.MenuKeys.csremoveview.menuBaron macOS next tofile.exit/prefs.open(FR-020) - T014 [US2] In
src/managed/Nota.App/PreferencesWindow.csaddMenuBarPicker()(segmented Hidden | Shown, built likeHeaderSidePicker, repainting onSettings.Changed) and, on Windows / Linux only, the rowsRow(Loc.T("preferences.menu_bar"), MenuBarPicker())+ caption after the Track headers rows ofAppearancePane()
Checkpoint: US1 + US2 complete.
Phase 5: User Story 3 — open the menu from the keyboard (P2)
Goal: F10 and a lone Alt tap open the Menu key's menu while the row is hidden.
Independent test: quickstart step 9.
- T015 [US3] In
src/managed/Nota.App/MainWindow.MenuButton.csadd the Alt-tap / F10 detector per research R4: tunnel + handledEventsToo handlers forKeyDown,KeyUp,PointerPressed,PointerWheelChangedregistered inInitMenuButton()(Windows / Linux only), active only while the row is hidden and no popup / dialog is open; F10 (no modifiers) and Alt released after an un-interrupted Alt press callOpenMenuFromKeyboard()and mark the event handled; any other key, click or wheel disarms (FR-013, FR-014) - T016 [US3] Make sure the main key handlers in
src/managed/Nota.App/MainWindow.Input.csdo not consume a bare Alt / F10 before the detector (adjust only if they do), and that F10 doesn't reach a text field's editing - T017 [US3] Add an "Alt F10 → Open the menu" row (
preferences.open_the_menu) to the general group ofShortcutGroupsinsrc/managed/Nota.App/PreferencesWindow.cs, shown on Windows / Linux only (FR-017; use the existing platform filtering, or filter when the list is built)
Phase 6: User Story 4 — project name in the Windows title bar (P3)
- T018 [P] [US4] In
UpdateWindowTitle()ofsrc/managed/Nota.App/MainWindow.Files.cssetDocTitleText.Text = titleon Windows, keepProjectDisplayName()on macOS; update the comment (FR-018)
Phase 7: User Story 5 — macOS unchanged (P1)
- T019 [US5] Review every change above for its macOS guard: Menu key hidden, no detector, no View item, no Appearance row, no Shortcuts row, caption unchanged, menu row untouched (FR-020); run the app on macOS and compare with
develop
Phase 8: Polish & cross-cutting
- T020 [P]
CHANGELOG.md[Unreleased]→ Changed entry (Windows / Linux: menu under ☰, menu bar hidden by default, Show menu bar setting, Alt / F10; Windows caption "Nota — name") with(#518) - T021 [P] Update
FEATURES.mdvia thenota-featuresskill - T022 [P] Update the user docs (
../nota-docs, EN + RU) via thenota-docsskill: main-window chrome, Settings → Appearance, Shortcuts - T023 Russian (and other shipped languages) strings for the new keys in
src/managed/Nota.Application/Localization/*.json, as the localisation check requires - T024 Visual check on the headless / harness app per quickstart (Windows / Linux layout of the transport with ☰, the open menu, Settings → Appearance) and before / after screenshots for the PR
- T025
scripts/build.shpasses (smoke test incl. MenuMirror and palette drift)
Dependencies & execution order
- Phase 1 → Phase 2 → US1 (T006–T009) → US2 (T010–T014) → US3 (T015–T017).
- US4 (T018) depends on nothing but Phase 1; can be done any time.
- US5 (T019) after all behaviour is in.
- Polish after the stories; T025 last.
Parallel opportunities
- T001 ‖ T002; T010 ‖ T018; T020 ‖ T021 ‖ T022.
Implementation strategy
MVP = Phases 1–3 (the Menu key, row hidden). Then US2 (the way back), US3 (keyboard), US4 (caption), the macOS review and the docs.
Nota compliance re-check
- New files (
MenuMirror.cs,MainWindow.MenuButton.cs,MenuMirrorTests.cs) carry the SPDX header - No new dependency
- No audio-thread / engine change
- CHANGELOG, FEATURES, docs, Shortcuts screen updated
- UI follows DESIGN.md
Implementation notes (2026-11-12)
- T005: the suite also runs alone with
Nota.SmokeTest --menu-mirror. - T007:
ContextMenu.Open()does not raiseOpening(only a right-click does), soOpenMenuKeyMenufills the menu itself (FillMenuKeyMenu); found by the headless harness. - T015/T019: the platform rule lives in one place,
MainWindow.HasMenuKey(settable so a headless harness on a Mac can draw the Windows / Linux chrome). - T016: nothing in
MainWindow.Input.cshandles a bare Alt or F10; the detector runs in the tunnel phase with handledEventsToo, ahead of every view. - T017: the Alt / F10 row is a plain literal row in
ShortcutGroups(the docs' shortcuts generator parses literals only) and is filtered out on macOS at render time. - T023: open — the repo holds only
en.json; Russian / French come through the nota-translations reference sync. - T024: headless harness
/tmp/menukeyharness(12 checks: default hidden row, mirror of the real menu = 73 entries, F10 / Alt tap / Alt+S / Alt+click / AltGr, View toggle, Settings toggle, narrow window). Real Windows / Linux hardware not tried (no machine here); the built-in Avalonia access-key behaviour with the row shown is untested there. - T025: open —
scripts/build.shon 2026-11-12 built everything and the smoke run passed all but 3 render-pool timing guards (VST3 device deadlines, "overloaded" late blocks), the same 3 again with--perfalone. The machine was loaded (Rider ~270 % CPU, Nota.app running, load average ~9); this change touches no engine / render code. Re-run with them closed. Re-run with Rider closed (load ~5, Nota.app still running): the same guards failed. A/B of--perf, twice each, baseeec6a4ffvs this branch on the same engine build: base 52 / 303 late blocks of 4125, branch 233 / 311; the VST3 deadline guard flips on both. The failures are the machine's, not this change's; a fully idle run is still to do. - Review on #585 (2026-11-12): Alt during a drag no longer arms the tap (pointer button state tracked; a move with a button down disarms), and Alt / F10 do nothing while the command palette is open. Harness: 15 checks, all pass.