diff --git a/CHANGELOG.md b/CHANGELOG.md index 66b7e6f..b6f28d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ All notable changes will be documented here. The format follows [Keep a Changelo - `REL-00003` Firefox qualification covers the installed `firefox-bin` runtime, one-row grouping, visible launcher/icon preference, ambiguity safety, and executable fallback. - `FAD-0301` XDG user-data paths and SQLite startup with versioned, checksummed, transactional schema migrations. - `FAD-0302` Durable application identity records, allowlisted evidence, and custom name/icon overrides with opaque keys for sensitive fallback identities. +- `FAD-0501` Live Avalonia application rows from immutable mixer snapshots, with per-application volume and mute commands and reconnect-aware controls. ### Changed diff --git a/README.md b/README.md index a9ed5e1..4336ad5 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ Fadrio resolves PipeWire playback nodes into stable logical applications and groups every session owned by an application behind one mixer target. Three browser streams should look like one **Brave** or **Firefox** control—not three nodes, renderer processes, or PIDs. > [!IMPORTANT] -> Fadrio is a source-only public alpha, not an end-user release. No supported binary package is published yet. Packaging, persistence, MIDI control, and the finished interface are not implemented. Initial Steam/Proton identification requires corroborating local process, compatibility-directory, and installed-manifest evidence. +> Fadrio is a source-only public alpha, not an end-user release. No supported binary package is published yet. Basic identity persistence and live application controls exist, but durable mixer policies, MIDI control, output control, and the finished interface are not implemented. Initial Steam/Proton identification requires corroborating local process, compatibility-directory, and installed-manifest evidence. ## What works today @@ -35,7 +35,7 @@ Fadrio resolves PipeWire playback nodes into stable logical applications and gro - Stable fallback identities that never use PID. - Multi-session application grouping and application-wide volume/mute commands. - Managed reconnect supervision with generation isolation. -- Diagnostic CLI and minimal Avalonia shell. +- Diagnostic CLI, SQLite-backed identity overrides, and the first live Avalonia application rows with volume and mute controls. ## Architecture @@ -89,6 +89,10 @@ dotnet run --project src/Fadrio.Cli -- profile clear xdg:firefox The override appears in subsequent `apps` output while the canonical ID remains unchanged. +Launch the in-development mixer with `dotnet run --project src/Fadrio.UI`. Its application rows reflect the live PipeWire snapshot and use the same application-wide volume/mute command path as the CLI. Output-device controls, icons, tray behavior, and UI polish remain on the roadmap. + +[See the first live-row screenshot](docs/screenshots/fad-0501-live-fixture.png), captured with a controlled, silent PipeWire fixture rather than a user's applications. + Exercise the shared M0 command path: ```bash diff --git a/ROADMAP.md b/ROADMAP.md index 8e74702..889161e 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -179,7 +179,7 @@ Canonical ticket format: ## 0.5 — UI alpha -- [ ] `FAD-0501` `P0` Connect immutable mixer snapshots and commands to the Avalonia view models. +- [x] `FAD-0501` `P0` Connect immutable mixer snapshots and commands to the Avalonia view models. - [ ] `FAD-0502` `P1` Build accessible output and logical-application rows with mixed-volume state. - [ ] `FAD-0503` `P1` Add stable sorting, interaction freeze, empty, unavailable, and reconnect states. - [ ] `FAD-0504` `P1` Implement tray popup, single-instance activation, and clean shutdown. diff --git a/docs/screenshots/fad-0501-live-fixture.png b/docs/screenshots/fad-0501-live-fixture.png new file mode 100644 index 0000000..013522d Binary files /dev/null and b/docs/screenshots/fad-0501-live-fixture.png differ diff --git a/src/Fadrio.UI/App.axaml.cs b/src/Fadrio.UI/App.axaml.cs index 28d8474..98d0b41 100644 --- a/src/Fadrio.UI/App.axaml.cs +++ b/src/Fadrio.UI/App.axaml.cs @@ -1,6 +1,7 @@ using Avalonia; using Avalonia.Controls.ApplicationLifetimes; using Avalonia.Markup.Xaml; +using Fadrio.Infrastructure; using Fadrio.UI.ViewModels; namespace Fadrio.UI; @@ -13,10 +14,19 @@ public override void OnFrameworkInitializationCompleted() { if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) { - desktop.MainWindow = new MainWindow + var database = new FadrioDatabase(FadrioDataPaths.Resolve().DatabasePath); + MixerUiSession? session = null; + var viewModel = new MainWindowViewModel( + (id, volume) => session!.SetVolumeAsync(id, volume), + (id, muted) => session!.SetMuteAsync(id, muted)); + session = new MixerUiSession(viewModel, database); + var window = new MainWindow { - DataContext = new MainWindowViewModel() + DataContext = viewModel }; + window.Opened += (_, _) => session.Start(); + window.Closed += async (_, _) => await session.DisposeAsync(); + desktop.MainWindow = window; } base.OnFrameworkInitializationCompleted(); diff --git a/src/Fadrio.UI/MainWindow.axaml b/src/Fadrio.UI/MainWindow.axaml index 15c0301..4bf7450 100644 --- a/src/Fadrio.UI/MainWindow.axaml +++ b/src/Fadrio.UI/MainWindow.axaml @@ -12,13 +12,34 @@ WindowStartupLocation="CenterScreen"> - + + - + + + + + + + + + + + +