Nota — a free DAW for macOS, Windows and Linux. No subscription, no account — just open it and make music.
C# audioaudio-unitavaloniacpp20cross-platformdawdigital-audio-workstationdspjucelinux-audiomcp-servermidimusicmusic-productionpiano-rollplugin-hostsequencersynthesizervstvst3
(feat) Open the detail panel on double-click, not on every selection (#308) (#428)
Egor Khindikaynen633fc69266a7
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 06ba4fce..38e30d35 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -125,6 +125,14 @@ Entry categories: `Added`, `Changed`, `Fixed`, `Removed`.the same way.### Changed+- **The detail panel opens on double-click, not on every selection** (#308): clicking a+ track, a clip, a mixer strip or a Session slot now only selects it, so the arrangement keeps+ its height on a small screen. While the panel is open it still follows the selection as+ before. Double-click a track header to open its devices, or a clip or a filled Session slot+ to open it in the Clip tab; View → Toggle detail panel and Show devices still open it too.+ Double-clicking an instrument track's header no longer opens the plug-in's window — use+ **Open editor** on the plug-in's card in Devices. To get the old behaviour back, turn on+ **Open the detail panel when you select a track or clip** in Settings → Appearance.- **Aurora envelope boxes have knobs and drag** — the A, D, S and R boxes under each Envgraph now each carry a small knob, and the box itself is a drag value: drag it up or down(Shift for fine steps), or double-click anywhere on it to type an exact value. The graphdiff --git a/FEATURES.md b/FEATURES.mdindex fde9fdb8..d9b7ed8c 100644--- a/FEATURES.md+++ b/FEATURES.md@@ -1305,6 +1305,12 @@ audio effects after it keep running and keep their settings; saved with the proja Nota Rhythm voice): the title bar carries the device, track, preset picker, bypass andS / L size switch; a footer shows where the device sits, its live voice count and type.- **Edit Tags** — the browser's tag editor.+- **Detail panel (Devices / Pattern / Clip)** — opens on a double-click: a track header shows+ its devices, a clip or a filled Session slot opens in the Clip tab; also View → Toggle+ detail panel and Show devices. A plain click on a track, clip, mixer strip or slot only+ selects; an open panel follows the selection. A plug-in instrument's own window opens+ from **Open editor** on its card. Settings → Appearance → **Open the detail panel when+ you select a track or clip** makes every selection open it.- **Devices/Clip panel in its own window** — the ⧉ button in the bottom panel's headerdetaches it (the selected clip's piano roll on top, the device chain below, both atonce). The content moves across as-is: edits, meters and graphs all keep working live.@@ -1355,7 +1361,8 @@ audio effects after it keep running and keep their settings; saved with the projinterface (every window, menu, tooltip and dialog; text stays sharp), applied live andremembered; timeline, piano roll and audio editor zoom work on top of it. **Waveform** —**Smooth** (default), **Solid** or **Bars** for audio clips on the lanes. **Track- headers** — Left / Right side of the arrangement's track list. Also+ headers** — Left / Right side of the arrangement's track list. **Open the detail panel+ when you select a track or clip** (off by default: a double-click opens it). Also**AI control (MCP)** on/off, a port field, and "Copy config" (copies aready-made client JSON config to the clipboard).- **Language** (Appearance): the interface language — **English** (default) or **Français**,diff --git a/specs/071-detail-panel-double-click/checklists/requirements.md b/specs/071-detail-panel-double-click/checklists/requirements.mdnew file mode 100644index 00000000..f70a6e56--- /dev/null+++ b/specs/071-detail-panel-double-click/checklists/requirements.md@@ -0,0 +1,34 @@+# Specification Quality Checklist: Open the Detail panel on double-click, not on every selection++**Purpose**: Validate specification completeness and quality before proceeding to planning+**Created**: 2026-11-02+**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++- All three clarifications answered on 2026-11-02 (Q1: A, Q2: A, Q3: A); recorded in spec.md § Clarifications.diff --git a/specs/071-detail-panel-double-click/contracts/gestures.md b/specs/071-detail-panel-double-click/contracts/gestures.mdnew file mode 100644index 00000000..358bbefe--- /dev/null+++ b/specs/071-detail-panel-double-click/contracts/gestures.md@@ -0,0 +1,18 @@+# Contract: mouse gestures (Preferences → Shortcuts must match)++| Where | Gesture | Before #308 | After #308 |+|-------|---------|-------------|------------|+| Arrangement track header | click | select + open Devices | select (panel follows only if open) |+| Arrangement track header | double-click | instrument: plug-in window; others: nothing | any track: open Detail on Devices |+| Arrangement clip | click | select + open Devices/Clip | select (panel follows only if open) |+| Arrangement clip | double-click | open Clip | open Clip (unchanged; also opens a closed panel) |+| Arrangement empty lane (instrument track) | double-click | new MIDI clip | unchanged |+| Arrangement clip ADSR handle | double-click | reset stage | unchanged |+| Arrangement row seam | double-click | reset height | unchanged |+| Mixer strip | click | select + open Devices | select (panel follows only if open) |+| Session filled slot | click | select + open Clip | select (panel follows only if open) |+| Session filled slot | double-click | open Clip | unchanged |+| Session empty instrument slot | double-click | new clip + open Clip | unchanged |+| Session column header | double-click | rename | unchanged |+| Modular island | click / double-click | select track | unchanged (select; panel follows only if open) |+| Plug-in card **Open editor** (Devices) | click | plug-in window | unchanged — now the documented way to the plug-in window |diff --git a/specs/071-detail-panel-double-click/data-model.md b/specs/071-detail-panel-double-click/data-model.mdnew file mode 100644index 00000000..582b1991--- /dev/null+++ b/specs/071-detail-panel-double-click/data-model.md@@ -0,0 +1,18 @@+# Data Model: Open the Detail panel on double-click++## Setting++| Field | Type | Default | Where | Notes |+|-------|------|---------|-------|-------|+| `OpenDetailOnSelect` | bool | `false` | `Nota.Application/Settings.cs` (user settings file) | `true` restores the pre-#308 behaviour: a selection opens the closed panel. Missing in old settings files → `false`. |++No project-file change: the panel state is per user, not per project.++## Detail panel visibility rules++| Trigger | Panel hidden, setting off | Panel hidden, setting on | Panel visible (docked / maximised) | Popped out |+|---------|---------------------------|--------------------------|------------------------------------|------------|+| Select track / clip / slot (click, keyboard, side effect) | stays hidden; content follows | opens as before #308 | follows as today | follows as today |+| Double-click track header (arrangement) | opens on Devices | opens on Devices | switches to Devices | window shows Devices |+| Double-click clip / filled Session slot | opens on Clip | opens on Clip | switches to Clip | window shows Clip |+| View → toggle / "Show devices" / tab button | opens | opens | as today | as today |diff --git a/specs/071-detail-panel-double-click/plan.md b/specs/071-detail-panel-double-click/plan.mdnew file mode 100644index 00000000..5641a82a--- /dev/null+++ b/specs/071-detail-panel-double-click/plan.md@@ -0,0 +1,115 @@+# Implementation Plan: Open the Detail panel on double-click, not on every selection++**Branch**: `071-detail-panel-double-click` | **Date**: 2026-11-02 | **Spec**: [spec.md](spec.md)++**Input**: Feature specification from `/specs/071-detail-panel-double-click/spec.md`++## Summary++A plain selection (click, keyboard, side effect of another gesture) stops opening a closed+Detail panel; an open (or popped-out) panel keeps following the selection exactly as today.+Double-click becomes the way in: a track header opens Devices, a clip or a filled Session+slot opens Clip. The arrangement header double-click on an instrument track stops opening+the plug-in window (it stays on **Open editor** on the plug-in's card). A new Preferences+switch "Open Detail panel on select" (off by default) restores the old behaviour.++Approach (see [research.md](research.md)): every path that makes the docked panel visible+goes through `MainWindow.ShowDetail(...)`. The three selection-follow entry points+(`OnTrackSelected`, `OnSessionSlotSelected`, `FollowClipSelection`) run inside a+"follow-only" scope; inside it `ShowDetail` returns early when the panel is hidden and the+preference is off. Content (device chain, clip editor, tab buttons) still updates, so+opening the panel later shows the current selection. Explicit callers (double-click,+View menu, "Show devices", the Devices/Clip tabs, browser drops, Convert) are outside the+scope and open the panel as today.++## Nota: Read Before Planning++- **UI work** → [`DESIGN.md`](../../DESIGN.md): the only new visual is one switch row in+ Preferences → Appearance, built with the existing `SwitchRow` + `Caption` helpers.+- **Anything** → [`CONTRIBUTING.md`](../../CONTRIBUTING.md).++## Technical Context++**Language/Version**: C# / .NET 10 (managed app only)++**Primary Dependencies**: Avalonia (existing); no new dependency++**Storage**: one new bool in the user settings file (`Nota.Application/Settings.cs` →+`OpenDetailOnSelect`), persisted by the existing settings service++**Audio-Thread Impact**: None — UI-only change; no engine call is added or changed++**Testing**: no managed unit-test project exists; verification is a headless Avalonia+harness that drives the real `MainWindow` with synthetic pointer events (see+[quickstart.md](quickstart.md)), plus `scripts/build.sh` (build + smoke test) as the PR gate++**Target Platform**: macOS, Windows, Linux desktop (same code path everywhere)++**Project Type**: desktop app++**Performance Goals**: no measurable change — the gate is a bool check per selection++**Constraints**: popped-out Detail window behaviour unchanged; Session/Arrangement parity++**Scale/Scope**: ~6 files in `src/managed/Nota.App` + `Nota.Application/Settings.cs`,+`Languages/fr.json`, CHANGELOG, FEATURES.md, Preferences → Shortcuts, user docs (nota-docs)++## Constitution Check++*GATE: Must pass before Phase 0 research. Re-check after Phase 1 design.*++| Principle | Status |+|-----------|--------|+| 0. Approved issue first | ✅ #308 carries `approved` (added by a core contributor, 2026-11-02) |+| I. Real-time audio safety | ✅ N/A — no audio-thread code touched |+| II. Boundary discipline | ✅ No C ABI change; `OpenPluginEditor` call removed from one UI gesture only |+| III. Licensing hygiene | ✅ No new dependency; any new `.cs` file gets the SPDX header (none planned) |+| IV. Verification gate | ✅ `scripts/build.sh` before PR; no engine behaviour change, so no smoke-test extension |+| V. One logical change | ✅ Single behaviour change + its opt-out switch |+| VI. Docs in sync | ✅ CHANGELOG `[Unreleased]` (Changed), FEATURES.md (nota-features), Preferences → Shortcuts (nota-shortcuts), user docs EN+RU (nota-docs), `fr.json` strings |+| VII. Spec-first | ✅ spec → clarify (done in specify) → this plan → tasks |+| VIII. Safety rules not weakened | ✅ |++Post-design re-check: unchanged — the design adds no engine, ABI or dependency surface.++## Project Structure++### Documentation (this feature)++```text+specs/071-detail-panel-double-click/+├── plan.md # This file+├── research.md # Phase 0+├── data-model.md # Phase 1 (one setting + panel state rules)+├── quickstart.md # Phase 1 (headless verification scenarios)+├── contracts/+│ └── gestures.md # Phase 1 (the mouse-gesture contract)+└── tasks.md # /speckit-tasks+```++### Source Code (repository root)++```text+src/managed/+├── Nota.Application/+│ └── Settings.cs # + OpenDetailOnSelect (bool, default false)+└── Nota.App/+ ├── MainWindow.Detail.cs # follow-only scope; ShowDetail gate; OnTrackSelected,+ │ # OnSessionSlotSelected wrapped; + OpenTrackDevices(id)+ ├── MainWindow.axaml.cs # wire Timeline.TrackDevicesRequested → OpenTrackDevices;+ │ # FollowClipSelection wrapped+ ├── MainWindow.Menu.cs # view.toggleDetail opening re-shows the checked tab+ ├── ArrangementView.cs # header double-click: select + TrackDevicesRequested+ │ # (replaces OpenPluginEditor for instrument tracks)+ ├── PreferencesWindow.cs # Appearance → "Detail panel" switch row; Shortcuts rows+ └── Languages/fr.json # new strings+CHANGELOG.md, FEATURES.md # Changed entry / feature line+../nota-docs # EN + RU pages that say "click a track to see its devices"+```++**Structure Decision**: managed UI only, all inside `Nota.App` plus one settings property in+`Nota.Application`. No new files in source.++## Complexity Tracking++No constitution violations.diff --git a/specs/071-detail-panel-double-click/quickstart.md b/specs/071-detail-panel-double-click/quickstart.mdnew file mode 100644index 00000000..d22d4710--- /dev/null+++ b/specs/071-detail-panel-double-click/quickstart.md@@ -0,0 +1,36 @@+# Quickstart: verify #308++## Prerequisites++- `scripts/build.sh` green (Release engine in `build/`).+- Headless Avalonia harness (console net10.0 project referencing `Nota.App.csproj`,+ `Avalonia.Headless` + `Avalonia.Skia`), `NOTA_DATA_DIR=/tmp/detail308/data`. Show the real+ `MainWindow` with its view model, add an instrument track with a MIDI clip, an audio+ track with an audio clip, then drive clicks with synthetic `PointerPressed/Released`+ events (`ClickCount` 1 or 2) on the header card, the lane control and Session slots.+ After each step log `DetailPanel.IsVisible`, which tab button is checked, and the hosted+ content type.++## Scenarios (setting off unless stated)++| # | Start | Action | Expect |+|---|-------|--------|--------|+| 1 | panel hidden | click track header | hidden; selection = track |+| 2 | panel hidden | click MIDI clip | hidden; selection = clip |+| 3 | panel hidden | keyboard ↓ to next track | hidden |+| 4 | panel hidden, Session | click filled slot | hidden |+| 5 | panel hidden | double-click instrument track header | visible, Devices; no plug-in window |+| 6 | panel hidden | double-click MIDI clip | visible, Clip, piano roll on that clip |+| 7 | panel hidden | double-click audio clip | visible, Clip, audio editor |+| 8 | panel hidden, Session | double-click filled slot | visible, Clip |+| 9 | panel visible on Devices | click another track | Devices of that track |+| 10 | panel visible on Clip | click another clip | Clip on that clip |+| 11 | panel popped out | click another track / clip | window follows |+| 12 | panel hidden, after #1 | View → toggle Detail | visible on Devices of the selected track, Devices height |+| 13 | setting **on**, panel hidden | click track header | visible, Devices (old behaviour) |+| 14 | panel hidden | double-click empty instrument lane | new MIDI clip; panel hidden |+| 15 | Session | double-click column header | rename prompt |+| 16 | — | restart with setting on | setting still on |++Capture before/after screenshots of scenario 1 and 5 (`CaptureRenderedFrame`) for the PR,+and the Preferences → Appearance page with the new switch.diff --git a/specs/071-detail-panel-double-click/research.md b/specs/071-detail-panel-double-click/research.mdnew file mode 100644index 00000000..36c21a37--- /dev/null+++ b/specs/071-detail-panel-double-click/research.md@@ -0,0 +1,86 @@+# Research: Open the Detail panel on double-click++## R1 — Where does a selection open the panel today?++- **Decision**: gate in one place, `MainWindow.ShowDetail(height, honorPersist, resizable)`+ (`MainWindow.Detail.cs`), using a follow-only scope entered by the three selection-follow+ handlers.+- **Findings**:+ - `ShowDetail` is the only code that sets `DetailPanel.IsVisible = true` apart from the+ View → toggle (`OnMenuToggleClip`). It is reached from `ShowDevices` (Devices tab),+ `ShowClipPanel`, `ShowAudioClipPanel`, `ShowPatternPanel`.+ - Selection reaches it through:+ - `Timeline.TrackSelected → OnTrackSelected → ShowDevices(takeOverPanel: !keepClipTab)`+ (arrangement header, clip click, mixer strip, keyboard, `Timeline.Select(...)` from+ Freeze/Convert/imports, Modular `TrackActivated`);+ - `Timeline.ClipSelectionChanged → FollowClipSelection` (already returns when the Clip+ tab is not on screen, so it never opens a closed panel — wrapped anyway for safety);+ - `_session.SlotSelected → OnSessionSlotSelected → ShowSessionSlot` (a single click on a+ filled slot opens its editor today).+ - The popped-out Detail window never calls `ShowDetail` (all `Show*Panel` return early+ when `DetailFloating`), so it is unaffected by the gate — it keeps following.+- **Rationale**: one choke point means every present and future selection path obeys the+ rule; content still updates while hidden, so a later open shows the current selection.+- **Alternatives considered**:+ - Pass `takeOverPanel: false` from each caller — misses `ShowSessionSlot`/`ShowClipPanel`+ and every future caller.+ - Skip the follow handlers entirely while hidden — leaves stale content behind for the+ View-menu toggle to reveal.++## R2 — Gate rule++- **Decision**: inside the follow-only scope, `ShowDetail` returns before touching layout+ when `!DetailPanel.IsVisible && !Settings.OpenDetailOnSelect`. When the panel is visible+ it behaves exactly as today (tab switches, heights, maximise rules).+- **Scope mechanics**: an int depth counter (`_followOnly`) incremented/decremented in+ `try/finally` around the bodies of the three handlers; nested `Timeline.Select` calls from+ `OnSessionSlotSelected` stay inside it.++## R3 — Explicit "open" paths stay outside the scope++- Arrangement clip double-click: `LaneControl` → `OnClipDoubleClicked` →+ `MidiClipActivated/AudioClipActivated` → `OpenClipEditor` / `OpenAudioClipEditor` →+ `Show*Panel` → opens. Already correct; it sets `SelTrackId` directly and does not fire+ `TrackSelected`.+- Session slot double-click: `SlotEditRequested → OpenSessionClipEditor` → opens. The first+ press of the double-click goes through `SlotSelected` (quiet), the second opens.+- `view.showDevices`, the Devices/Clip/Pattern tab buttons, browser drops, Convert → opens.++## R4 — Track header double-click (Q1 = A)++- **Decision**: in `ArrangementView.AttachHeaderGestures`, `ClickCount == 2` (any track kind,+ left button) selects the track and raises a new `TrackDevicesRequested(int trackId)`+ event; `MainWindow` handles it with `ShowDevices(trackId)` (take over the panel). The+ `OpenPluginEditor(t.Id, -1)` call is removed there; the plug-in window stays on the+ **Open editor** button on the plug-in's card (`PluginCard`; `GenericInstrumentCard` has **Open GUI ↗**).+- The double-click check stays after the ComboBox/right-button guards and before the+ reorder-drag arming, as today.+- Group bars share `AttachHeaderGestures`, so a group track opens its Devices too.+- Row-seam, ADSR-handle, empty-lane and section double-clicks are handled by other+ controls first and are untouched.++## R5 — Session column header (Q2 = A)++- **Decision**: unchanged — double-click renames. A single click selects the track (quiet).++## R6 — Preference (Q3 = A)++- **Decision**: `Settings.OpenDetailOnSelect` (bool, default `false`), a `SwitchRow` in+ Preferences → Appearance in a new "Detail panel" section with a one-line caption, saved+ through `settings.Save()` like `PianoRollLabelAllNotes`. Read live (no cache) by the gate,+ so toggling takes effect immediately.++## R7 — View → toggle Detail panel++- **Finding**: `OnMenuToggleClip` only flips `DetailPanel.IsVisible`; with content updated+ while hidden, the row height may belong to the other tab.+- **Decision**: when the toggle opens the panel, re-run the checked tab's show+ (Devices → `ShowDevices(selected)`, Clip/Pattern → the matching `Show*Panel`) so the+ height and tab are right; closing stays a plain hide.++## R8 — Strings and docs++- New UI strings go into `Languages/fr.json` (en.json is the identity table); RU user docs+ live in `../nota-docs` and are updated through the nota-docs skill.+- Shortcuts pane: Mouse group gains "Double-click a track header → open its devices";+ "Double-click clip" text gains "opens the Detail panel if it is closed".diff --git a/specs/071-detail-panel-double-click/spec.md b/specs/071-detail-panel-double-click/spec.mdnew file mode 100644index 00000000..2467c12d--- /dev/null+++ b/specs/071-detail-panel-double-click/spec.md@@ -0,0 +1,259 @@+# Feature Specification: Open the Detail panel on double-click, not on every selection++**Feature Branch**: `071-detail-panel-double-click`++**Created**: 2026-11-02++**Status**: Clarified++**Input**: User description: "Issue #308 (https://github.com/nota-daw/nota/issues/308): Open the Detail panel on double-click, not on every selection. Single click on a track or clip selects only — the Detail panel does not open; if it is already open it keeps following the selection. Double-click a track opens the Detail panel on Devices; double-click a clip opens it on Clip (piano roll / audio editor / pattern). Existing double-click gestures on clips, track headers and Session view clip slots (rename, create clip on empty lane, etc.) must be kept or relocated so nothing is lost. The panel stays reachable via view.showDevices and the View menu. Consider a Preferences toggle "Open Detail panel on select" for the old behaviour; note the change in CHANGELOG; update Preferences → Shortcuts and docs for the new gestures."++## Nota Context *(fill in — drives plan and tasks)*++**Feature area** *(pick the main one)*:++- [ ] Engine (C++, `src/native/nota.engine`) — real-time audio rules apply, see `ARCHITECTURE.md` AR table+- [ ] Managed app (C#, `src/managed/*`) — domain, application, infrastructure, presentation+- [x] UI (Avalonia, `src/managed/Nota.Presentation`) — follow `DESIGN.md` (Studio)+- [ ] Plugin hosting (`pluginhost/`) — the only place JUCE is allowed+- [ ] Build / packaging / CI (`scripts/`, `.github/`) — see `BUILD.md`+- [ ] Docs only++**Nota docs to keep in mind** *(links relative to `specs/<slug>/`, where this file lands)*:+[`ARCHITECTURE.md`](../../ARCHITECTURE.md) (AR rules),+[`CONTRIBUTING.md`](../../CONTRIBUTING.md) (licensing, dependency policy, PR+expectations), [`BUILD.md`](../../BUILD.md), [`DESIGN.md`](../../DESIGN.md),+[`FEATURES.md`](../../FEATURES.md).++**Today's behaviour (baseline, for reviewers)**:++- Arrangement: a single click on a track header, a mixer strip or a clip selects it and+ also opens the Detail panel (Devices for a track, Devices or Clip for a clip).+- Arrangement: double-clicking a clip already opens its editor in the Clip tab.+ Double-clicking empty lane space on an instrument track creates a MIDI clip.+ Double-clicking an instrument track's header opens its instrument's plug-in window.+- Session view: a single click on a filled slot selects it and opens its clip editor in+ the Detail panel. Double-clicking a filled slot opens its editor; double-clicking an empty+ slot on an instrument track creates a MIDI clip and opens it. Double-clicking a column+ header renames the track.+- The Detail panel can also be opened from the View menu and the "Show devices" command.++## User Scenarios & Testing *(mandatory)*++### User Story 1 - Select without the panel popping up (Priority: P1)++A user on a small screen wants to pick a clip to split it, or pick a track to mute or+reorder it. With the Detail panel closed, a single click selects the clip or track and+nothing else changes on screen: the arrangement keeps its full height.++**Why this priority**: This is the complaint in the issue. Every other story only matters+once a plain click stops opening the panel.++**Independent Test**: Close the Detail panel, click a track header, a clip, a mixer strip+and a Session slot one after another. Each gets selected; the panel stays closed.++**Acceptance Scenarios**:++1. **Given** the Detail panel is closed, **When** the user clicks a clip in the arrangement,+ **Then** the clip (and its track) is selected and the Detail panel stays closed.+2. **Given** the Detail panel is closed, **When** the user clicks a track header or a mixer+ strip, **Then** the track is selected and the Detail panel stays closed.+3. **Given** the Detail panel is closed and Session view is showing, **When** the user+ clicks a filled clip slot, **Then** the slot is selected and the Detail panel stays closed.+4. **Given** the Detail panel is closed, **When** the user selects a clip and splits it,+ **Then** the panel is still closed afterwards.++---++### User Story 2 - An open panel keeps following the selection (Priority: P1)++A user on a big screen keeps the Detail panel open. Clicking around keeps working as it+does today: the panel shows the selected track's devices, or the selected clip in the Clip+tab when the Clip tab is the one showing.++**Why this priority**: Users who like the panel must not lose the "it follows me" behaviour.+Without it the change would be a regression for them.++**Independent Test**: Open the panel on Devices, click another track — the panel shows that+track's devices. Switch to Clip, click another clip — the Clip tab shows that clip.++**Acceptance Scenarios**:++1. **Given** the Detail panel is open on Devices, **When** the user clicks another track,+ **Then** the panel shows that track's devices.+2. **Given** the Detail panel is open on Clip, **When** the user clicks another clip,+ **Then** the Clip tab shows that clip's editor (piano roll, audio editor or pattern, as today).+3. **Given** the Detail panel is popped out into its own window, **When** the user changes+ the selection, **Then** the window follows the selection as it does today.++---++### User Story 3 - Double-click opens the panel where you want it (Priority: P1)++A user double-clicks a track to see its devices, or double-clicks a clip to edit it.+The Detail panel opens on the matching tab.++**Why this priority**: With single click no longer opening the panel, double-click is the+quick way in. Without it the panel would only be reachable through the menu.++**Independent Test**: With the panel closed, double-click a track header: the panel opens+on Devices for that track. Close it, double-click a clip: the panel opens on Clip for it.++**Acceptance Scenarios**:++1. **Given** the panel is closed, **When** the user double-clicks a track header in the+ arrangement, **Then** the panel opens on Devices for that track.+2. **Given** the panel is closed, **When** the user double-clicks a MIDI clip, an audio clip+ or a drum-pattern clip, **Then** the panel opens on Clip with that clip's editor (the+ editor kind the clip uses today).+3. **Given** the panel is closed and Session view is showing, **When** the user+ double-clicks a filled slot, **Then** the panel opens on Clip for that slot.+4. **Given** the panel is open on Clip, **When** the user double-clicks a track header,+ **Then** the panel switches to Devices for that track.++---++### User Story 4 - Existing double-click gestures still exist (Priority: P2)++A user who double-clicks empty lane space to create a MIDI clip, double-clicks a Session+column header to rename a track, or double-clicks an empty Session slot to create a clip can+still do all of that. The instrument plug-in window that double-clicking an instrument track+header opens today is still one gesture away.++**Why this priority**: The change must not remove anything users rely on.++**Independent Test**: Run every double-click gesture listed in the baseline and confirm+each one still does its job (or its new documented gesture does).++**Acceptance Scenarios**:++1. **Given** an instrument track, **When** the user double-clicks empty space in its lane,+ **Then** a new MIDI clip is created there (unchanged).+2. **Given** Session view, **When** the user double-clicks an empty slot on an instrument+ track, **Then** a MIDI clip is created and opened in the Clip tab (unchanged).+3. **Given** Session view, **When** the user double-clicks a track's column header,+ **Then** the rename prompt opens, as today (the Session column header keeps rename).+4. **Given** an instrument track whose instrument has its own window, **When** the user+ double-clicks its arrangement header, **Then** the Detail panel opens on Devices for that+ track, like any other track; a plug-in instrument's own window opens from **Open editor** on+ its card in Devices.++---++### User Story 5 - Keep the old behaviour if I prefer it (Priority: P3)++A user who liked the panel opening on every selection turns on "Open Detail panel on select"+in Preferences and gets today's behaviour back.++**Why this priority**: The change breaks a habit; a single switch lets those users keep it+without a fork in every gesture.++**Independent Test**: Turn the option on, close the panel, click a track: the panel opens on+Devices. Turn it off: the click only selects.++**Acceptance Scenarios**:++1. **Given** "Open Detail panel on select" is off (the default), **When** the user clicks a+ track or clip, **Then** the panel does not open (User Story 1).+2. **Given** the option is on, **When** the user clicks a track, a clip or a Session slot,+ **Then** the panel opens exactly as it does before this feature.+3. **Given** the option is turned on or off, **When** the app is restarted, **Then** the+ choice is kept.+4. **Given** the option is on, **When** the user double-clicks a track or clip, **Then** the+ double-click gestures from User Story 3 still work.++---++## Clarifications++### Session 2026-11-02++- Q: Double-click on an instrument track's arrangement header opens the plug-in window today; the issue asks for Devices. Which wins? → A: Devices, for every track kind; the plug-in window opens from **Open editor** on the plug-in's card in Devices.+- Q: Session column header double-click — keep rename, or open Devices? → A: Keep rename; in Session, Devices are reached through the View menu / "Show devices" (or a double-clicked slot's Clip tab → Devices tab).+- Q: Preferences toggle for the old behaviour, or CHANGELOG note only? → A: Add "Open Detail panel on select" in Preferences, off by default, plus the CHANGELOG note.++---++### Edge Cases++- A clip is selected as a side effect of another gesture (an edge trim, a move, a rubber-band+ select, a paste, Undo/Redo restoring a selection): the panel must not open on its own.+- Keyboard selection (arrow keys moving between tracks or clips) follows the same rule as a+ single click: no opening, but an open panel follows.+- A new track or clip is created (menu, browser drop onto empty space, recording): it may get+ selected, but the panel does not open on its own. Explicit "show me" actions (a browser+ drop of a device onto a track, Convert, the Devices tab, the "Show devices" command) still+ open the panel as today.+- The Modular (global) view's island double-click, which opens a track today, keeps working.+- The panel is maximised when the user changes the selection: it stays maximised and follows.+- The selected track is deleted while the panel is closed: nothing opens.+- A double-click on a clip's ADSR handle still resets that stage (it does not open the panel).+- A double-click on a row seam still resets the row height (it does not open the panel).++## Requirements *(mandatory)*++### Functional Requirements++- **FR-001**: A single click that selects a track (arrangement header, mixer strip, Session+ column header, Modular island) MUST NOT open the Detail panel when it is closed.+- **FR-002**: A single click that selects a clip (arrangement clip, Session slot) MUST NOT+ open the Detail panel when it is closed.+- **FR-003**: Selection changes made by other gestures and by the keyboard MUST NOT open a+ closed Detail panel (see Edge Cases).+- **FR-004**: While the Detail panel is open (docked, maximised or popped out), it MUST keep+ following the selection exactly as today: same tab choice rules, same Clip/Devices+ switching.+- **FR-005**: Double-clicking a track header in the arrangement MUST select the track and+ open the Detail panel on Devices for it, for every track kind. On an instrument track this+ replaces today's "open the plug-in window" double-click; that window stays one click away+ through **Open editor** on the plug-in's card in Devices.+- **FR-006**: Double-clicking a clip in the arrangement MUST select it and open the Detail+ panel on Clip with the editor that clip uses today (piano roll, audio editor, pattern).+- **FR-007**: Double-clicking a filled Session slot MUST select it and open the Detail panel+ on Clip for it.+- **FR-008**: Every double-click gesture in the baseline MUST keep working, or be moved to+ another gesture that is listed in Preferences → Shortcuts and the user docs.+- **FR-008a**: Double-clicking a Session column header MUST keep renaming the track.+- **FR-009**: The Detail panel MUST stay reachable without a double-click through the View+ menu and the "Show devices" command (unchanged).+- **FR-009a**: Preferences MUST offer "Open Detail panel on select", off by default. When on,+ FR-001–FR-003 do not apply and a selection opens the panel exactly as before this feature;+ the double-click gestures keep working either way. The choice MUST persist across restarts.+- **FR-010**: Preferences → Shortcuts MUST list the new mouse gestures (double-click track →+ Devices, double-click clip → Clip) and drop "double-click instrument header → plug-in window".+- **FR-011**: The CHANGELOG `[Unreleased]` section MUST describe the change of habit, and the+ user docs (EN and RU) MUST describe how to open the Detail panel.++## Success Criteria *(mandatory)*++### Measurable Outcomes++- **SC-001**: With the Detail panel closed, 0 of the single-click selection gestures listed+ in FR-001/FR-002 open it.+- **SC-002**: With the Detail panel open, 100% of the follow-the-selection scenarios in+ User Story 2 behave as before the change.+- **SC-003**: A user reaches a track's devices or a clip's editor from a closed panel in one+ gesture (a double-click).+- **SC-004**: Every double-click gesture in the baseline list is still available (same or+ documented new gesture): 0 gestures lost.++## Assumptions++- "Track" covers instrument, audio, group and return tracks; master behaves like a track.+- The mixer and Modular views follow the same rule as the arrangement: a click selects, it+ does not open the panel.+- Double-clicking a clip already opens the Clip tab today; this feature keeps that and makes+ sure it also shows the panel when it is closed.+- The Detail panel's open/closed state is not newly persisted by this feature; it keeps+ whatever persistence it has today.+- No engine change: this is a UI-only behaviour change.++## Nota Compliance Checklist *(review before implementation; re-check in tasks.md)*++- [ ] Every new source file will carry the AGPL-3.0-only SPDX header (two lines, see CONTRIBUTING.md)+- [x] No new dependency — or: license checked, AGPL-compatible, `LICENSES/third-party.md` row planned+- [x] Audio-thread impact considered: no alloc / lock / I/O on the audio thread (AR-6), command queue for data in (AR-4), immutable snapshots for structural edits (AR-5) — UI only, no audio-thread code touched+- [x] Managed/native crossings go through the pure C ABI in `nota_engine.h` only (AR-7); no JUCE outside `pluginhost/`+- [x] Smoke-test impact assessed: engine behaviour change → extend `tests/Nota.SmokeTest` — no engine change+- [ ] User-visible change → `CHANGELOG.md` `[Unreleased]` entry planned (and FEATURES.md / user docs via the nota-features / nota-docs skills when working with an agent that has them)+- [ ] UI change → follows `DESIGN.md` (Studio design language)diff --git a/specs/071-detail-panel-double-click/tasks.md b/specs/071-detail-panel-double-click/tasks.mdnew file mode 100644index 00000000..da6b5dc6--- /dev/null+++ b/specs/071-detail-panel-double-click/tasks.md@@ -0,0 +1,125 @@+---++description: "Tasks for #308 — open the Detail panel on double-click, not on every selection"+---++# Tasks: Open the Detail panel on double-click, not on every selection++**Input**: Design documents from `/specs/071-detail-panel-double-click/`++**Prerequisites**: plan.md, spec.md, research.md, data-model.md, contracts/gestures.md, quickstart.md++**Tests**: no unit-test tasks (none requested; the managed app has no unit-test project).+Verification is the headless harness in [quickstart.md](quickstart.md) plus `scripts/build.sh`.++## Format: `[ID] [P?] [Story] Description`++- **[P]**: Can run in parallel (different files, no dependencies)+- **[Story]**: Which user story this task belongs to (US1–US5)++---++## Phase 1: Setup++- [X] T001 Add `public bool OpenDetailOnSelect { get; set; }` (default `false`, "Missing in old settings files → `false`") with a `<summary>` naming #308 next to `ArmOnSelect` in `src/managed/Nota.Application/Settings.cs`++---++## Phase 2: Foundational (blocks US1, US2, US5)++- [X] T002 In `src/managed/Nota.App/MainWindow.Detail.cs` add the follow-only scope: an `int _followOnly` depth counter, a `bool OpenDetailOnSelect` helper reading `_vm?.Settings.Current.OpenDetailOnSelect`, and a guard at the top of `ShowDetail(...)` — when `_followOnly > 0 && !DetailPanel.IsVisible && !OpenDetailOnSelect` return before touching layout (research R1/R2)++**Checkpoint**: the gate exists but nothing enters the scope yet — behaviour unchanged.++---++## Phase 3: User Story 1 — Select without the panel popping up (P1) 🎯 MVP++**Goal**: a single click / keyboard / side-effect selection never opens a closed panel.++**Independent Test**: quickstart scenarios 1–4 and 14.++- [X] T003 [US1] Wrap the body of `OnTrackSelected` in `_followOnly++ … finally _followOnly--` in `src/managed/Nota.App/MainWindow.Detail.cs`+- [X] T004 [US1] Wrap the body of `OnSessionSlotSelected` the same way in `src/managed/Nota.App/MainWindow.Detail.cs` (nested `Timeline.Select` calls stay inside the scope)+- [X] T005 [US1] Wrap the body of `FollowClipSelection` the same way in `src/managed/Nota.App/MainWindow.Detail.cs`++**Checkpoint**: US1 testable — a closed panel stays closed on every selection.++---++## Phase 4: User Story 2 — An open panel keeps following (P1)++**Goal**: with the panel open (docked, maximised, popped out) behaviour is exactly as before.++**Independent Test**: quickstart scenarios 9–11.++- [X] T006 [US2] Review `ShowDevices`, `ShowClipPanel`, `ShowAudioClipPanel`, `ShowPatternPanel` in `src/managed/Nota.App/MainWindow.Detail.cs`: the gate only fires when hidden, and every `Show*Panel` still updates hosts and tab buttons before `ShowDetail`, so content follows while hidden; fix any branch that skips content when hidden+- [X] T007 [US2] In `src/managed/Nota.App/MainWindow.Menu.cs` `OnMenuToggleClip`: when it opens the panel, re-show the checked tab (Devices → `ShowDevices(selected track)`, Clip → the current clip/audio editor panel, Pattern → `ShowPatternPanel`) so height and tab match; closing stays a plain hide (research R7)++---++## Phase 5: User Story 3 — Double-click opens the panel (P1)++**Goal**: double-click a track header → Devices; double-click a clip / filled slot → Clip.++**Independent Test**: quickstart scenarios 5–8.++- [X] T008 [US3] In `src/managed/Nota.App/ArrangementView.cs`: add `public event Action<int>? TrackDevicesRequested;`; in `AttachHeaderGestures` replace the instrument-only `OpenPluginEditor(t.Id, -1)` double-click with: any track, left button, `ClickCount == 2` → `Select(t.Id, -1)` if not selected, then `TrackDevicesRequested?.Invoke(t.Id)`; update the comment+- [X] T009 [US3] In `src/managed/Nota.App/MainWindow.axaml.cs` subscribe `Timeline.TrackDevicesRequested += id => ShowDevices(id);` next to `Timeline.TrackSelected`+- [X] T010 [US3] Confirm clip double-click (`OpenClipEditor` / `OpenAudioClipEditor`) and Session slot double-click (`OpenSessionClipEditor`) run outside the follow-only scope and open a closed panel; fix if a nested selection path swallows the open (src/managed/Nota.App/MainWindow.Detail.cs)++---++## Phase 6: User Story 4 — Existing double-clicks survive (P2)++**Independent Test**: quickstart scenarios 14–15; contracts/gestures.md rows marked "unchanged".++- [X] T011 [US4] Check `src/managed/Nota.App/ArrangementView.LaneControl.cs` and `src/managed/Nota.App/SessionView.Grid.cs`: empty-lane new clip, ADSR reset, row-seam reset, Session header rename and empty-slot create are untouched by T002–T010 (no code change expected)++---++## Phase 7: User Story 5 — Preference for the old behaviour (P3)++**Independent Test**: quickstart scenarios 13 and 16.++- [X] T012 [US5] In `src/managed/Nota.App/PreferencesWindow.cs` (Appearance page) add a `SwitchRow(Loc.T("Open the Detail panel when you select a track or clip"), …)` bound to `OpenDetailOnSelect` with `settings.Save()`, in a new `Section(Loc.T("Detail panel"), 10, row, Caption(...))` explaining that off means double-click opens it++---++## Phase 8: Polish & Cross-Cutting++- [X] T013 [P] Preferences → Shortcuts Mouse group in `src/managed/Nota.App/PreferencesWindow.cs`: add "Double-click a track header → Open its devices in the Detail panel"; extend "Double-click clip" to say it opens the Detail panel (nota-shortcuts)+- [X] T014 [P] Add every new `Loc.T` string to `src/managed/Nota.App/Languages/fr.json` (glossary: specs/068-ui-language/glossary.md)+- [X] T015 [P] `CHANGELOG.md` `[Unreleased]` → `### Changed` entry describing the new habit, the double-clicks, the plug-in window button, and the Preferences switch+- [X] T016 [P] `FEATURES.md` via the nota-features skill+- [X] T017 User docs EN + RU in `../nota-docs` via the nota-docs skill (pages describing how the Detail panel opens)+- [X] T018 Build `src/managed/Nota.App` and run the headless harness scenarios 1–16 from quickstart.md; capture before/after shots+- [X] T019 `scripts/build.sh` — builds; smoke test green except the two render-pool "overloaded" timing checks, which fail the same way on untouched develop (4497c866) on this machine++---++## Dependencies & Execution Order++- T001 → T002 → (T003–T005) → T006–T007; T008–T010 depend only on T002 being in place for testing.+- US4 (T011) after US1 + US3. US5 (T012) after T001.+- Polish T013–T016 are independent files ([P]); T017–T019 last.++### Parallel Example++```text+After T012: T013 (PreferencesWindow shortcuts) · T014 (fr.json) · T015 (CHANGELOG) · T016 (FEATURES.md)+```++## Implementation Strategy++MVP = Phases 1–3 (selection stops opening the panel). Then US3 (double-click in), US2+check, US4 audit, US5 switch, docs. Single PR (`Closes #308`).++## Nota Compliance (re-check)++- [x] No new source files → no new SPDX headers+- [x] No new dependency+- [x] No audio-thread / C ABI change+- [x] Smoke test unaffected (no engine behaviour change); `scripts/build.sh` still the gate+- [x] CHANGELOG / FEATURES / docs / shortcuts — T013–T017+- [x] DESIGN.md — the switch row reuses existing Preferences helpers (T012)diff --git a/src/managed/Nota.App/ArrangementView.cs b/src/managed/Nota.App/ArrangementView.csindex 740e1588..8f6a25f0 100644--- a/src/managed/Nota.App/ArrangementView.cs+++ b/src/managed/Nota.App/ArrangementView.cs@@ -294,6 +294,8 @@ public sealed partial class ArrangementView : UserControlpublic event Action<int, int>? AudioClipActivated;/// <summary>Raised when a track becomes selected (clip or header click).</summary>public event Action<int>? TrackSelected;+ /// <summary>Raised when a track header is double-clicked: open its devices (#308).</summary>+ public event Action<int>? TrackDevicesRequested;/// <summary>Live-freeze (v1.1): per-track role for the header badge — 0 none, 1 sleeping/// source, 2 linked frozen. Set by MainWindow; queried while rebuilding headers.</summary>public Func<int, int>? FreezeRole;@@ -2440,10 +2442,14 @@ public sealed partial class ArrangementView : UserControl// which would rebuild the header and destroy the combo before its dropdown opens).if (e.Source is Visual vsrc && vsrc.FindAncestorOfType<ComboBox>(includeSelf: true) is not null) return;if (e.GetCurrentPoint(card).Properties.IsRightButtonPressed) { ShowTrackMenu(card, t.Id); return; }- // Double-click an instrument track → open its instrument/plugin GUI (if any).- if (e.ClickCount == 2 && t.IsInstrument)+ // Double-click a track → its devices in the Detail panel, opening the panel if it is+ // closed (#308; a plain click only selects). A plug-in's own window is Open+ // editor on its card there.+ if (e.ClickCount == 2 && e.GetCurrentPoint(card).Properties.IsLeftButtonPressed){- try { _engine?.OpenPluginEditor(t.Id, -1); } catch { /* builtin/no editor: no-op */ }+ if (SelTrackId != t.Id) Select(t.Id, -1);+ TrackDevicesRequested?.Invoke(t.Id);+ e.Handled = true;return;}// Shift-click selects the range from the anchor; Ctrl/Cmd-click adds or removes one (#249).@@ -3119,6 +3125,14 @@ public sealed partial class ArrangementView : UserControlcard.PointerPressed += (_, e) =>{if (e.GetCurrentPoint(card).Properties.IsRightButtonPressed) { ShowFooterMenu(card, trackId); return; }+ // Double-click a return or the master → its devices, as on a track header (#308).+ if (e.ClickCount == 2 && e.GetCurrentPoint(card).Properties.IsLeftButtonPressed)+ {+ if (SelTrackId != trackId) Select(trackId, -1);+ TrackDevicesRequested?.Invoke(trackId);+ e.Handled = true;+ return;+ }if (ret is not null && (e.KeyModifiers & KeyModifiers.Shift) != 0) { SelectReturnRange(trackId); e.Handled = true; return; }if (ret is not null && (e.KeyModifiers & (KeyModifiers.Control | KeyModifiers.Meta)) != 0){diff --git a/src/managed/Nota.App/Languages/fr.json b/src/managed/Nota.App/Languages/fr.jsonindex 0aa3ebda..eb5a9512 100644--- a/src/managed/Nota.App/Languages/fr.json+++ b/src/managed/Nota.App/Languages/fr.json@@ -403,6 +403,9 @@"Enable MCP server (let an AI drive Nota)": "Activer le serveur MCP (laisser une IA piloter Nota)","Copied": "Copié","Label every note in the piano roll": "Nommer chaque note dans le piano roll",+ "Open the detail panel when you select a track or clip": "Ouvrir le panneau de détail à la sélection d’une piste ou d’un clip",+ "Detail panel": "Panneau de détail",+ "Off: a click only selects, and an open panel follows it. Double-click a track for its devices or a clip to edit it.": "Désactivé : un clic ne fait que sélectionner, et un panneau ouvert suit la sélection. Double-cliquer sur une piste pour ses appareils ou sur un clip pour le modifier.","Colour theme": "Thème de couleurs","Themes change colours only. Follow system switches between your dark-mode and light-mode theme with the OS appearance.": "Les thèmes ne changent que les couleurs. « Suivre le système » alterne entre le thème du mode sombre et celui du mode clair, selon l’apparence de l’OS.","Waveform": "Forme d’onde",@@ -620,7 +623,9 @@"Sticks · triggers": "Sticks · gâchettes","Mouse": "Souris","Double-click clip": "Double-clic sur un clip",- "Open in the clip editor · on one of several selected MIDI clips, open them all together": "Ouvrir dans l’éditeur de clips · sur l’un de plusieurs clips MIDI sélectionnés, les ouvrir tous ensemble",+ "Open in the clip editor, opening the detail panel · on one of several selected MIDI clips, open them all together": "Ouvrir dans l’éditeur de clips, en ouvrant le panneau de détail · sur l’un de plusieurs clips MIDI sélectionnés, les ouvrir tous ensemble",+ "Double-click a track header": "Double-clic sur un en-tête de piste",+ "Open its devices in the detail panel · a plug-in's own window is Open editor on its card": "Ouvrir ses appareils dans le panneau de détail · la fenêtre d’un plug-in s’ouvre avec Open editor sur sa carte","Double-click a browser instrument": "Double-clic sur un instrument du navigateur","Swap it onto the selected instrument track · clips and effects stay · no track selected starts one": "L’échanger sur la piste d’instrument sélectionnée · les clips et les effets restent · sans piste sélectionnée, en crée une","Always start a new track with it": "Toujours créer une nouvelle piste avec lui",diff --git a/src/managed/Nota.App/MainWindow.Detail.cs b/src/managed/Nota.App/MainWindow.Detail.csindex 0cdfaa40..cfa2b296 100644--- a/src/managed/Nota.App/MainWindow.Detail.cs+++ b/src/managed/Nota.App/MainWindow.Detail.cs@@ -133,6 +133,10 @@ public partial class MainWindow// and less clips them.private void ShowDetail(double height, bool honorPersist, bool resizable = true){+ // A selection only follows the panel; it opens a closed one only with the+ // "Open Detail panel on select" preference (#308). Hosts and tabs are already updated,+ // so the panel shows the current selection when it is opened later.+ if (_followOnly > 0 && !DetailPanel.IsVisible && !OpenDetailOnSelect) return;_detailDefault = height;// Filling the window, a clip tab keeps it; Devices goes back to the split.if (_detailMaximized && resizable)@@ -152,7 +156,23 @@ public partial class MainWindowFitBottomPanels(); // under a docked Mixer in a short window it may not fit as asked}- private void OnTrackSelected(int trackId)+ // Inside a FollowOnly scope a selection updates the panel's content but doesn't open it+ // (see ShowDetail). Explicit "show me" paths — a double-click, the View menu, the tabs,+ // a browser drop — run outside it and open the panel.+ private int _followOnly;++ private bool OpenDetailOnSelect => _vm?.Settings.Current.OpenDetailOnSelect == true;++ private void FollowOnly(Action follow)+ {+ _followOnly++;+ try { follow(); }+ finally { _followOnly--; }+ }++ private void OnTrackSelected(int trackId) => FollowOnly(() => FollowTrack(trackId));++ private void FollowTrack(int trackId){TrackArming.FollowSelection(Engine, trackId); // arm-on-select (#332)@@ -240,7 +260,9 @@ public partial class MainWindow// Selecting a Session slot selects its track everywhere (devices below, the arrangement// header); a slot holding a clip opens it in the Clip tab, and the tab follows the// selection from clip to clip (#334). A Pattern grid stays a Pattern grid on a Drum Rack.- private void OnSessionSlotSelected(int trackId, int scene)+ private void OnSessionSlotSelected(int trackId, int scene) => FollowOnly(() => FollowSessionSlot(trackId, scene));++ private void FollowSessionSlot(int trackId, int scene){if (scene >= 0 && Engine.SessionSlotState(trackId, scene) != 0){@@ -545,7 +567,9 @@ public partial class MainWindow// FR-001a): two or more selected MIDI clips open together — the clicked clip active when// it is one of them — and narrowing back to one clip returns to the single-clip editor.// Selecting a lone clip on another track is already followed through OnTrackSelected.- private void FollowClipSelection()+ private void FollowClipSelection() => FollowOnly(FollowClips);++ private void FollowClips(){if (_session?.IsVisible == true || _vm is null) return;bool shown = DetailFloatingdiff --git a/src/managed/Nota.App/MainWindow.Menu.cs b/src/managed/Nota.App/MainWindow.Menu.csindex a18db30f..614e99cb 100644--- a/src/managed/Nota.App/MainWindow.Menu.cs+++ b/src/managed/Nota.App/MainWindow.Menu.cs@@ -209,7 +209,19 @@ public partial class MainWindowif (_detailMaximized) { SetDetailMaximized(false); Browser.IsVisible = true; return; }Browser.IsVisible = !Browser.IsVisible;}- private void OnMenuToggleClip(object? sender, EventArgs e) => DetailPanel.IsVisible = !DetailPanel.IsVisible;+ private void OnMenuToggleClip(object? sender, EventArgs e)+ {+ if (DetailPanel.IsVisible || DetailFloating) { DetailPanel.IsVisible = !DetailPanel.IsVisible; return; }+ // A closed panel kept following the selection (#308): reopen it through its checked tab+ // so it comes back at that tab's height on the current selection.+ if (DetailClipBtn.IsChecked == true && DetailClipBtn.IsEnabled) OnDetailClip(this, new RoutedEventArgs());+ else if (DetailPatternBtn.IsChecked == true && DetailPatternBtn.IsEnabled) OnDetailPattern(this, new RoutedEventArgs());+ // Devices: the track the chain already shows (Modular can point it at a track without+ // moving the arrangement selection), else the arrangement's selected track.+ else if ((_deviceChain?.TrackId ?? 0) is int shown and > 0) ShowDevices(shown);+ else if (Timeline.SelectedTrackId > 0) ShowDevices(Timeline.SelectedTrackId);+ DetailPanel.IsVisible = true;+ }private void OnMenuToggleOverview(object? sender, EventArgs e){Timeline.ShowOverview = !Timeline.ShowOverview;diff --git a/src/managed/Nota.App/MainWindow.axaml.cs b/src/managed/Nota.App/MainWindow.axaml.csindex a1a37161..76aa4edf 100644--- a/src/managed/Nota.App/MainWindow.axaml.cs+++ b/src/managed/Nota.App/MainWindow.axaml.cs@@ -445,6 +445,7 @@ public partial class MainWindow : Window_deviceChain.AddDeviceRequested += Browser.FocusEffectSearch; // the chain's "+" (#97)HookDeviceMoves(); // Replace… / Delete track on the instrument, Move to track (specs/043)Timeline.TrackSelected += OnTrackSelected;+ Timeline.TrackDevicesRequested += id => ShowDevices(id); // header double-click (#308)Timeline.ClipGeometryChanged += OnClipGeometryChanged; // clip trimmed/moved → follow it in the open editorTimeline.ClipsSplit += SyncTrackModeClips; // a split re-indexes the track's later clipsTimeline.ClipsMoved += OnClipsMoved; // a block move can re-index the open editor's clipsdiff --git a/src/managed/Nota.App/PreferencesWindow.cs b/src/managed/Nota.App/PreferencesWindow.csindex e998f8e6..c4504061 100644--- a/src/managed/Nota.App/PreferencesWindow.cs+++ b/src/managed/Nota.App/PreferencesWindow.cs@@ -1350,6 +1350,14 @@ public sealed partial class PreferencesWindow : NotaWindowsettings.Save();});+ // Detail panel (#308): a selection opens a closed panel only when this is on.+ var openOnSelect = SwitchRow(Loc.T("Open the detail panel when you select a track or clip"), settings?.Current.OpenDetailOnSelect ?? false, on =>+ {+ if (settings is null) return;+ settings.Current.OpenDetailOnSelect = on;+ settings.Save();+ });+return Sections(Section("UI", 10,TopRow(Loc.T("Colour theme"), ThemePicker()),@@ -1364,6 +1372,8 @@ public sealed partial class PreferencesWindow : NotaWindowRow("", Caption(Loc.T("The language of menus, panels and messages. It changes when Nota restarts. Project files and the names you type are never translated.")))),Section(Loc.T("Piano roll"), 10, labelAll,Caption(Loc.T("Shows every note name (C, D, E…) on the piano roll's keys instead of only C. Helpful when learning notes."))),+ Section(Loc.T("Detail panel"), 10, openOnSelect,+ Caption(Loc.T("Off: a click only selects, and an open panel follows it. Double-click a track for its devices or a clip to edit it."))),Section(Loc.T("AI control (MCP)"), 12, enable, details));}@@ -1577,7 +1587,8 @@ public sealed partial class PreferencesWindow : NotaWindow}),(Loc.T("Mouse"), new[]{- (Loc.T("Double-click clip"), Loc.T("Open in the clip editor · on one of several selected MIDI clips, open them all together")),+ (Loc.T("Double-click clip"), Loc.T("Open in the clip editor, opening the detail panel · on one of several selected MIDI clips, open them all together")),+ (Loc.T("Double-click a track header"), Loc.T("Open its devices in the detail panel · a plug-in's own window is Open editor on its card")),(Loc.T("Double-click a browser instrument"), Loc.T("Swap it onto the selected instrument track · clips and effects stay · no track selected starts one")),("⌥ + double-click a browser instrument", Loc.T("Always start a new track with it")),(Loc.T("Right-click the metronome"), Loc.T("Count-in before Play / Record: off · 1 · 2 · 4 bars")),diff --git a/src/managed/Nota.Application/Settings.cs b/src/managed/Nota.Application/Settings.csindex 5104c5cc..b1673498 100644--- a/src/managed/Nota.Application/Settings.cs+++ b/src/managed/Nota.Application/Settings.cs@@ -192,6 +192,10 @@ public sealed class Settings/// <summary>Arm-on-select (#332): selecting an instrument track arms it alone, so the/// keyboard plays the track you're on. Transport ▸ Auto-arm selected track; off by default.</summary>public bool ArmOnSelect { get; set; }+ /// <summary>Open the Detail panel on select (#308): selecting a track or clip opens a closed+ /// Detail panel, as before #308. Off by default — a selection only follows an open panel and+ /// a double-click opens it. Settings → Appearance.</summary>+ public bool OpenDetailOnSelect { get; set; }/// <summary>Label every note of the piano-roll keyboard: the keys column/// shows all note names (C, C#, D …) instead of only C. Off by default; a beginner aid