refactor(qconnect): relocate QconnectRemoteSyncState struct to qconnect-app (slice 2+4)

Move the cross-submodule remote-sync accumulator into the new
frontend-agnostic qconnect_app::sync_state module. All field types are
now frontend-agnostic (primitives / qconnect-core / qconnect-app), so
the struct moves cleanly with pub fields; the Tauri qconnect module
re-exports it so existing super::QconnectRemoteSyncState references and
the Arc<Mutex<>> creation/threading in service.rs compile unchanged.

It stays ONE struct under ONE lock by design: capture_session_state_takeover_input
reads session topology together with last_renderer_playing_state, and the
materialize path reads last_renderer_* with last_applied_queue_state, all
atomically. Splitting them would tear the takeover decision, so the whole
accumulator relocates as a unit (single-lock locking is byte-identical).

Two test-only re-exports (find_unique_renderer_id, QconnectSessionRendererState)
are gated #[cfg(test)] since their non-test consumers moved to qconnect-app.

qconnect-app + src-tauri qconnect tests green (33 / 42), no new warnings.

cc
This commit is contained in:
vicrodh committed 2026-06-02 12:58:51 -06:00
1 parent 979a09e7b2
commit a79971e470
4 files changed
+83 -48

No files matched your search

+2
View File
@@ -9,6 +9,7 @@ mod feature_flags;
pub mod session;
mod state;
pub mod startup;
mod sync_state;
pub use app::QconnectApp;
pub use startup::{compute_effective_startup, QconnectStartupMode};
@@ -35,3 +36,4 @@ pub use qconnect_core::{
};
pub use qconnect_protocol::{QueueCommandType, RendererReport, RendererReportType};
pub use state::QconnectRuntimeState;
pub use sync_state::QconnectRemoteSyncState;