feat(qbz-slint): Qobuz Connect renderer + controller integration

Port the QConnect adapter to the Slint frontend so qbz acts as a full peer
(renderer + controller), inheriting the shared qconnect-app hardening.

- Device-info / join payloads + transport config (piece a).
- SlintQconnectEventSink: queue materialize / renderer-command apply /
  session-management via the shared qconnect-app orchestration; renderer
  ready-report on SetActive(true).
- SlintSessionLoopHost + service connect recipe (subscribe-before-spawn) +
  controller bootstrap + deferred renderer-join; connect/disconnect toggle
  wired in the now-playing bar flyout.
- Renderer sync: outbound RndrSrvrStateUpdated reports (position / current
  queue item / file+device audio quality) while qbz is the active local
  renderer, and inbound UI refresh (now-playing card + queue sidebar) after
  remote queue / state changes.
- Controller-side queue push: when the local queue changes while connected,
  push it to the session (QueueLoadTracks) with all-or-nothing admission
  (refuse mixed local/Plex queues; offline qobuz_download is eligible) and
  echo suppression against the last-applied / last-pushed queue.
- Error + lifecycle toasts; DEV diagnostics modal (live session status +
  selectable rolling event log) opened from the connect flyout.

cc
This commit is contained in:
vicrodh committed 2026-06-03 00:11:37 -06:00
1 parent 3861efa79f
commit 44876d01be
10 files changed
+1691 -6

No files matched your search

+43 -3
View File
@@ -19,7 +19,7 @@ import { IconButton, PlayButton } from "../primitives/BarControls.slint";
import { SeekBar } from "SeekBar.slint";
import { SongCard } from "SongCard.slint";
import { TransportControls } from "TransportControls.slint";
import { NowPlayingState, ShellState, AppearanceState, SettingsState, TooltipState } from "../state.slint";
import { NowPlayingState, ShellState, AppearanceState, SettingsState, TooltipState, QconnectDevState } from "../state.slint";
// IconButton + PlayButton now live in primitives/BarControls.slint (shared
// with TransportControls). ConnectButton + ToggleRow stay local (bar-only).
@@ -352,11 +352,11 @@ export component PlayerBar inherits Rectangle {
width: 8px;
height: 8px;
border-radius: 4px;
background: NowPlayingState.is-remote ? #22c55e : Theme.text-muted;
background: NowPlayingState.qconnect-connected ? #22c55e : Theme.text-muted;
}
}
Text {
text: NowPlayingState.is-remote
text: NowPlayingState.qconnect-connected
? @tr("Connected")
: @tr("Disconnected");
color: Theme.text-secondary;
@@ -388,6 +388,46 @@ export component PlayerBar inherits Rectangle {
}
}
}
// Connect / Disconnect toggle.
Rectangle {
height: 34px;
border-radius: Radius.sm;
background: connect-ta.pressed
? Theme.accent-pressed
: connect-ta.has-hover ? Theme.accent-hover : Theme.accent;
connect-ta := TouchArea {
clicked => {
NowPlayingState.qconnect-toggle();
qconnect-menu.close();
}
}
Text {
text: NowPlayingState.qconnect-connected
? @tr("Disconnect")
: @tr("Connect");
color: Theme.accent-text;
font-size: 13px;
font-weight: 600;
horizontal-alignment: center;
vertical-alignment: center;
}
}
// DEV: open the QConnect diagnostics modal.
diag-ta := TouchArea {
height: 22px;
mouse-cursor: pointer;
clicked => {
QconnectDevState.open = true;
qconnect-menu.close();
}
Text {
text: "Diagnostics";
color: diag-ta.has-hover ? Theme.text-secondary : Theme.text-muted;
font-size: 11px;
horizontal-alignment: center;
vertical-alignment: center;
}
}
}
}
}