diff --git a/NucleicRemote/NucleicRemote/Views/Transcript/TranscriptProjection.swift b/NucleicRemote/NucleicRemote/Views/Transcript/TranscriptProjection.swift index 07ceee1..8e43105 100644 --- a/NucleicRemote/NucleicRemote/Views/Transcript/TranscriptProjection.swift +++ b/NucleicRemote/NucleicRemote/Views/Transcript/TranscriptProjection.swift @@ -385,6 +385,9 @@ enum TranscriptProjection { var topLevel: [AgentEvent] = [] var byParent: [String: [AgentEvent]] = [:] for event in events { + // Older desktop builds persisted mesh coordination as synthetic userText. Keep those + // backend-only rows out of existing mobile transcripts as well as new deliveries. + if isLegacyMeshCoordinationInput(event) { continue } if let owner = subagentOwner(of: event, parentOf: parentOf) { byParent[owner, default: []].append(event) } else { @@ -394,6 +397,13 @@ enum TranscriptProjection { return (topLevel, byParent) } + private static func isLegacyMeshCoordinationInput(_ event: AgentEvent) -> Bool { + guard case .userText(let chunk) = event.kind, + let lineBreak = chunk.text.firstIndex(of: "\n") else { return false } + let header = chunk.text[..