Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

feat(issues): open the full log straight from the agent run row (MUL-8335) (#9641)

Jiayuan Zhangc2471a9ba76c
diff --git a/packages/views/issues/components/inline-comment-run.test.tsx b/packages/views/issues/components/inline-comment-run.test.tsx
index 749c0580ff..b6bcb13a50 100644
--- a/packages/views/issues/components/inline-comment-run.test.tsx
+++ b/packages/views/issues/components/inline-comment-run.test.tsx
@@ -257,11 +257,28 @@ describe("InlineCommentRun", () => {
expect(expanded).toBe(before);
expect(expanded).toHaveFocus();
expect(expanded).toHaveAttribute("aria-expanded", "true");
- await screen.findByRole("button", { name: "Open full log" });
+ await screen.findByText("pnpm test");
fireEvent.click(expanded, { detail: 0 });
expect(screen.getByRole("button", { name: /View activity/ })).toHaveFocus();
expect(screen.getByRole("button", { name: /View activity/ })).toHaveAttribute("aria-expanded", "false");
});
+ it.each(["running", "completed", "failed"] as const)("opens the full log from the %s run row without expanding it", async (status) => {
+ vi.mocked(api.listTaskMessages).mockResolvedValue(messages);
+ setup(task({ status, completed_at: status === "running" ? null : "2026-09-07T00:01:23Z" }));
+ const trigger = screen.getByRole("button", { name: "Open full log" });
+ expect(trigger).toHaveAttribute("aria-haspopup", "dialog");
+ fireEvent.click(trigger);
+ await waitFor(() => expect(screen.getByRole("dialog")).toHaveTextContent("Full transcript"));
+ expect(screen.getByRole("button", { name: /View activity/ })).toHaveAttribute("aria-expanded", "false");
+ });
+
+ it.each(["queued", "dispatched", "waiting_local_directory"] as const)("offers no full log before a %s run starts", (status) => {
+ vi.mocked(api.listTaskMessages).mockResolvedValue([]);
+ setup(task({ status }));
+ fireEvent.click(screen.getByRole("button", { name: /View activity/ }));
+ expect(screen.queryByRole("button", { name: "Open full log" })).not.toBeInTheDocument();
+ });
+
it("shows real activity, expands in place, follows WS data and retains the open transcript at completion", async () => {
vi.mocked(api.listTaskMessages).mockResolvedValue(messages);
const current = task();
diff --git a/packages/views/issues/components/inline-comment-run.tsx b/packages/views/issues/components/inline-comment-run.tsx
index d1abfa6ad3..a9e5848b7b 100644
--- a/packages/views/issues/components/inline-comment-run.tsx
+++ b/packages/views/issues/components/inline-comment-run.tsx
@@ -1,7 +1,7 @@
"use client";
import { useEffect, useId, useMemo, useState, type ReactNode } from "react";
-import { AlertCircle, Brain, Check, ChevronRight, CirclePause, Clock3, CornerDownRight, ExternalLink, Loader2, MessageSquare, RotateCcw, ScrollText, Square, Terminal } from "lucide-react";
+import { AlertCircle, Brain, Check, ChevronRight, CirclePause, Clock3, CornerDownRight, Loader2, MessageSquare, RotateCcw, ScrollText, Square, Terminal } from "lucide-react";
import { useQuery } from "@tanstack/react-query";
import { toast } from "sonner";
import { useWorkspaceId } from "@multica/core/hooks";
@@ -158,17 +158,20 @@ export function InlineCommentRun({ run, className, viewState, showIdentity = fal
const stopDialog = <TerminateTaskConfirmDialog open={confirmStop} onOpenChange={setConfirmStop}
showRunningNote={task.status !== "queued"}
onConfirm={() => cancel.mutate(task.id, { onError: () => toast.error(t(($) => $.execution_log.cancel_failed)) })} />;
+ const fullLogButton = <Tooltip>
+ <TooltipTrigger render={<Button type="button" size="icon-sm" variant="ghost"
+ className="text-muted-foreground aria-expanded:bg-transparent aria-expanded:hover:bg-muted dark:aria-expanded:hover:bg-muted/50"
+ aria-label={t(($) => $.inline_run.full_log)} aria-haspopup="dialog" aria-expanded={fullLogOpen}
+ onClick={openFullLog}>
+ <ScrollText aria-hidden className="size-3.5" />
+ </Button>} />
+ <TooltipContent>{t(($) => $.inline_run.full_log)}</TooltipContent>
+ </Tooltip>;
+ // Before the agent session starts there is no transcript to open.
+ const hasTranscript = !PRE_RUN_STATUSES.includes(task.status);
if (presentation === "header" && showCommentRunInHeader(run)) {
return <span className="inline-flex shrink-0" data-comment-actions data-run-id={task.id}>
- <Tooltip>
- <TooltipTrigger render={<Button type="button" size="icon-sm" variant="ghost"
- className="text-muted-foreground aria-expanded:bg-transparent aria-expanded:hover:bg-muted dark:aria-expanded:hover:bg-muted/50"
- aria-label={t(($) => $.inline_run.full_log)} aria-haspopup="dialog" aria-expanded={fullLogOpen}
- onClick={openFullLog}>
- <ScrollText aria-hidden className="size-3.5" />
- </Button>} />
- <TooltipContent>{t(($) => $.inline_run.full_log)}</TooltipContent>
- </Tooltip>
+ {fullLogButton}
{transcript}
</span>;
}
@@ -218,6 +221,7 @@ export function InlineCommentRun({ run, className, viewState, showIdentity = fal
<ChevronRight ref={state.disclosure.chevronRef} aria-hidden className={cn("size-3.5 shrink-0", expanded && "rotate-90")} />
</button>
<span className={cn("shrink-0 whitespace-nowrap text-caption tabular-nums text-muted-foreground", showIdentity && !active && "@max-[32rem]/run:hidden")}>{elapsed}</span>
+ {hasTranscript && fullLogButton}
{stopButton}
{(!hasReply || replacesFailureNotice) && ended && <Button
size="xs" variant="outline" className={cn(showIdentity && "@max-[32rem]/run:size-6 @max-[32rem]/run:p-0")} disabled={retry.isPending || retry.isSuccess}
@@ -246,8 +250,6 @@ export function InlineCommentRun({ run, className, viewState, showIdentity = fal
{interleaveSteers(rows.slice(-visibleCount), steers, rows.length > visibleCount).map((item) => "steer" in item
? <InlineSteer key={`steer:${item.steer.id}`} steer={item.steer} />
: <InlineStep key={item.row.seq} row={item.row} live={active} formatText={formatText} />)}
- <button type="button" className="flex items-center gap-1.5 rounded-xs py-2 text-caption text-muted-foreground hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
- onClick={openFullLog}>{t(($) => $.inline_run.full_log)}<ExternalLink className="size-3" /></button>
</div>}
</div>
{transcript}
@@ -256,6 +258,8 @@ export function InlineCommentRun({ run, className, viewState, showIdentity = fal
);
}
+const PRE_RUN_STATUSES: AgentTask["status"][] = ["queued", "dispatched", "waiting_local_directory"];
+
interface DeliveredSteer {
id: string;
actorType: string;