From 36e6725434d54628693a1765ce880d8194008b34 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 01:54:40 -0700 Subject: [PATCH] Sessions Integration Feature Nucleic-Session: FC94353F-9F0D-4BCC-AD7C-0FB14E38C2E5 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/RemoteStore.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift index 5d89059..ab110a0 100644 --- a/NucleicRemote/NucleicRemote/Models/RemoteStore.swift +++ b/NucleicRemote/NucleicRemote/Models/RemoteStore.swift @@ -691,15 +691,19 @@ final class RemoteStore: ObservableObject { func open(_ sessionID: SessionID) { openSessionID = sessionID + // Record which Mac owns this session (mesh P3) so its connection forwards the transcript and + // the host-specific projected values follow it. + openSessionHostID = connection(owningSession: sessionID)?.hostID openEvents = [] openApprovals = [] openDiff = nil diffLoading = false markOpened(sessionID) if demoMode { seedDemoTranscript(sessionID); return } - // The open transcript belongs to the active host; tell its connection so it forwards the - // snapshot/events (and dedupes them), then subscribe. - activeConnection?.openSessionID = sessionID + // Tell the owning connection so it forwards the snapshot/events (and dedupes them), re-derive + // the context host (capabilities/scope/catalog/connectivity now follow it), then subscribe. + connection(owningSession: sessionID)?.openSessionID = sessionID + rebuildAggregate() send(.subscribe(Subscribe(sessionID: sessionID, sinceSeq: nil, verbosity: .full))) }