fix(conversation-detail-panel): keep tab subtree mounted across tile-mode layout switch

This commit is contained in:
xintaofei
2026-04-22 21:25:09 +08:00
parent c11a57921d
commit 8095a75b5f

View File

@@ -1433,13 +1433,21 @@ export function ConversationDetailPanel() {
className="relative h-full min-h-0 overflow-hidden" className="relative h-full min-h-0 overflow-hidden"
onPointerDown={handleContextMenuTriggerPointerDown} onPointerDown={handleContextMenuTriggerPointerDown}
> >
{canTile ? ( {/* Stable wrapper across canTile flip — otherwise sibling tabs remount and a live streaming response is torn down. */}
<ScrollArea x="scroll" y="hidden" className="h-full w-full"> <ScrollArea
<div className="flex h-full flex-row">{tabElements}</div> x={canTile ? "scroll" : "hidden"}
</ScrollArea> y="hidden"
) : ( className="h-full w-full"
tabElements >
<div
className={cn(
"relative h-full",
canTile && "flex min-w-full flex-row"
)} )}
>
{tabElements}
</div>
</ScrollArea>
</div> </div>
</ContextMenuTrigger> </ContextMenuTrigger>
<ContextMenuContent> <ContextMenuContent>