refactor: split Trax out of MainViewModel — Commit 7/12

MainViewModel.Trax.cs: music-player state (_musicPlayer/_music/_musicPlaying,
TraxIdleBrush), TRAX UI (IsMusicPlaying/TraxError/TraxDotBrush/TraxToolTip),
interaction (TraxLeftClick/TraxRightClick/PickTraxTrack), playback
(LoadTrax/PlayTrax/PauseTrax/OnTraxPlaybackEnded/RefreshTraxUi), local
loopback ducking (UpdateTraxLocalGain).

Core keeps the ctor event hookup, LoadLayout/Shutdown/SaveLayoutNow call
sites, and Scenes partial's hotkey dispatch.

Verify: 0 warnings, 246 passed, 2 known failures only.
This commit is contained in:
2026-08-30 08:24:22 -07:00
parent c1126a52b9
commit 535a50192c
3 changed files with 141 additions and 124 deletions
+9 -3
View File
@@ -68,14 +68,20 @@ Progress (Commit N/12 · tag):
`OnLoopbackLevelChanged`/`OnMicConnected`/`OnMicFailed`, `StartMicCaptureAsync`,
audio fields + `ToggleMicMuteCommand`/`ToggleGameMuteCommand`/`OpenMicPickerCommand`).
TRAX stays in core (next commit).
- **Commit 7/12 · `refactor-commit-7`: Trax landed** → `MainViewModel.Trax.cs`
(`_musicPlayer`/`_music`/`_musicPlaying` + `TraxIdleBrush`, `IsMusicPlaying`/
`TraxError`/`TraxDotBrush`/`TraxToolTip`, `TraxLeftClick`/`TraxRightClick`/
`PickTraxTrack`/`LoadTrax`/`PlayTrax`/`PauseTrax`/`OnTraxPlaybackEnded`/
`RefreshTraxUi`/`UpdateTraxLocalGain`). Core keeps the ctor hookup
(`_musicPlayer.PlaybackEnded += ...`), the `LoadLayout`/`Shutdown`/
`SaveLayoutNow` call sites, and the Scenes partial's hotkey dispatch into `TraxLeftClick`.
- Core file keeps: fields, ctor, `Shutdown`/`SaveLayoutNow`/`ScheduleSave`/`LoadLayout`,
`SetPanel`/`ShowOverlay`/`ShowLicenses`, `CreateBrush`, `OpenUrl`/`ComposeEmail`,
`SubmitBug`/`SubmitFeature`, window-geometry pass-through.
- Partials: `Account` ✔ (Commit 1), `License` ✔ (Commit 2), `Scenes` ✔ (Commit 3), `Background` ✔ (Commit 4),
`Webcam` ✔ (Commit 5), `Audio` ✔ (Commit 6),
`Trax` (music player), `Socials` (social bar + dialog),
`Streaming` (go-live/record + health + quality tiers + media source pipeline),
`Webcam` ✔ (Commit 5), `Audio` ✔ (Commit 6), `Trax` ✔ (Commit 7),
`Socials` (social bar + dialog), `Streaming` (go-live/record + health + quality tiers + media source pipeline),
`Chat` (YouTube chat + mock preview + chatbox render), `Overlays` (settings/bug/feature/about
panels + license entry).