Skip to content

armgit / nota

Public Imported from GitHub
0

Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.

(feat) Full screen without the title bar

Egor Khindikaynenb4fd9000e46a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b86ac0e8..2e7b5196 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,13 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.
## [Unreleased]
+### Added
+- **Full screen without the title bar:** switching the window to full screen hides the
+ title bar and its separator — the workspace fills the screen edge to edge, and the bar
+ comes back when you leave full screen. The window stays as it was in normal and
+ maximized states. On Windows and Linux a new **View → Toggle Full Screen** command
+ (shortcut **F11**) enters and leaves full screen; on macOS the green button does it.
+
### Fixed
- **Sample-pack presets open in the browser:** under Nota Mosaic → Packs, a pack wouldn't
expand, so its presets couldn't be seen or dragged. Packs now expand to their presets like
diff --git a/FEATURES.md b/FEATURES.md
index 9f85cad0..b6194ea6 100644
--- a/FEATURES.md
+++ b/FEATURES.md
@@ -903,7 +903,9 @@ and user presets, automation, persistence and cloning.
window — including the custom-drawn arrangement, piano roll, mixer and device cards.
- **A single frameless window style**: centred title, drag by the header, the macOS
traffic lights in a left inset (Windows gets its own title bar; Linux uses the system
- frame).
+ frame). **Full screen** — the macOS green button, or View → Toggle Full Screen (F11)
+ on Windows and Linux — hides the title bar and its separator so the workspace fills the
+ screen edge to edge; leaving full screen brings the bar back. Maximized keeps the bar.
- **What's New** — a window showing changelog entries newer than `LastSeenVersion`, once
after the first launch on a new version.
- **Self-update** — the start screen's banner announces a newer GitHub release. **Update**
diff --git a/specs/002-fullscreen-hide-titlebar/checklists/requirements.md b/specs/002-fullscreen-hide-titlebar/checklists/requirements.md
new file mode 100644
index 00000000..102244b0
--- /dev/null
+++ b/specs/002-fullscreen-hide-titlebar/checklists/requirements.md
@@ -0,0 +1,37 @@
+# Specification Quality Checklist: Hide the window title bar in fullscreen
+
+**Purpose**: Validate specification completeness and quality before proceeding to planning
+**Created**: 2026-10-12
+**Feature**: [spec.md](../spec.md)
+
+## Content Quality
+
+- [x] No implementation details (languages, frameworks, APIs)
+- [x] Focused on user value and business needs
+- [x] Written for non-technical stakeholders
+- [x] All mandatory sections completed
+
+## Requirement Completeness
+
+- [x] No [NEEDS CLARIFICATION] markers remain
+- [x] Requirements are testable and unambiguous
+- [x] Success criteria are measurable
+- [x] Success criteria are technology-agnostic (no implementation details)
+- [x] All acceptance scenarios are defined
+- [x] Edge cases are identified
+- [x] Scope is clearly bounded
+- [x] Dependencies and assumptions identified
+
+## Feature Readiness
+
+- [x] All functional requirements have clear acceptance criteria
+- [x] User scenarios cover primary flows
+- [x] Feature meets measurable outcomes defined in Success Criteria
+- [x] No implementation details leak into specification
+
+## Notes
+
+- Validation passed on all items after user clarification (2026-10-12):
+ - Q1 «Полный экран» = только fullscreen ОС; maximized заголовок не скрывает.
+ - Q2 Windows entry point = да: команда в меню View + F11 (только на Windows).
+- Items marked incomplete require spec updates before `/speckit-clarify` or `/speckit-plan`
diff --git a/specs/002-fullscreen-hide-titlebar/contracts/ui-contract.md b/specs/002-fullscreen-hide-titlebar/contracts/ui-contract.md
new file mode 100644
index 00000000..6180677f
--- /dev/null
+++ b/specs/002-fullscreen-hide-titlebar/contracts/ui-contract.md
@@ -0,0 +1,51 @@
+# UI Contract: Hide the window title bar in fullscreen
+
+**Feature**: specs/002-fullscreen-hide-titlebar | **Date**: 2026-10-12
+
+Nota is a desktop app; its user-facing contract surface is (a) the command system shared
+by the menu / keyboard / command palette / Shortcuts pane, and (b) window chrome
+behaviour. This feature extends both.
+
+## Command contract: `view.fullscreen`
+
+| Aspect | Contract |
+|-------------|----------|
+| Id | `view.fullscreen` |
+| Title (menu/palette) | "Toggle Full Screen" |
+| Category | View |
+| Gesture | F11, no modifiers |
+| Menu | View menu of the main window, alongside the other View toggles |
+| Palette | Searchable by title/aliases ("maximize", "immersive", "hide chrome") |
+| Effect | Main window: enter the OS fullscreen state, or leave it |
+
+**Behaviour**:
+
+- Enter: main window `WindowState → FullScreen`; the pre-fullscreen state
+ (Maximized/Normal) is remembered for the exit path.
+- Exit: `WindowState → remembered state` (Maximized if the window was maximized before,
+ Normal otherwise; never a surprising un-maximize).
+- Idempotent per invocation (it is a toggle); firing it twice returns to the starting
+ state.
+- Works on every OS. On macOS the OS gestures (green button, system menu) remain the
+ primary fullscreen path and produce the same chrome behaviour.
+
+## Chrome visibility contract
+
+For every app window with Nota's custom chrome (main window + `NotaWindow` dialog family
+on macOS/Windows):
+
+| State | Title bar band + separator |
+|--------------------|---------------------------|
+| Normal / Maximized | visible (unchanged styling, drag, centered title) |
+| FullScreen | hidden; workspace content extends to the top screen edge |
+
+- Windows whose top band is a functional toolbar (the device pop-out window's preset
+ bar) keep that band in fullscreen — it carries live controls, not just chrome.
+- On Linux (native OS frame) the app draws no custom bar in any state; the OS frame's
+ own fullscreen behaviour applies unchanged.
+
+## Out of contract (unchanged)
+
+- Audio engine, C ABI, playback, project data — untouched (FR-009).
+- Maximized-state chrome (bar stays), title-bar double-click → maximize toggle,
+ traffic-light/caption-button placement and operability in fullscreen (OS-owned).
diff --git a/specs/002-fullscreen-hide-titlebar/data-model.md b/specs/002-fullscreen-hide-titlebar/data-model.md
new file mode 100644
index 00000000..9e76e178
--- /dev/null
+++ b/specs/002-fullscreen-hide-titlebar/data-model.md
@@ -0,0 +1,56 @@
+# Data Model: Hide the window title bar in fullscreen
+
+**Feature**: specs/002-fullscreen-hide-titlebar | **Date**: 2026-10-12
+
+No persistent data is introduced — the feature is pure window-chrome presentation. This
+document records the transient state model that drives it.
+
+## Entities (transient, UI-layer only)
+
+### Window chrome state (derived — no new storage)
+
+A pure function of the window's current display state, re-evaluated on every
+`WindowState` change:
+
+| Window state (OS-owned) | Custom title bar + separator | Notes |
+|--------------------------|------------------------------|-------|
+| Normal | visible | unchanged behaviour |
+| Maximized | visible | app starts here; explicitly out of fullscreen scope (spec Q1) |
+| FullScreen (macOS/Win) | hidden | content fills to the top edge |
+| Any state on Linux | hidden (already, native frame) | pre-existing behaviour; no regression |
+
+Derived rule: `bar visible ⇔ (not Linux) ∧ (state ≠ FullScreen)`.
+
+**Validation**: FR-006 (rapid toggles converge) holds because visibility is derived from
+current state, never from transition history.
+
+### Pre-fullscreen window state (one field, main window only)
+
+- **Purpose**: the F11/menu exit path on Windows/Linux must return to the state the
+ window had before entering fullscreen (Maximized or Normal) — the app launches
+ Maximized, so restoring Normal would un-maximize unexpectedly.
+- **Type**: remembered `WindowState` (Normal/Maximized) or "unset"; lives only while
+ fullscreen, cleared on exit.
+- **Lifecycle**: set by the toggle command when entering fullscreen; consumed and cleared
+ when leaving. macOS-native entry/exit (green button) restores natively and never reads
+ this field.
+
+### Command catalog entry (existing catalog, one new row)
+
+| Field | Value |
+|---------|-------|
+| Id | `view.fullscreen` |
+| Title | Toggle Full Screen |
+| Category| View |
+| Gesture | `F11` (bare function key — no modifiers) |
+| Aliases | maximize, immersive, hide chrome |
+| Palette | listed (not hidden) |
+
+**Validation**: the palette smoke test requires the gesture to appear in
+Settings → Shortcuts; every catalog id must be bound in `MainWindow.Commands.cs`
+(missing binding throws at startup).
+
+## Relationships
+
+- Command entry (above) → drives `WindowState` → drives derived chrome state.
+- No relationships to engine, project data, settings, or persistence.
diff --git a/specs/002-fullscreen-hide-titlebar/plan.md b/specs/002-fullscreen-hide-titlebar/plan.md
new file mode 100644
index 00000000..d8cf39ac
--- /dev/null
+++ b/specs/002-fullscreen-hide-titlebar/plan.md
@@ -0,0 +1,121 @@
+# Implementation Plan: Hide the window title bar in fullscreen
+
+**Branch**: `002-fullscreen-hide-titlebar` | **Date**: 2026-10-12 | **Spec**: [spec.md](spec.md)
+
+**Input**: Feature specification from `/specs/002-fullscreen-hide-titlebar/spec.md`
+
+## Summary
+
+When any app window with Nota's custom chrome enters the OS fullscreen state, its 36 px
+title bar band and bottom hairline separator hide and the workspace extends to the top
+screen edge; leaving fullscreen restores the bar. Visibility is derived purely from the
+current window state (`bar visible ⇔ not Linux ∧ state ≠ FullScreen`). A new catalog
+command `view.fullscreen` ("Toggle Full Screen", F11) in the View menu gives Windows —
+which has no OS fullscreen gesture — an in-app entry point, reusing the one-definition
+menu/keyboard/palette/Shortcuts pipeline. UI-only: no engine, ABI, storage, or
+dependency changes. Research decisions: [research.md](research.md).
+
+## Nota: Read Before Planning
+
+Consult the matching source of truth before designing:
+
+- **Engine work** → [`ARCHITECTURE.md`](../../ARCHITECTURE.md): the AR rules table is binding (AR-4 lock-free queue, AR-5 immutable snapshots, AR-6 audio-thread restrictions, AR-7 pure C ABI, AR-9 `Transport` is the only source of musical time).
+- **UI work** → [`DESIGN.md`](../../DESIGN.md) (Ember design language) and the `nota-design` skill.
+- **A built-in instrument / audio or MIDI effect** → the `nota-instrument` skill (DSP class, kind registration across C++ and C#, device-card UI).
+- **Build / packaging** → [`BUILD.md`](../../BUILD.md).
+- **Anything** → [`CONTRIBUTING.md`](../../CONTRIBUTING.md): licensing, dependency policy, PR expectations.
+
+This feature is UI work only: no Ember palette changes (bars are hidden, not restyled),
+no new surfaces.
+
+## Technical Context
+
+**Language/Version**: C# / .NET 10 (`src/managed/`) — no C++ changes.
+
+**Primary Dependencies**: Avalonia 12.0.3 (existing; `WindowState`, `NativeMenu`,
+`GetObservable`). No NEW dependency.
+
+**Storage**: N/A.
+
+**Audio-Thread Impact** *(required — state explicitly)*: **None: UI-only change.** No
+engine call, no C ABI change, nothing crossing AR-4/AR-6; the window-state subscription
+lives entirely on the UI thread.
+
+**Testing**: `tests/Nota.SmokeTest` via `scripts/build.sh` — the palette/shortcuts
+consistency assertions automatically cover the new `F11` gesture and the
+every-catalog-id-bound check. Visual behaviour verified manually per
+[quickstart.md](quickstart.md) (real window managers needed).
+
+**Target Platform**: macOS, Windows, Linux desktops (all first-class here).
+
+**Project Type**: desktop-app (Avalonia) over the Nota C++ engine.
+
+**Performance Goals**: instantaneous chrome update on state change (one
+`IsVisible` toggle); no layout thrash beyond the natural DockPanel reflow.
+
+**Constraints**: maximized state must look exactly as today (app launches maximized);
+traffic lights / caption buttons stay operable in fullscreen (OS-owned overlay).
+
+**Scale/Scope**: `MainWindow` + `NotaWindow` base + command catalog/wiring + menu XAML +
+Shortcuts pane text + docs. ~6 source files touched.
+
+## Constitution Check
+
+*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*
+
+| Principle | Status | Notes |
+|-----------|--------|-------|
+| I. Real-Time Audio Safety | ✅ pass | UI-only; no audio-thread or queue changes (Audio-Thread Impact: none) |
+| II. Boundary Discipline | ✅ pass | C ABI untouched; `nota_engine.h` unchanged |
+| III. Licensing Hygiene | ✅ pass | No new files expected except spec docs; any new source file gets the standard SPDX header; no new dependency |
+| IV. Verification Gate | ✅ pass | `scripts/build.sh` runs the smoke test; new gesture covered by palette/shortcuts assertions; manual matrix in quickstart.md |
+| V. One Logical Change per PR | ✅ pass | Single purpose: fullscreen chrome hiding incl. its entry point |
+| VI. Documentation in Sync | ✅ pass | Tasks include CHANGELOG `[Unreleased]`, `nota-features` (FEATURES.md), `nota-shortcuts` (Shortcuts pane + docs page), `nota-docs` (EN/RU manual) |
+| VII. Spec-First | ✅ pass | Spec agreed (2026-10-12) before this plan |
+
+**Post-Phase-1 re-check**: design adds no entity, contract, or dependency beyond
+UI-internal state (see data-model.md, contracts/ui-contract.md) — all gates still pass.
+No Complexity Tracking table needed (no violations).
+
+## Project Structure
+
+### Documentation (this feature)
+
+```text
+specs/002-fullscreen-hide-titlebar/
+├── plan.md # This file (/speckit-plan command output)
+├── research.md # Phase 0 output (/speckit-plan command)
+├── data-model.md # Phase 1 output (/speckit-plan command)
+├── quickstart.md # Phase 1 output (/speckit-plan command)
+├── contracts/ # Phase 1 output (/speckit-plan command)
+│ └── ui-contract.md
+└── tasks.md # Phase 2 output (/speckit-tasks command - NOT created by /speckit-plan)
+```
+
+### Source Code (repository root)
+
+```text
+src/managed/
+├── Nota.App/
+│ ├── MainWindow.axaml # + NativeMenuItem "Toggle Full Screen" (View menu, Commands.Id)
+│ ├── MainWindow.axaml.cs # + WindowState subscription → TitleBar.IsVisible
+│ ├── MainWindow.Commands.cs # + B("view.fullscreen", ToggleFullscreen)
+│ ├── Commands.cs # ~ IsChord/wiring: allow bare F1–F12 as menu gestures
+│ └── NotaWindow.cs # + WindowState subscription → _chromeBar.IsVisible (non-Linux)
+├── Nota.Application/
+│ └── Palette/CommandCatalog.cs # + C("view.fullscreen", "Toggle Full Screen", "View", "F11", …)
+tests/Nota.SmokeTest/ # (no new file — palette assertions cover the gesture)
+```
+
+**Structure Decision**: the feature folds into the existing partial-class layout of
+`MainWindow` (state subscription near the existing Linux/extend-chrome ctor logic; the
+toggle handler beside the other View commands in `MainWindow.Commands.cs`). The only
+shared-code change is `NotaWindow`'s ctor subscription and the small `Commands.IsChord`
+widening — both already central to every window / menu item. No new projects, files, or
+folders beyond the spec docs above.
+
+## Complexity Tracking
+
+> **Fill ONLY if Constitution Check has violations that must be justified**
+
+No violations — table intentionally empty.
diff --git a/specs/002-fullscreen-hide-titlebar/quickstart.md b/specs/002-fullscreen-hide-titlebar/quickstart.md
new file mode 100644
index 00000000..bf8ec29a
--- /dev/null
+++ b/specs/002-fullscreen-hide-titlebar/quickstart.md
@@ -0,0 +1,66 @@
+# Quickstart: Validate "hide the title bar in fullscreen"
+
+**Feature**: specs/002-fullscreen-hide-titlebar | **Date**: 2026-10-12
+
+Runnable validation for the feature end-to-end. The visual assertions need a real OS
+desktop (fullscreen is window-manager behaviour); the automated gate is `scripts/build.sh`.
+
+## Prerequisites
+
+- Repo checked out on the feature branch; macOS build host (Linux/Windows siblings exist
+ for their checks).
+- Build once: `scripts/build.sh` (builds native + managed, runs the smoke test).
+
+## Automated gate (all platforms)
+
+```sh
+scripts/build.sh # macOS
+# scripts/build-linux.sh # Linux
+# scripts/build-win.ps1 # Windows
+```
+
+**Expected**: green, including the palette smoke test which now asserts that the new
+`F11` gesture for "Toggle Full Screen" is listed in Settings → Shortcuts (it fails with
+"shortcuts missing from Settings → Shortcuts: F11 (…)" if the pane was not updated).
+
+## Manual matrix (the real proof)
+
+### macOS (primary visual check)
+
+1. Launch the app (`scripts/build.sh` output or `dotnet run --project src/managed/Nota.App`).
+2. **Baseline**: window maximized (default) → 36 px title bar with centered project name
+ and hairline separator visible; transport sits below it.
+3. Click the green traffic light (or menu View → Toggle Full Screen):
+ - title bar band and separator are gone; workspace content reaches the top screen
+ edge; no leftover strip or second hairline;
+ - move the pointer to the top edge → traffic lights reveal and click (no dead zone).
+4. Leave fullscreen (green button / menu / ⌃⌘F as the OS provides):
+ - title bar and separator are back, title centered, bar draggable, double-click on
+ the bar still toggles maximize.
+5. Toggle rapidly 10× → bar visibility always matches the current state (no stuck
+ states).
+6. Fullscreen a secondary chrome window (e.g. About) → its bar hides; exit → restores.
+
+### Windows
+
+1. Run the app; press **F11** → window covers the whole screen including the taskbar,
+ no title bar/separator.
+2. Press **F11** again → returns to the *previous* state (maximized if it was maximized —
+ the app's default), title bar visible.
+3. Menu View → Toggle Full Screen does the same as F11; the menu shows the F11 gesture.
+
+### Linux
+
+1. Run the app → native frame as today (no custom bar), everything as before.
+2. If the WM provides fullscreen (e.g. via its own shortcut), enter/leave → no Nota
+ regression; F11/menu path also toggles.
+
+## Screenshot evidence (optional but recommended)
+
+Use the project's UI verify recipe (env-guarded in-app hook + `screencapture`) to capture
+before/after shots of the fullscreen transition for the PR description.
+
+## Success
+
+All scenarios above pass and match [ui-contract.md](contracts/ui-contract.md); spec
+acceptance scenarios 1–3 (Story 1) and Story 2/3 checks hold.
diff --git a/specs/002-fullscreen-hide-titlebar/research.md b/specs/002-fullscreen-hide-titlebar/research.md
new file mode 100644
index 00000000..7d07982b
--- /dev/null
+++ b/specs/002-fullscreen-hide-titlebar/research.md
@@ -0,0 +1,115 @@
+# Research: Hide the window title bar in fullscreen
+
+**Feature**: specs/002-fullscreen-hide-titlebar | **Date**: 2026-10-12
+
+Codebase facts established by inspection (no external dependencies involved):
+
+- `MainWindow` draws its custom chrome itself: `TitleBar` Border (36 px, hairline
+ bottom separator) in `MainWindow.axaml`, with `ExtendClientAreaToDecorationsHint = true`
+ and `ExtendClientAreaTitleBarHeightHint = 36` set in the ctor (macOS/Windows). On Linux
+ the ctor already sets `TitleBar.IsVisible = false` and keeps the native frame
+ (`MainWindow.axaml.cs:93-102`).
+- Secondary windows share `NotaWindow`; the shared 36 px chrome bar exists only in the
+ non-Linux branch (`_chromeBar`, `NotaWindow.cs:59-97`). `DeviceWindow` passes
+ `ownTitleBarHeight > 0` and draws its own bar — which is a *functional* toolbar
+ (preset picker, bypass, toggles), not pure chrome (`DeviceWindow.cs:168-195`).
+- No `WindowState.FullScreen` handling exists anywhere today; the only state logic is the
+ title-bar double-click Maximize toggle.
+- Command plumbing: `CommandCatalog.Create()` (id/title/category/gesture/aliases) →
+ `MainWindow.Commands.cs` binds handlers → `MainWindow.MenuKeys.cs` wires
+ `NativeMenuItem`s (`app:Commands.Id`) and auto-attaches gestures — **but only for
+ chords** (`Commands.IsChord`), because a bare typing key as a menu key equivalent would
+ swallow text input. On Windows/Linux `TryMenuShortcut` dispatches wired gestures;
+ on macOS AppKit fires them natively. `Commands.Parse` already parses "F11".
+- The palette smoke test asserts every catalog gesture is listed in
+ Settings → Shortcuts (`tests/Nota.SmokeTest/PaletteTests.cs:335`).
+- Avalonia version: **12.0.3** (`Nota.App.csproj`).
+
+## Decisions
+
+### D1 — Trigger: `WindowState.FullScreen` observation
+
+**Decision**: React to the window's `WindowState` property changing to/from
+`FullScreen`: `TitleBar.IsVisible = !OperatingSystem.IsLinux() && WindowState != FullScreen`
+(main window), `_chromeBar.IsVisible = WindowState != FullScreen` (NotaWindow). The
+DockPanel layout fills the freed band automatically; no other layout surgery.
+
+**Rationale**: The OS owns the fullscreen concept on every platform (macOS green button,
+Linux WM, programmatic on Windows). Observing the state covers every entry path —
+OS gesture or in-app command — and restore falls out for free. Repeated toggles converge
+because visibility is a pure function of current state, not of transition history
+(FR-006).
+
+**Alternatives considered**:
+- Listen to a "did enter fullscreen" event per platform — no such Avalonia abstraction;
+ `WindowState` is the single cross-platform source of truth.
+- Collapse the bar to height 0 instead of `IsVisible = false` — extra states for no gain;
+ Linux already uses `IsVisible = false`.
+
+### D2 — Windows/Linux entry point: `view.fullscreen` command + F11
+
+**Decision**: One new catalog command
+`C("view.fullscreen", "Toggle Full Screen", "View", "F11", "maximize immersive hide chrome")`,
+a `NativeMenuItem` in the View menu (`app:Commands.Id="view.fullscreen"`), bound to a
+handler that toggles `WindowState` between `FullScreen` and the remembered prior state
+(Maximized or Normal — the app starts Maximized, so exiting fullscreen must return to
+Maximized, not Normal). Allow bare function keys as menu gestures by widening
+`Commands.IsChord` (or the wiring condition) to accept `F1`–`F12` — function keys cannot
+swallow typing, which is the reason the chord-only rule exists. Then the existing
+`TryMenuShortcut` path dispatches F11 on Windows/Linux with no new key-handling code.
+
+**Rationale**: Reuses the established one-definition pipeline (menu + keyboard + palette
++ Shortcuts pane all read the catalog), so F11 shows in the menu automatically and the
+smoke test's gesture-listing check keeps the Shortcuts pane honest. The prior-state
+memory only lives in the command handler (a `WindowState?` field); macOS-native entry
+(green button) restores natively and needs no bookkeeping.
+
+**Alternatives considered**:
+- Bare F11 handled ad-hoc in `HandleKeyDown` (like the bare "0" clip toggle) — works, but
+ then the menu can't display the shortcut and the gesture rule stays chord-only forever.
+- A ⌘/Ctrl-chord instead of F11 — F11 is the platform convention for fullscreen and needs
+ no modifiers (safe: it types nothing).
+
+### D3 — Secondary windows: shared chrome hides; functional toolbars stay
+
+**Decision**: `NotaWindow` hides its shared `_chromeBar` on fullscreen (same state
+observation, non-Linux branch only). `DeviceWindow`'s own bar **stays visible**: it hosts
+live controls (preset picker, bypass, size toggles), so hiding it would remove
+functionality, not chrome. Spec FR-008/Story 3 is amended accordingly (pure title-bar
+chrome hides; functional toolbars remain) — a plan-level refinement, flagged to the user.
+
+**Rationale**: FR-005's spirit ("controls remain reachable") extends to a device window's
+own controls; its bar is a toolbar that happens to carry the device name, unlike
+About/What's New/Save-changes windows whose bar is pure chrome.
+
+**Alternatives considered**: Hide the device bar too — would hide the preset picker and
+bypass in fullscreen, strictly worse; a "relocate controls" redesign is out of scope.
+
+### D4 — macOS: no new entry surface beyond the shared menu item
+
+**Decision**: The `view.fullscreen` menu item exists on all platforms (uniform menu), but
+macOS keeps the green button / system gestures as the primary path, per the spec. The
+handler toggling `WindowState.FullScreen` is identical everywhere.
+
+**Rationale**: Spec decision (Q2). A uniform menu avoids platform-conditional XAML; plain
+F11 rarely reaches apps on macOS (media-key default) so there is no conflict.
+
+### D5 — Verification path
+
+**Decision**: Visual verification on macOS via the in-app verify recipe (screencapture
+before/after entering fullscreen — per the `nota-ui-verify` memory), Windows check via a
+Windows build (F11 + menu), Linux check for no-regression (native frame path already
+hides the bar). `scripts/build.sh` green incl. the palette smoke test, which
+automatically asserts the new F11 gesture is listed in Settings → Shortcuts (update the
+Shortcuts pane accordingly — `nota-shortcuts` skill). Manual/headless: `WindowState`
+transitions are real-OS behaviour; no headless simulation — quickstart covers the manual
+matrix.
+
+**Rationale**: The change is pure UI chrome; the existing end-to-end gate plus the
+catalog/shortcuts consistency assertion cover the automatable part; the visual outcome
+needs eyes on each OS.
+
+## Summary of resolved unknowns
+
+No NEEDS CLARIFICATION markers remain in the plan. All decisions above are grounded in
+the inspected code; no new dependencies, no engine/ABI changes, no storage.
diff --git a/specs/002-fullscreen-hide-titlebar/spec.md b/specs/002-fullscreen-hide-titlebar/spec.md
new file mode 100644
index 00000000..cce3a3b2
--- /dev/null
+++ b/specs/002-fullscreen-hide-titlebar/spec.md
@@ -0,0 +1,191 @@
+# Feature Specification: Hide the window title bar in fullscreen
+
+**Feature Branch**: `002-fullscreen-hide-titlebar`
+
+**Created**: 2026-10-12
+
+**Status**: Draft
+
+**Input**: User description: "При разворачивании окна в полный экран (на любой ОС) скрывать заголовок окна с разделителем — When the window enters fullscreen on any OS, hide the window title bar and its separator; show it again on exit"
+
+## User Scenarios & Testing *(mandatory)*
+
+### User Story 1 - Title bar vanishes in fullscreen and returns on exit (Priority: P1)
+
+A producer working in Nota enters the OS fullscreen mode (for example the macOS green
+window button). Today the slim custom title bar — the 36-px band with the centered
+project name and the hairline separator under it — stays visible at the top and wastes
+vertical space. With this feature, the moment the window enters fullscreen the title bar
+band and its separator disappear, and the workspace content extends all the way to the
+top edge of the screen for a distraction-free, full-bleed view. When the user leaves
+fullscreen, the title bar and separator come back exactly as they were: centered project
+name, draggable area, separator line.
+
+**Why this priority**: This is the entire point of the request — reclaiming the title bar's
+space in fullscreen. Everything else is reach or consistency.
+
+**Independent Test**: Enter fullscreen on any supported OS and visually confirm the top
+band and separator are gone and content reaches the top edge; leave fullscreen and
+confirm the title bar is back. Deliverable on its own.
+
+**Acceptance Scenarios**:
+
+1. **Given** the main window in normal or maximized state, **When** the user enters the OS
+ fullscreen mode, **Then** the custom title bar band and its bottom separator are hidden
+ and the workspace fills the freed space up to the top edge of the screen.
+2. **Given** the main window in fullscreen with the title bar hidden, **When** the user
+ leaves fullscreen, **Then** the title bar and separator are visible again with the same
+ appearance as before entering fullscreen (centered project name, drag behaviour).
+3. **Given** the main window in fullscreen, **When** the project is renamed or switched,
+ **Then** no title remnant appears at the top; the restored title bar (after exit) shows
+ the current project name.
+
+---
+
+### User Story 2 - The behaviour works on every supported OS (Priority: P2)
+
+The user asked for this on "any OS". On macOS fullscreen is reachable through the green
+window control; on Linux the OS-drawn frame already hides itself in native fullscreen.
+Windows has no built-in fullscreen gesture for a regular desktop window, and Nota today
+ships no way to enter fullscreen there — so on Windows the feature would be unreachable
+unless the app provides an entry point.
+
+**Why this priority**: The core visual change (Story 1) already covers macOS and Linux;
+this story makes the promise true on Windows and is what the user explicitly asked for
+("на любой ОС").
+
+**Independent Test**: On Windows, invoke the new fullscreen entry point and observe the
+same hide/restore behaviour as on macOS; toggle back and forth repeatedly.
+
+**Acceptance Scenarios**:
+
+1. **Given** Nota running on Windows, **When** the user triggers the fullscreen entry
+ point (View menu command or F11), **Then** the window covers the entire screen
+ (including where the taskbar was) and the title bar and separator are hidden.
+2. **Given** Nota fullscreened on Windows, **When** the user triggers the entry point
+ again (or the window otherwise leaves fullscreen), **Then** the window returns to its
+ previous state with the title bar visible.
+3. **Given** Nota running on Linux in native fullscreen, **When** the user enters and
+ leaves fullscreen, **Then** the app shows no regression (the OS frame handles its own
+ title bar; no custom bar appears).
+
+---
+
+### User Story 3 - Secondary windows behave consistently (Priority: P3)
+
+Secondary Nota windows (About, What's New, dialogs) share the same custom chrome family:
+a slim title bar with a hairline separator on macOS/Windows. If a user fullscreens one
+of them, its title bar should hide the same way, so every window in the app reads as one
+family. The device pop-out window's top band is a functional toolbar (preset picker,
+bypass, size toggles) rather than pure chrome, so it stays.
+
+**Why this priority**: Rare flow — users seldom fullscreen secondary windows — but cheap
+to cover since the windows share the same chrome, and inconsistency would look broken.
+
+**Independent Test**: Fullscreen a secondary chrome window (e.g. About) on macOS and
+confirm its title bar band and separator hide and restore like the main window's.
+
+**Acceptance Scenarios**:
+
+1. **Given** a secondary window with custom chrome in normal state, **When** the user
+ enters fullscreen, **Then** its title bar band and separator hide.
+2. **Given** a secondary window in fullscreen, **When** the user leaves fullscreen,
+ **Then** its title bar and separator restore.
+
+---
+
+### Edge Cases
+
+- **Maximized is not fullscreen**: the app starts maximized by default; in maximized
+ state the title bar and separator stay visible. Confirmed with the user: only the OS
+ fullscreen state hides the bar; maximized never does.
+- **macOS traffic lights**: in macOS fullscreen the close/minimize/zoom controls
+ auto-reveal on hover near the top edge; hiding the title bar must not block them or
+ leave a dead zone that swallows their clicks.
+- **Rapid toggling**: entering and leaving fullscreen quickly (or during a window
+ animation) must not leave the title bar stuck hidden or stuck visible, nor duplicate
+ separators.
+- **Where does the project name go?** In fullscreen the centered project name disappears
+ along with the bar — it is not relocated anywhere else; it returns on exit. (Assumption;
+ see Assumptions.)
+- **Window dragging**: the title bar is the drag area in windowed states; in fullscreen
+ dragging is not applicable, and after leaving fullscreen dragging by the restored bar
+ works again.
+- **Launch state**: fullscreen is not persisted as a special case by this feature — the
+ window simply renders per its current state at launch (title bar hidden only while
+ actually fullscreened).
+
+## Requirements *(mandatory)*
+
+### Functional Requirements
+
+- **FR-001**: When the main window enters the OS fullscreen state, the system MUST hide
+ the custom title bar band (including the centered project name) and its bottom
+ separator, and extend the workspace content into the freed space to the top edge of
+ the screen.
+- **FR-002**: When the main window leaves the fullscreen state, the system MUST restore
+ the title bar and separator to their pre-fullscreen appearance and behaviour
+ (centered project name, drag area, separator).
+- **FR-003**: The hide/restore behaviour MUST apply on macOS, Windows, and Linux. On
+ Linux (where the OS draws the window frame) the requirement is no regression: the
+ native frame's own handling stays intact.
+- **FR-004**: The title bar MUST remain visible in normal and maximized window states;
+ only the fullscreen state hides it.
+- **FR-005**: In fullscreen, OS window controls (e.g., the macOS traffic lights) MUST
+ remain operable and reachable; hiding the title bar MUST not block pointer input to
+ them.
+- **FR-006**: The window state transition handling MUST be robust to rapid repeated
+ fullscreen/windowed toggles: the title bar visibility always matches the current
+ window state after a transition completes.
+- **FR-007**: On Windows, users MUST be able to enter and leave fullscreen from within
+ the app via a View menu command and the F11 keyboard shortcut, so the feature is
+ reachable on that OS. macOS and Linux keep their existing OS fullscreen mechanisms;
+ no new entry point is added there.
+- **FR-008**: Secondary Nota windows whose top band is pure title-bar chrome (About,
+ What's New, save-changes dialog, …) MUST hide and restore that band and its separator
+ on fullscreen transitions the same way as the main window. A secondary window whose
+ top band is a functional toolbar (the device pop-out window's preset/bypass bar) keeps
+ it in fullscreen — hiding it would remove live controls, not chrome.
+- **FR-009**: The feature is purely a window-chrome/presentation change: it MUST NOT
+ touch the audio engine, the C ABI, or playback behaviour in any way.
+
+### Key Entities
+
+Not applicable — this is a window-presentation behaviour with no new data entities. (The
+only implicit state is the window's current display state — windowed / maximized /
+fullscreen — which the OS already owns.)
+
+## Success Criteria *(mandatory)*
+
+### Measurable Outcomes
+
+- **SC-001**: On each supported OS, entering fullscreen shows no title bar band or
+ separator and content reaches the top screen edge within the window's transition (no
+ leftover strip, no flash of the old bar after the transition settles).
+- **SC-002**: Toggling fullscreen 10 times in a row leaves the title bar correctly
+ restored on every exit (visible, correctly styled, draggable) — no stuck states, no
+ duplicated separators.
+- **SC-003**: Behaviour in normal and maximized states is unchanged from before the
+ feature (title bar visible, double-click title bar still toggles maximize, project
+ name centered).
+- **SC-004**: OS window controls remain usable in fullscreen on macOS (traffic lights
+ reveal and respond to clicks); no dead click zones appear along the top edge.
+- **SC-005**: All pre-existing window, playback, and smoke-test behaviour passes exactly
+ as before the change.
+
+## Assumptions
+
+- "Полный экран" (fullscreen) means the OS fullscreen display state — the mode entered
+ via the macOS green button / Enter Full Screen — and NOT the maximized window state.
+ The app starts maximized, and the title bar is expected to stay in maximized state.
+ Confirmed with the user.
+- The centered project name is not relocated while fullscreened; it simply hides with
+ the bar and returns on exit. If users later want the name visible in fullscreen, that
+ is a separate follow-up.
+- Fullscreen itself is entered through the OS mechanisms (macOS green button/menu) plus
+ an in-app entry point on Windows (Q2); this feature does not change how fullscreen is
+ entered on macOS/Linux, only what the app's own chrome does in response.
+- No persistence of "was fullscreen" is added by this feature beyond whatever the
+ OS/windowing layer already does.
+- Scope is the desktop app's window chrome; audio engine, project data, and file formats
+ are untouched.
diff --git a/specs/002-fullscreen-hide-titlebar/tasks.md b/specs/002-fullscreen-hide-titlebar/tasks.md
new file mode 100644
index 00000000..2fa5d01d
--- /dev/null
+++ b/specs/002-fullscreen-hide-titlebar/tasks.md
@@ -0,0 +1,186 @@
+# Tasks: Hide the window title bar in fullscreen
+
+**Input**: Design documents from `/specs/002-fullscreen-hide-titlebar/`
+
+**Prerequisites**: plan.md (required), spec.md (required for user stories), research.md, data-model.md, contracts/
+
+**Tests**: Not requested — no dedicated test tasks. The existing smoke test covers the
+new gesture automatically (PaletteTests asserts every catalog gesture is listed in
+Settings → Shortcuts); visual verification follows quickstart.md.
+
+**Organization**: Tasks are grouped by user story to enable independent implementation and testing of each story.
+
+## Format: `[ID] [P?] [Story] Description`
+
+- **[P]**: Can run in parallel (different files, no dependencies)
+- **[Story]**: Which user story this task belongs to (e.g. US1, US2, US3)
+- Include exact file paths in descriptions
+
+## Path Conventions
+
+- **Managed app (C#)**: `src/managed/Nota.App/`, `src/managed/Nota.Application/`
+- **Tests**: `tests/Nota.SmokeTest/` — the end-to-end gate every PR must pass
+- Docs: `CHANGELOG.md`, `FEATURES.md`, `../nota-docs/` (sibling repo)
+
+---
+
+## Phase 1: Setup (Shared Infrastructure)
+
+**Purpose**: Project initialization and basic structure
+
+No setup tasks — the change folds into the existing solution; no new project, file, or
+configuration is needed (plan.md § Project Structure).
+
+---
+
+## Phase 2: Foundational (Blocking Prerequisites)
+
+**Purpose**: Core infrastructure that MUST be complete before ANY user story
+
+No foundational tasks — the three user stories touch disjoint code paths (MainWindow
+state subscription / command pipeline / NotaWindow base) and are independently
+implementable, as the spec requires.
+
+**Checkpoint**: user story implementation can begin immediately.
+
+---
+
+## Phase 3: User Story 1 - Title bar vanishes in fullscreen and returns on exit (Priority: P1) 🎯 MVP
+
+**Goal**: Main window's custom title bar band + hairline separator hide when the OS
+fullscreen state is entered, content fills to the top edge; both restore on exit.
+
+**Independent Test**: On macOS, click the green traffic light → bar + separator gone,
+content reaches the top edge; leave fullscreen → bar back, draggable, double-click still
+maximizes (quickstart.md § macOS steps 2–5).
+
+### Implementation for User Story 1
+
+- [x] T001 [US1] Subscribe to window-state changes in `src/managed/Nota.App/MainWindow.axaml.cs` (ctor, next to the existing Linux/extend-chrome block at ~lines 93–102): on every `WindowState` change set `TitleBar.IsVisible = !OperatingSystem.IsLinux() && WindowState != WindowState.FullScreen`. Derived rule only — never track transitions (spec FR-006 rapid-toggle convergence). Linux keeps today's always-hidden behaviour; maximized/normal keep the bar (spec FR-004, decision Q1).
+- [x] T002 [US1] Verify US1 per quickstart.md § macOS (steps 2–5): green-button enter/leave, 10× rapid toggles, traffic lights reveal on hover at the top edge, drag + double-click-maximize unchanged after exit. Fix any regression found (same file).
+
+**Checkpoint**: User Story 1 fully functional and independently testable (MVP delivered).
+
+---
+
+## Phase 4: User Story 2 - The behaviour works on every supported OS (Priority: P2)
+
+**Goal**: A `view.fullscreen` command ("Toggle Full Screen", F11) in the View menu gives
+Windows (no OS gesture) an in-app fullscreen entry; menu/keyboard/palette/Shortcuts all
+share the one catalog definition.
+
+**Independent Test**: On Windows, F11 and View → Toggle Full Screen enter/leave
+fullscreen; the window returns to its previous state (Maximized if maximized — the app
+default); the View menu shows the F11 gesture (quickstart.md § Windows).
+
+### Implementation for User Story 2
+
+- [x] T003 [US2] Add the catalog row in `src/managed/Nota.Application/Palette/CommandCatalog.cs` (View section, after `view.midiLearn` / before the palette entry): `C("view.fullscreen", "Toggle Full Screen", "View", "F11", "maximize immersive hide chrome")` — exact id/title/gesture per contracts/ui-contract.md.
+- [x] T004 [P] [US2] Add the menu item in `src/managed/Nota.App/MainWindow.axaml` View menu, alongside the other View toggles (after "Toggle sections", keeping the separator structure tidy): `<NativeMenuItem Header="Toggle Full Screen" app:Commands.Id="view.fullscreen"/>`.
+- [x] T005 [P] [US2] Bind the handler in `src/managed/Nota.App/MainWindow.Commands.cs` (View block): `B("view.fullscreen", ToggleFullscreen);` plus a private `ToggleFullscreen()` — enter: remember current `WindowState` (field, cleared on exit); toggle `WindowState.FullScreen` ⇄ remembered state (Maximized/Normal; never a surprising un-maximize). macOS-native entry (green button) restores natively and never reads the field (research.md D2).
+- [x] T006 [P] [US2] Allow bare function keys as menu gestures: add `CanMenuGesture(string glyphs)` (true for chords OR a bare `F1`–`F12` token — function keys can't swallow typing, the reason `IsChord` is chord-only) in `src/managed/Nota.App/Commands.cs`, and use it in place of `Commands.IsChord(cmd.Gesture)` at `src/managed/Nota.App/MainWindow.MenuKeys.cs:42`. Existing bare "0"/"Space" gestures must stay unwired as menu equivalents.
+- [x] T007 [P] [US2] Add the Shortcuts pane row in `src/managed/Nota.App/PreferencesWindow.cs` `ShortcutGroups` (~line 989; TRANSPORT group or a WINDOW row near FILE — match surrounding style): `("F11", "Enter / leave full screen — the title bar hides in full screen")`. Without it `tests/Nota.SmokeTest/PaletteTests.cs` fails with "shortcuts missing from Settings → Shortcuts: F11".
+
+**Checkpoint**: Stories 1 AND 2 both work independently (US2's command toggles the state US1 reacts to, but each is testable alone).
+
+---
+
+## Phase 5: User Story 3 - Secondary windows behave consistently (Priority: P3)
+
+**Goal**: `NotaWindow` dialog family (About, What's New, save-changes, …) hides its
+shared chrome bar in fullscreen like the main window.
+
+**Independent Test**: Fullscreen About (macOS green button) → its bar + hairline hide;
+exit → restore (quickstart.md § macOS step 6).
+
+### Implementation for User Story 3
+
+- [x] T008 [US3] In `src/managed/Nota.App/NotaWindow.cs`, inside the non-Linux custom-chrome branch of the ctor (where `_chromeBar` is built, ~lines 59–97): subscribe to `WindowState` and set `_chromeBar.IsVisible = WindowState != WindowState.FullScreen`. Do NOT touch `DeviceWindow` — its own top band is a functional toolbar (presets/bypass) and stays (spec FR-008, research.md D3).
+
+**Checkpoint**: All user stories independently functional.
+
+---
+
+## Phase 6: Polish & Cross-Cutting Concerns
+
+**Purpose**: Improvements that affect multiple user stories
+
+- [x] T009 Run `scripts/build.sh` (or `scripts/build-linux.sh` / `scripts/build-win.ps1`) until native + managed + smoke test are green (includes the F11/Shortcuts consistency assertion from T007).
+- [ ] T010 (needs a real desktop) Run the quickstart.md manual matrix on the platforms available (macOS primary; Windows for F11/menu; Linux no-regression).
+- [x] T011 [P] Documentation sync: `CHANGELOG.md` `[Unreleased]` entry (user-visible change); FEATURES.md via the `nota-features` skill; nota-docs pages (EN + RU) via the `nota-docs` skill; regenerate the shortcuts docs page via the `nota-shortcuts` skill (new F11 binding).
+
+### Nota closing tasks *(always include — these are the PR gates)*
+
+- [x] T012 `scripts/build.sh` green — covered by T009; re-run after any later fix.
+- [x] T013 AGPL-3.0-only SPDX two-line header on every new source file — N/A expected (edits only in existing files); verify none was created.
+- [x] T014 New dependency, if any: license checked + row added to `LICENSES/third-party.md` — N/A (none).
+- [x] T015 Engine behaviour change → extend `tests/Nota.SmokeTest` to cover it — N/A (UI-only, FR-009; the palette gesture assertion already extends coverage to the new command).
+
+---
+
+## Dependencies & Execution Order
+
+### Phase Dependencies
+
+- **Setup (Phase 1)**: none exist — skipped.
+- **Foundational (Phase 2)**: none exist — skipped.
+- **User Stories (Phases 3–5)**: independent of each other; sequential in priority order (US1 → US2 → US3) is natural for one implementer.
+- **Polish (Phase 6)**: after all desired stories complete.
+
+### User Story Dependencies
+
+- **US1 (P1)**: no dependencies — start here (MVP).
+- **US2 (P2)**: no hard dependency on US1 (the command works standalone; the bar only hides once US1 lands). Within US2: T003 first, then T004–T007 in parallel (different files).
+- **US3 (P3)**: no dependencies on US1/US2.
+
+### Within Each User Story
+
+- Catalog/definition before wiring (T003 → T004–T007).
+- Derived-state logic before manual verification (T001 → T002).
+
+### Parallel Opportunities
+
+- T004, T005, T006, T007 all touch different files after T003 lands.
+- US1 (MainWindow) and US2 (catalog/menu/commands) could proceed in parallel by two implementers.
+
+---
+
+## Parallel Example: User Story 2
+
+```bash
+# After T003 (catalog row) lands, launch together:
+Task: "Add the menu item in src/managed/Nota.App/MainWindow.axaml" # T004
+Task: "Bind handler + state memory in MainWindow.Commands.cs" # T005
+Task: "CanMenuGesture in Commands.cs + MenuKeys wiring" # T006
+Task: "Shortcuts pane row in PreferencesWindow.cs" # T007
+```
+
+---
+
+## Implementation Strategy
+
+### MVP First (User Story 1 Only)
+
+1. Complete Phase 3 (US1): T001 → T002 — the core request, demoable on macOS.
+2. Then Phase 4 (US2) for the "any OS" promise, Phase 5 (US3) for consistency.
+3. Phase 6 gates the PR.
+
+### Incremental Delivery
+
+Each story is a shippable increment: US1 alone already delivers the user-visible ask on
+macOS/Linux; US2 makes it true on Windows; US3 polishes the window family.
+
+---
+
+## Notes
+
+- [P] tasks = different files, no dependencies
+- [Story] label maps task to specific user story for traceability
+- The user makes the commits (project convention) — leave changes staged in the working tree for review
+- Avoid: vague tasks, same file conflicts, cross-story dependencies that break independence
+
+---
+
+## Phase 7: Convergence
+
+- [x] T016 Dispatch F11 on Windows/Linux: bare function keys never reach TryMenuShortcut — the call at src/managed/Nota.App/MainWindow.Input.cs:305 is gated on a modifier (`mod &&`). Add a bare F1–F12 branch that also runs TryMenuShortcut (today F11 is the only such menu gesture, so the Session grid's F2 handling is unaffected), then verify headlessly by raising a KeyEventArgs for F11 on MainWindow and asserting WindowState toggles per FR-007 (partial)
diff --git a/src/managed/Nota.App/Commands.cs b/src/managed/Nota.App/Commands.cs
index 8f1e6f27..0b528536 100644
--- a/src/managed/Nota.App/Commands.cs
+++ b/src/managed/Nota.App/Commands.cs
@@ -49,7 +49,14 @@ public sealed class Commands : AvaloniaObject
return key == Key.None ? null : new KeyGesture(key, mods);
}
- /// <summary>True for a shortcut with a modifier — the only kind a menu item may carry (a
- /// bare Space or 0 as a menu key equivalent would swallow typing).</summary>
+ /// <summary>True for a shortcut with a modifier (⌘S, ⌥⌘S). Bare letter/digit keys stay
+ /// out of menus — a bare Space or 0 as a menu key equivalent would swallow typing.</summary>
public static bool IsChord(string glyphs) => glyphs.IndexOfAny(['⌘', '⌃', '⌥']) >= 0;
+
+ /// <summary>True for a shortcut a menu item may carry: a chord, or a bare function key
+ /// (F11) — function keys type nothing, so unlike a bare letter/digit they can't
+ /// swallow text input.</summary>
+ public static bool CanMenuGesture(string glyphs) =>
+ IsChord(glyphs) || (glyphs.Length > 1 && glyphs[0] == 'F'
+ && int.TryParse(glyphs[1..], out int n) && n is >= 1 and <= 12);
}
diff --git a/src/managed/Nota.App/MainWindow.Commands.cs b/src/managed/Nota.App/MainWindow.Commands.cs
index 6afe1075..bc99263e 100644
--- a/src/managed/Nota.App/MainWindow.Commands.cs
+++ b/src/managed/Nota.App/MainWindow.Commands.cs
@@ -8,6 +8,7 @@
using System;
using System.Linq;
+using Avalonia.Controls;
using Avalonia.Interactivity;
using Microsoft.Extensions.DependencyInjection;
using Nota.Application;
@@ -81,6 +82,7 @@ public partial class MainWindow
});
B("view.history", () => Browser.ShowHistory());
B("view.midiLearn", ToggleMidiLearn);
+ B("view.fullscreen", ToggleFullscreen);
r.Bind(CommandCatalog.Palette, (c, _) => TogglePalette(c.Window as Avalonia.Controls.Window));
// ---- Transport
@@ -144,6 +146,25 @@ public partial class MainWindow
win.Show(this);
}
+ // View ▸ Toggle Full Screen. The state to return to is remembered on the way in —
+ // the app usually runs maximized, so leaving fullscreen must not un-maximize.
+ // macOS-native entry (the green button) restores natively and never reads this.
+ private WindowState? _stateBeforeFullscreen;
+
+ private void ToggleFullscreen()
+ {
+ if (WindowState == WindowState.FullScreen)
+ {
+ WindowState = _stateBeforeFullscreen ?? WindowState.Maximized;
+ _stateBeforeFullscreen = null;
+ }
+ else
+ {
+ _stateBeforeFullscreen = WindowState == WindowState.Normal ? WindowState.Normal : WindowState.Maximized;
+ WindowState = WindowState.FullScreen;
+ }
+ }
+
// Edit ▸ Lock Envelopes: the engine flag and the menu checkmark move together.
private void ToggleLockEnvelopes()
{
diff --git a/src/managed/Nota.App/MainWindow.Input.cs b/src/managed/Nota.App/MainWindow.Input.cs
index 0ab9dcc5..8d290b42 100644
--- a/src/managed/Nota.App/MainWindow.Input.cs
+++ b/src/managed/Nota.App/MainWindow.Input.cs
@@ -301,8 +301,9 @@ public partial class MainWindow
return;
}
- // Nothing above took it: the menu's shortcuts (Ctrl+S, Ctrl+Z…) on Windows / Linux.
- if (mod && TryMenuShortcut(e))
+ // Nothing above took it: the menu's shortcuts (Ctrl+S, Ctrl+Z…) on Windows / Linux —
+ // plus bare function keys (F11 = full screen), the one modifier-less menu gesture.
+ if ((mod || e.Key is >= Key.F1 and <= Key.F12) && TryMenuShortcut(e))
{
e.Handled = true;
return;
diff --git a/src/managed/Nota.App/MainWindow.MenuKeys.cs b/src/managed/Nota.App/MainWindow.MenuKeys.cs
index 3ff3ef61..d9a7fcf9 100644
--- a/src/managed/Nota.App/MainWindow.MenuKeys.cs
+++ b/src/managed/Nota.App/MainWindow.MenuKeys.cs
@@ -39,7 +39,7 @@ public partial class MainWindow
item.Click += (_, _) => _commands.Run(id);
// Settings… keeps ⌘, on the app menu (App.axaml) on macOS; one key, one item.
bool appMenuOwnsIt = OperatingSystem.IsMacOS() && id == "prefs.open";
- if (Commands.IsChord(cmd.Gesture) && !appMenuOwnsIt && Commands.Parse(cmd.Gesture) is { } g)
+ if (Commands.CanMenuGesture(cmd.Gesture) && !appMenuOwnsIt && Commands.Parse(cmd.Gesture) is { } g)
{
item.Gesture = g;
if (!OperatingSystem.IsMacOS()) _menuShortcuts.Add(item);
diff --git a/src/managed/Nota.App/MainWindow.axaml b/src/managed/Nota.App/MainWindow.axaml
index cf1f93d8..364b7f82 100644
--- a/src/managed/Nota.App/MainWindow.axaml
+++ b/src/managed/Nota.App/MainWindow.axaml
@@ -70,6 +70,7 @@
<NativeMenuItem Header="Toggle detail panel" app:Commands.Id="view.toggleDetail"/>
<NativeMenuItem Header="Toggle overview" app:Commands.Id="view.toggleOverview"/>
<NativeMenuItem Header="Toggle sections" app:Commands.Id="view.toggleSections"/>
+ <NativeMenuItem Header="Toggle Full Screen" app:Commands.Id="view.fullscreen"/>
<NativeMenuItemSeparator/>
<!-- Header text is matched from code to keep this checkmark in step with the
transport bar's Follow button — see MainWindow.SetFollowPlayhead. -->
diff --git a/src/managed/Nota.App/MainWindow.axaml.cs b/src/managed/Nota.App/MainWindow.axaml.cs
index a715511f..bfd57d0e 100644
--- a/src/managed/Nota.App/MainWindow.axaml.cs
+++ b/src/managed/Nota.App/MainWindow.axaml.cs
@@ -119,6 +119,19 @@ public partial class MainWindow : Window
}
}
+ // Fullscreen hides the custom bar: the 36-px band and its separator vanish and the
+ // workspace fills the top edge; leaving fullscreen restores them. A pure function
+ // of the current state — never of transitions — so rapid toggles converge. Maximized
+ // keeps the bar (the app launches maximized); Linux never shows it (native frame).
+ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
+ {
+ base.OnPropertyChanged(change);
+ // XAML sets WindowState before the named controls exist (InitializeComponent),
+ // hence the null guard; the default bar visibility already matches non-fullscreen.
+ if (change.Property == WindowStateProperty && TitleBar is { } bar)
+ bar.IsVisible = !OperatingSystem.IsLinux() && WindowState != WindowState.FullScreen;
+ }
+
// Custom frameless title bar (Phase 2): drag the window by its top bar; a
// The factory drum kits ship as recipes, not audio: synthesize whatever is missing
// (first run, or after an update changed a kit) off the UI thread, then refresh the
diff --git a/src/managed/Nota.App/NotaWindow.cs b/src/managed/Nota.App/NotaWindow.cs
index 8f3529d5..015d302e 100644
--- a/src/managed/Nota.App/NotaWindow.cs
+++ b/src/managed/Nota.App/NotaWindow.cs
@@ -140,5 +140,15 @@ public abstract class NotaWindow : Window
BeginMoveDrag(e);
}
+ // Fullscreen hides the shared bar: dialogs join the main window's full-bleed look,
+ // leaving fullscreen restores it. (A subclass's own functional toolbar — the device
+ // window's preset bar — draws itself and stays.) Linux never builds the bar at all.
+ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
+ {
+ base.OnPropertyChanged(change);
+ if (change.Property == WindowStateProperty && _chromeBar is { } bar)
+ bar.IsVisible = WindowState != WindowState.FullScreen;
+ }
+
private IBrush? Res(string key) => this.TryFindResource(key, out var v) && v is IBrush b ? b : null;
}
diff --git a/src/managed/Nota.App/PreferencesWindow.cs b/src/managed/Nota.App/PreferencesWindow.cs
index 0103451b..afecbd78 100644
--- a/src/managed/Nota.App/PreferencesWindow.cs
+++ b/src/managed/Nota.App/PreferencesWindow.cs
@@ -996,6 +996,10 @@ public sealed partial class PreferencesWindow : NotaWindow
("⌘⇧E", "Export audio"),
("⌘,", "Settings"),
}),
+ ("WINDOW", new[]
+ {
+ ("F11", "Enter / leave full screen — the title bar hides in full screen"),
+ }),
("COMMAND PALETTE", new[]
{
("⌘⇧P", "Open / close the command palette — from any window, even while typing"),
diff --git a/src/managed/Nota.Application/Palette/CommandCatalog.cs b/src/managed/Nota.Application/Palette/CommandCatalog.cs
index 47ae6176..1f544787 100644
--- a/src/managed/Nota.Application/Palette/CommandCatalog.cs
+++ b/src/managed/Nota.Application/Palette/CommandCatalog.cs
@@ -62,6 +62,7 @@ public static class CommandCatalog
C("view.automation", "Toggle Automation Mode", "View", "⌘⇧A", "envelopes lanes", view: "Arrangement"),
C("view.history", "Show Version History", "View", "", "undo history versions snapshots"),
C("view.midiLearn", "MIDI Learn", "View", "", "map controller"),
+ C("view.fullscreen", "Toggle Full Screen", "View", "F11", "maximize immersive hide chrome"),
C(Palette, "Command Palette", "View", "⌘⇧P", "search", hide: true),
// ---- Transport --------------------------------------------------------------------