Sessions Integration Feature
Nucleic-Session: FC94353F-9F0D-4BCC-AD7C-0FB14E38C2E5 Co-authored-by: Nucleic <[email protected]>
This commit is contained in:
@@ -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)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user