From e6c947f061fcc4b9418d72190eabc0c71616ec37 Mon Sep 17 00:00:00 2001 From: scgopi Date: Fri, 18 Sep 2026 19:30:51 -0700 Subject: [PATCH] Drop "to every loop" from the broadcast text (#375) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every recipient of a broadcast read "[graphcode] to every loop — …" as a cue to address every loop itself, so a single broadcast set the graph talking in circles. A broadcast now reads exactly like a `node send`: "[graphcode] Sender: text", or "[graphcode] text" from a human. Co-Authored-By: Claude Opus 5 (1M context) Signed-off-by: scgopi --- GraphcodeKit/Sources/GraphStore.swift | 2 +- graphcode/Tests/BroadcastMessageTests.swift | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GraphcodeKit/Sources/GraphStore.swift b/GraphcodeKit/Sources/GraphStore.swift index 88501ecc..717d2c47 100644 --- a/GraphcodeKit/Sources/GraphStore.swift +++ b/GraphcodeKit/Sources/GraphStore.swift @@ -3385,7 +3385,7 @@ public actor GraphStore { guard !targets.isEmpty, let onDeliverMessage else { return } recordMailroomCommunication(from: senderID, to: "all", text: trimmed, topic: "direct") let sender = senderID.flatMap { id in graph.nodesAtAnyDepth.first { $0.id == id }?.title } - let message = "[graphcode] to every loop — \(sender.map { "\($0): " } ?? "")\(trimmed)" + let message = "[graphcode] \(sender.map { "\($0): " } ?? "")\(trimmed)" let path = graph.project.path let delivered = await withTaskGroup(of: (UUID, Bool).self) { group in for target in targets { diff --git a/graphcode/Tests/BroadcastMessageTests.swift b/graphcode/Tests/BroadcastMessageTests.swift index e71f1804..132c5d67 100644 --- a/graphcode/Tests/BroadcastMessageTests.swift +++ b/graphcode/Tests/BroadcastMessageTests.swift @@ -38,7 +38,7 @@ struct BroadcastMessageTests { await store.handle(.broadcastMessage(text: " main is frozen ", from: sender.id)) #expect(Set(delivered.value.keys) == ["Running", "Idle", "Waiting"]) - #expect(delivered.value["Running"] == "[graphcode] to every loop — Sender: main is frozen") + #expect(delivered.value["Running"] == "[graphcode] Sender: main is frozen") #expect(errors.value.isEmpty) } @@ -61,7 +61,7 @@ struct BroadcastMessageTests { await store.handle(.broadcastMessage(text: "rebase on main", from: nil)) #expect(memos.value["Reachable"] == nil) - #expect(memos.value["Gone"]?.contains { $0.contains("rebase on main") } == true) + #expect(memos.value["Gone"] == ["while you were away: [graphcode] rebase on main"]) #expect(memos.value["AlsoGone"]?.contains { $0.contains("rebase on main") } == true) #expect(errors.value.count == 1) #expect(errors.value.first?.contains("1 of 3") == true)