Compare commits

...

1 Commits

Author SHA1 Message Date
Jiang Bohan
bcb3706a02 fix(views): clear agent live state when switching issues
AgentLiveCard kept its taskStates map across issueId prop changes, and
its merge logic only added newly-fetched tasks without removing stale
ones. Navigating from Issue A (with a running agent) to Issue B via
cmd+k left A's sticky agent status card pinned on B's page.

Key AgentLiveCard and TaskRunHistory by issue id so React remounts
them when the issue changes, guaranteeing fresh state per issue.

Closes MUL-1147
2026-04-20 18:34:00 +08:00

View File

@@ -1273,12 +1273,14 @@ export function IssueDetail({ issueId, onDelete, defaultSidebarOpen = true, layo
</div>
{/* Agent live output — sticky inside the Activity section so it
stays pinned while scrolling through TaskRunHistory + comments. */}
<AgentLiveCard issueId={id} />
stays pinned while scrolling through TaskRunHistory + comments.
Keyed by issue id so switching issues remounts the card and
clears any in-flight task state from the previous issue. */}
<AgentLiveCard key={id} issueId={id} />
{/* Agent execution history */}
<div className="mt-3">
<TaskRunHistory issueId={id} />
<TaskRunHistory key={id} issueId={id} />
</div>
{/* Timeline entries */}