Sessions Integration Feature

Nucleic-Session: FC94353F-9F0D-4BCC-AD7C-0FB14E38C2E5
Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
2026-07-05 01:54:40 -07:00
co-authored by Nucleic
parent 62d5cfb3b1
commit 36e6725434
@@ -691,15 +691,19 @@ final class RemoteStore: ObservableObject {
func open(_ sessionID: SessionID) { func open(_ sessionID: SessionID) {
openSessionID = 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 = [] openEvents = []
openApprovals = [] openApprovals = []
openDiff = nil openDiff = nil
diffLoading = false diffLoading = false
markOpened(sessionID) markOpened(sessionID)
if demoMode { seedDemoTranscript(sessionID); return } if demoMode { seedDemoTranscript(sessionID); return }
// The open transcript belongs to the active host; tell its connection so it forwards the // Tell the owning connection so it forwards the snapshot/events (and dedupes them), re-derive
// snapshot/events (and dedupes them), then subscribe. // the context host (capabilities/scope/catalog/connectivity now follow it), then subscribe.
activeConnection?.openSessionID = sessionID connection(owningSession: sessionID)?.openSessionID = sessionID
rebuildAggregate()
send(.subscribe(Subscribe(sessionID: sessionID, sinceSeq: nil, verbosity: .full))) send(.subscribe(Subscribe(sessionID: sessionID, sinceSeq: nil, verbosity: .full)))
} }