Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
fix(rooms): a queued reason says another room without naming it
milind-sonifebf278f47d1
diff --git a/server/host/room-queued-reason.test.ts b/server/host/room-queued-reason.test.tsindex d1592f9e5e..f6f9e9e59d 100644--- a/server/host/room-queued-reason.test.ts+++ b/server/host/room-queued-reason.test.ts@@ -22,9 +22,9 @@ describe("a queued room hand-off's reason", () => {.toBe("waiting for Alice to finish its turn in this room");});- it("names the room where the hand-off's own teammate is speaking, not a sibling thread's speaker", () => {+ it("says another room, without naming it, when the hand-off's own teammate speaks there, not a sibling thread's speaker", () => {expect(roomQueuedReason(node(), fixture({ x1: speaker("bot-alice", "Alice"), y1: speaker("bot-bob", "Bob") })))- .toBe('waiting for Bob to finish its turn in the room "Room Y"');+ .toBe("waiting for Bob to finish its turn in another room");});it("names the teammate's own turn in this room when it is another thread of the same room", () => {diff --git a/server/host/room-queued-reason.ts b/server/host/room-queued-reason.tsindex 343d69d002..f522f55e95 100644--- a/server/host/room-queued-reason.ts+++ b/server/host/room-queued-reason.ts@@ -35,9 +35,10 @@ export function roomQueuedReason(node: { groupId?: string; botId: string; threadfor (const [threadId, speaker] of deps.speakers()) {if (speaker.botId !== node.botId) continue;const room = deps.roomOfThread(threadId);+ // The other room's name stays out: whoever reads this line may not be in that room.return !room || room.id === group.id? `waiting for ${speaker.name} to finish its turn in this room`- : `waiting for ${speaker.name} to finish its turn in the room ${JSON.stringify(room.name)}`;+ : `waiting for ${speaker.name} to finish its turn in another room`;}return undefined;}