refactor(qconnect): move session mutators to qconnect-app with injected identity (slice 2+4)

Relocate the pure session mutators (refresh_local_renderer_id,
is_peer/local_renderer_active, find_unique_renderer_id,
normalize_active_renderer_id, renderer_allows_remote_volume) and the
QconnectFileAudioQualitySnapshot type into qconnect-app::session.

refresh_local_renderer_id now takes an injected LocalIdentity (device
uuid + device-info) so qconnect-app stays free of the persistence /
transport crates (ADR-006). A thin Tauri wrapper resolves the identity
from default_qconnect_device_info() and delegates, keeping the three
event_sink call sites and the existing tests unchanged. The eager
device-info build is idempotent and side-effect-free, so renderer-id
resolution is byte-identical.

qconnect-app + src-tauri qconnect tests green (33 / 42).

cc
This commit is contained in:
vicrodh committed 2026-06-02 12:47:10 -06:00
1 parent b6ddfc1b5f
commit 979a09e7b2
3 files changed
+146 -100

No files matched your search

+6 -4
View File
@@ -15,10 +15,12 @@ pub use startup::{compute_effective_startup, QconnectStartupMode};
pub use error::QconnectAppError;
pub use events::{NoOpEventSink, QconnectAppEvent, QconnectEventSink};
pub use session::{
compute_connection_state, deferred_join_reason, quality_from_max_audio_quality,
should_arm_renderer_watchdog, should_reask_queue_state, ConnectionDecision,
QconnectLifecycleState, QconnectRendererInfo, QconnectSessionRendererState,
QconnectSessionState, RendererStatus, ServerActiveState,
compute_connection_state, deferred_join_reason, find_unique_renderer_id,
is_local_renderer_active, is_peer_renderer_active, normalize_active_renderer_id,
quality_from_max_audio_quality, refresh_local_renderer_id, renderer_allows_remote_volume,
should_arm_renderer_watchdog, should_reask_queue_state, ConnectionDecision, LocalIdentity,
QconnectFileAudioQualitySnapshot, QconnectLifecycleState, QconnectRendererInfo,
QconnectSessionRendererState, QconnectSessionState, RendererStatus, ServerActiveState,
JOIN_SESSION_REASON_CONTROLLER_REQUEST, JOIN_SESSION_REASON_RECONNECTION,
QCONNECT_RENDERER_LOST_TIMEOUT_MS,
};