fix: summary modal not appearing when clicking the button in kanban card

This commit is contained in:
Kacper
2025-12-22 19:36:15 +01:00
parent 6a8b2067fd
commit 4cff240520

View File

@@ -128,6 +128,7 @@ export function AgentInfoPanel({
// Agent Info Panel for non-backlog cards // Agent Info Panel for non-backlog cards
if (showAgentInfo && feature.status !== 'backlog' && agentInfo) { if (showAgentInfo && feature.status !== 'backlog' && agentInfo) {
return ( return (
<>
<div className="mb-3 space-y-2 overflow-hidden"> <div className="mb-3 space-y-2 overflow-hidden">
{/* Model & Phase */} {/* Model & Phase */}
<div className="flex items-center gap-2 text-[11px] flex-wrap"> <div className="flex items-center gap-2 text-[11px] flex-wrap">
@@ -209,6 +210,7 @@ export function AgentInfoPanel({
setIsSummaryDialogOpen(true); setIsSummaryDialogOpen(true);
}} }}
onPointerDown={(e) => e.stopPropagation()} onPointerDown={(e) => e.stopPropagation()}
onMouseDown={(e) => e.stopPropagation()}
className="p-0.5 rounded-md hover:bg-muted/80 transition-colors text-muted-foreground/60 hover:text-muted-foreground shrink-0" className="p-0.5 rounded-md hover:bg-muted/80 transition-colors text-muted-foreground/60 hover:text-muted-foreground shrink-0"
title="View full summary" title="View full summary"
data-testid={`expand-summary-${feature.id}`} data-testid={`expand-summary-${feature.id}`}
@@ -221,7 +223,10 @@ export function AgentInfoPanel({
</p> </p>
</div> </div>
)} )}
{!feature.summary && !summary && !agentInfo.summary && agentInfo.toolCallCount > 0 && ( {!feature.summary &&
!summary &&
!agentInfo.summary &&
agentInfo.toolCallCount > 0 && (
<div className="flex items-center gap-2 text-[10px] text-muted-foreground/60 pt-2 border-t border-border/30"> <div className="flex items-center gap-2 text-[10px] text-muted-foreground/60 pt-2 border-t border-border/30">
<span className="flex items-center gap-1"> <span className="flex items-center gap-1">
<Wrench className="w-2.5 h-2.5" /> <Wrench className="w-2.5 h-2.5" />
@@ -238,6 +243,15 @@ export function AgentInfoPanel({
</> </>
)} )}
</div> </div>
{/* SummaryDialog must be rendered alongside the expand button */}
<SummaryDialog
feature={feature}
agentInfo={agentInfo}
summary={summary}
isOpen={isSummaryDialogOpen}
onOpenChange={setIsSummaryDialogOpen}
/>
</>
); );
} }