File tree Expand file tree Collapse file tree
apps/sim/app/workspace/[workspaceId]/home/components/message-content Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments