diff --git a/CLAUDE.md b/CLAUDE.md index 5900203..18f7093 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1174,7 +1174,7 @@ Two independent apps that talk over HTTP: / Try again (`backend_restart`). The shell has no timeout of its own. Before ready it answers quit requests itself — nothing can be unsaved — and stops at ready so it never races `QuitGuard`), `SaveBar` (+ "Discard changes…" when - dirty, and the settings gear beside it, whose menu (or `?` anywhere) opens `ShortcutsDialog` — a KEYBOARD MAP (decided 2026-10-15): keys lit in the colour of what they do, a caption explaining the key pointed at or pressed (pressing explains, it never acts: a capture-phase listener keeps the deck's and table's keys from firing), holding or picking ⇧ / Cmd-Ctrl relights it with that layer, mouse gestures listed beneath. It shrinks to fit the dialog and drops the words on the keys when too small. Its content is `lib/shortcuts.ts`, written out BY HAND, so a new or changed shortcut in `lib/deckKeys.ts` / `TrackTable` must be added there too — and `AppSettings` ("Konduktor Settings…": app-level prefs, each with its default in `APP_SETTING_DEFAULTS` and read through `useAppSetting`; today `expandPlaylistFolders` and `exportRootFolder`, both default off — the latter read by the backend at `run_export` and passed down as `ExportPayload.root_folder` — and `timeReadoutDecimals` (0–3, default 1: the deck's ELAPSED / REMAIN, truncated, never rounded)) — and its own panel, `PerformanceSettings` ("Performance mode…", decided 2026-11-03), whose values sit in the same `APP_SETTING_DEFAULTS`: `perfStems` (default on: a stem track loaded INTO performance mode plays its stems, else its mix; read at load, never reloads a deck), `keylockDefault` (on), `eqKill` (off = -26 dB), `crossfaderSharpness` (0..1, 0 = smooth, default 0.5: a slider beside `CrossfaderCurveGraph`, which draws both channels' curves and where the crossfader is; dragging it moves the mixer at once and saves through the debounced prefs writer), and the Filter FX: `fxFilterRange` (the Filter alone) and `fxEffectRange` (under an effect), each full / musical / gentle, `fxFilterResonance`, `fxReverbSize`, `fxDelayBeats`, `fxCrusherDrive`, `fxFlangerBeats` (the mixer's per-channel PRM knob was removed). PrepStrip copies them into `mixerState`. The Sidebar holds folder open state as per-id overrides of that setting, reset on a new library or a change of the setting, and carried to the new ids when a rename/move changes a folder's path id)), `Toolbar` (search/filters; columns are chosen by right-clicking the table header), + dirty, and the settings gear beside it, whose menu (or `?` anywhere) opens `ShortcutsDialog` — a KEYBOARD MAP (decided 2026-10-15): keys lit in the colour of what they do, a caption explaining the key pointed at or pressed (pressing explains, it never acts: a capture-phase listener keeps the deck's and table's keys from firing), holding or picking ⇧ / Cmd-Ctrl relights it with that layer, mouse gestures listed beneath. It shrinks to fit the dialog and drops the words on the keys when too small. Its content is `lib/shortcuts.ts`, written out BY HAND, so a new or changed shortcut in `lib/deckKeys.ts` / `TrackTable` must be added there too — and `AppSettings` ("Konduktor Settings…": app-level prefs, each with its default in `APP_SETTING_DEFAULTS` and read through `useAppSetting`; today `expandPlaylistFolders` and `exportRootFolder`, both default off — the latter read by the backend at `run_export` and passed down as `ExportPayload.root_folder` — and `timeReadoutDecimals` (0–3, default 1: the deck's ELAPSED / REMAIN, truncated, never rounded)) — and its own panel, `PerformanceSettings` ("Performance mode…", decided 2026-11-03), whose values sit in the same `APP_SETTING_DEFAULTS`: `perfStems` (default on: a stem track loaded INTO performance mode plays its stems, else its mix; read at load, never reloads a deck), `keylockDefault` (on), `autoFocusDeck` (on: any press on a deck focuses it; off: only its A/B badge, a button), `eqKill` (off = -26 dB), `crossfaderSharpness` (0..1, 0 = smooth, default 0.5: a slider beside `CrossfaderCurveGraph`, which draws both channels' curves and where the crossfader is; dragging it moves the mixer at once and saves through the debounced prefs writer), and the Filter FX: `fxFilterRange` (the Filter alone) and `fxEffectRange` (under an effect), each full / musical / gentle, `fxFilterResonance`, `fxReverbSize`, `fxDelayBeats`, `fxCrusherDrive`, `fxFlangerBeats` (the mixer's per-channel PRM knob was removed). PrepStrip copies them into `mixerState`. The Sidebar holds folder open state as per-id overrides of that setting, reset on a new library or a change of the setting, and carried to the new ids when a rename/move changes a folder's path id)), `Toolbar` (search/filters; columns are chosen by right-clicking the table header), `TrackTable` (**the one track list** — All Tracks, playlists, exports and devices. TanStack Table + **virtualized** grid; per-row play button, configurable columns, header sorting, inline double-click editing, and @@ -1391,7 +1391,8 @@ Two independent apps that talk over HTTP: the app: 175 synced to 125 lands at 125.00 within 0.005 beat and follows the master's pitch. Leaving performance mode releases SYNC. App holds `decks: {A, B}` (`DeckSlot`: track, origin, playRequest, cuesRefresh), `focusedDeck` and - `performance`; a load, Enter, a row's play button and a drop on the strip + `performance`; the focus moves on any press on a deck (or only its A/B + badge, with the `autoFocusDeck` setting off); a load, Enter, a row's play button and a drop on the strip go to the FOCUSED deck (A outside the mode), "Load to Deck A/B" to either, and the table lights the focused deck's row. Entering with B empty focuses B. B's `useDeck` stays MOUNTED while hidden — leaving pauses it, coming diff --git a/frontend/src/components/AppSettings.tsx b/frontend/src/components/AppSettings.tsx index 2ccd9d1..3f47c03 100644 --- a/frontend/src/components/AppSettings.tsx +++ b/frontend/src/components/AppSettings.tsx @@ -28,6 +28,8 @@ export const APP_SETTING_DEFAULTS = { perfStems: true, /** A deck's keylock starts on. */ keylockDefault: true, + /** Any press on a deck focuses it (else only its A/B badge). */ + autoFocusDeck: true, /** EQ full left kills the band (else -26 dB, DJM-style). */ eqKill: false, /** The crossfader curve: 0 smooth (constant power) .. 1 sharp (a cut). @@ -183,14 +185,14 @@ export function AppSettings({ onClose }: { onClose: () => void }) { } export function Check({ checked, onChange, title, text }: { - checked: boolean; onChange: (v: boolean) => void; title: string; text: string + checked: boolean; onChange: (v: boolean) => void; title: string; text?: string }) { return ( ) diff --git a/frontend/src/components/PerformanceSettings.tsx b/frontend/src/components/PerformanceSettings.tsx index 0245aee..2ee4093 100644 --- a/frontend/src/components/PerformanceSettings.tsx +++ b/frontend/src/components/PerformanceSettings.tsx @@ -37,6 +37,7 @@ export function PerformanceSettings({ onClose }: { onClose: () => void }) { const writePrefs = usePrefsWriter() const perfStems = useAppSetting('perfStems') const keylockDefault = useAppSetting('keylockDefault') + const autoFocusDeck = useAppSetting('autoFocusDeck') const eqKill = useAppSetting('eqKill') const sharpnessSetting = useAppSetting('crossfaderSharpness') const fxFilterRange = useAppSetting('fxFilterRange') @@ -81,22 +82,24 @@ export function PerformanceSettings({ onClose }: { onClose: () => void }) {
- The second deck and the mixer (P, or the decks button in the deck's header). -