Skip to content

Commit 8f18ccf

Browse files
committed
rollout stream edge case
1 parent 8cd527c commit 8f18ccf

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/message-content/message-content.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -359,17 +359,17 @@ function parseBlocks(blocks: ContentBlock[]): MessageSegment[] {
359359
}
360360
} else {
361361
// Unparented end blocks come from legacy/partial persisted streams
362-
// that predate parentToolCallId. Only collapse a lane this way when
363-
// we have no parented groups, so we don't force-close legitimate
364-
// parallel lanes mid-render.
365-
const hasParentedGroup = [...groupsByKey.keys()].some((key) => !key.endsWith(':legacy'))
366-
if (!hasParentedGroup) {
367-
for (const g of groupsByKey.values()) {
368-
if (g.agentName !== 'mothership') {
369-
g.isOpen = false
370-
g.isDelegating = false
371-
}
362+
// that predate parentToolCallId. Close lanes that are themselves
363+
// legacy-keyed without touching parented lanes — this avoids
364+
// force-closing legitimate parallel parented lanes while still
365+
// releasing stranded legacy lanes in mixed/migration streams.
366+
for (const [key, g] of groupsByKey) {
367+
if (key.endsWith(':legacy') && g.agentName !== 'mothership') {
368+
g.isOpen = false
369+
g.isDelegating = false
372370
}
371+
}
372+
if (activeGroupKey?.endsWith(':legacy')) {
373373
activeGroupKey = null
374374
}
375375
}

0 commit comments

Comments
 (0)