Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(runs): keep long tool names inside run step rows (#11515)
pseudoyu28a6760f9db8
diff --git a/packages/views/chat/components/chat-message-list.test.tsx b/packages/views/chat/components/chat-message-list.test.tsxindex 4d01ff53cb..44eb3cb578 100644--- a/packages/views/chat/components/chat-message-list.test.tsx+++ b/packages/views/chat/components/chat-message-list.test.tsx@@ -3,6 +3,7 @@ import { act, fireEvent, render, screen } from "@testing-library/react";import { QueryClient, QueryClientProvider } from "@tanstack/react-query";import { I18nProvider } from "@multica/core/i18n/react";import { chatKeys } from "@multica/core/chat/queries";+import { TooltipProvider } from "@multica/ui/components/ui/tooltip";import type { Attachment, TaskMessagePayload } from "@multica/core/types";import type { ReactElement } from "react";import enChat from "../../locales/en/chat.json";@@ -527,6 +528,37 @@ describe("ChatMessageList tool rows (#8835 regression)", () => {});describe("ChatMessageList command tool rows", () => {+ it("shows a clipped tool name and summary on focus and keeps the row expandable", async () => {+ const tool = "mcp__company-knowledge-base__search_documents_with_filters";+ const qc = new QueryClient();+ qc.setQueryData(chatKeys.taskMessages(TASK_ID), [+ taskMsg(0, "tool_use", { tool, input: { query: "release checklist" } }),+ ]);+ render(+ <TooltipProvider>+ <I18nProvider locale="en" resources={TEST_RESOURCES}>+ <QueryClientProvider client={qc}>+ <ChatMessageList messages={[]} pendingTask={{ task_id: TASK_ID, status: "running" }} availability="online" />+ </QueryClientProvider>+ </I18nProvider>+ </TooltipProvider>,+ );+ const label = await screen.findByText(tool);+ label.style.overflowX = "hidden";+ Object.defineProperties(label, {+ scrollWidth: { value: 360 },+ clientWidth: { value: 120 },+ });++ const trigger = screen.getByRole("button", { name: /mcp__company-knowledge-base__search_documents_with_filters/ });+ await act(async () => { trigger.focus(); });+ expect(trigger).toHaveFocus();+ expect(document.querySelector("[data-slot='tooltip-content']")).toHaveTextContent(`${tool} · release checklist`);++ fireEvent.click(trigger);+ expect(trigger).toHaveAttribute("aria-expanded", "true");+ });+it("shows a command line by line, not as escaped JSON", async () => {const qc = new QueryClient();qc.setQueryData(chatKeys.taskMessages(TASK_ID), [diff --git a/packages/views/chat/components/chat-message-list.tsx b/packages/views/chat/components/chat-message-list.tsxindex 4a6fd18227..574477d35b 100644--- a/packages/views/chat/components/chat-message-list.tsx+++ b/packages/views/chat/components/chat-message-list.tsx@@ -27,6 +27,7 @@ import {RotateCw,} from "@multica/ui/icons";import { CopyCheckIcon } from "@multica/ui/components/common/copy-check-icon";+import { TruncatedTooltip } from "@multica/ui/components/common/truncated-tooltip";import { useScrollFade } from "@multica/ui/hooks/use-scroll-fade";import { useReducedMotion } from "@multica/core/appearance";import { isTaskMessageTaskId, taskMessagesOptions } from "@multica/core/chat/queries";@@ -1427,20 +1428,23 @@ function ToolCallRow({ item }: { item: ChatTimelineItem }) {});const hasInput = item.input && Object.keys(item.input).length > 0;const command = useMemo(() => readCommandInput(item.input), [item.input]);+ const tooltip = [item.tool, summary].filter(Boolean).join(" · ");return (<Collapsible open={open} onOpenChange={setOpen}>- <CollapsibleTrigger className="flex w-full items-center gap-1.5 rounded-xs px-1 -mx-1 py-0.5 text-caption hover:bg-accent/30 transition-colors">- <ChevronRight- className={cn(- "h-3 w-3 shrink-0 text-muted-foreground transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none",- open && "rotate-90",- !hasInput && "invisible",- )}- />- <span className="font-medium text-foreground shrink-0">{item.tool}</span>- {summary && <span className="truncate text-muted-foreground">{summary}</span>}- </CollapsibleTrigger>+ <TruncatedTooltip content={tooltip}>+ <CollapsibleTrigger className="flex w-full items-center gap-1.5 rounded-xs px-1 -mx-1 py-0.5 text-caption hover:bg-accent/30 transition-colors">+ <ChevronRight+ className={cn(+ "h-3 w-3 shrink-0 text-muted-foreground transition-transform duration-150 ease-[cubic-bezier(0.23,1,0.32,1)] motion-reduce:transition-none",+ open && "rotate-90",+ !hasInput && "invisible",+ )}+ />+ <span className="max-w-[60%] shrink-0 truncate font-medium text-foreground">{item.tool}</span>+ {summary && <span className="truncate text-muted-foreground">{summary}</span>}+ </CollapsibleTrigger>+ </TruncatedTooltip>{hasInput && (<CollapsibleContent>{command ? (diff --git a/packages/views/common/task-transcript/agent-transcript-dialog.tsx b/packages/views/common/task-transcript/agent-transcript-dialog.tsxindex a86aa8a4e7..34316d1735 100644--- a/packages/views/common/task-transcript/agent-transcript-dialog.tsx+++ b/packages/views/common/task-transcript/agent-transcript-dialog.tsx@@ -1674,7 +1674,7 @@ function StepRow({<span className="flex min-w-0 flex-1 items-baseline gap-1.5"><spanclassName={cn(- "shrink-0 text-caption font-medium",+ "max-w-[60%] shrink-0 truncate text-caption font-medium",row.kind === "error" ? "text-destructive" : "text-foreground",)}>@@ -1732,7 +1732,7 @@ function GroupRow({)}/><span className="flex min-w-0 flex-1 items-baseline gap-1.5">- <span className="shrink-0 text-caption font-medium">{row.tool}</span>+ <span className="max-w-[60%] shrink-0 truncate text-caption font-medium">{row.tool}</span>{/* Name the first thing it touched, not just how many: "Read · 4calls" hides the one detail that makes a folded group scannable. */}<span className="truncate font-mono text-micro text-muted-foreground">@@ -1854,8 +1854,8 @@ function StepInspector({<aside className="flex w-full shrink-0 flex-col border-l-0 bg-muted/25 md:w-[26rem] md:border-l"><div className="flex items-center gap-2 border-b px-3 py-2"><StepIcon step={step} className="h-4 w-4 shrink-0 text-muted-foreground" />- <span className="shrink-0 text-label font-semibold">{title}</span>- <span className="flex min-w-0 flex-1 items-center gap-1.5 text-micro text-muted-foreground">+ <span title={title} className="line-clamp-3 min-w-0 wrap-anywhere text-label font-semibold">{title}</span>+ <span className="flex flex-1 items-center gap-1.5 whitespace-nowrap text-micro text-muted-foreground">{offset && <span className="font-mono tabular-nums">{offset}</span>}{call?.durationMs !== undefined && (<>diff --git a/packages/views/issues/components/inline-comment-run.test.tsx b/packages/views/issues/components/inline-comment-run.test.tsxindex 09cc1de533..41191f68b8 100644--- a/packages/views/issues/components/inline-comment-run.test.tsx+++ b/packages/views/issues/components/inline-comment-run.test.tsx@@ -6,6 +6,7 @@ import type { ReactNode } from "react";import { api } from "@multica/core/api";import { chatKeys } from "@multica/core/chat/queries";import { issueKeys } from "@multica/core/issues/queries";+import { TooltipProvider } from "@multica/ui/components/ui/tooltip";import type { AgentTask, TimelineEntry } from "@multica/core/types";import type { TaskMessagePayload } from "@multica/core/types/events";import { renderWithI18n } from "../../test/i18n";@@ -43,14 +44,38 @@ afterEach(() => {function setup(initialTask: AgentTask, hasReply = false, presentation: "inline" | "header" = "inline") {const client = new QueryClient({ defaultOptions: { queries: { retry: false }, mutations: { retry: false } } });- const view = (current: AgentTask, reply = hasReply) => <QueryClientProvider client={client}>- <InlineCommentRun run={{ task: current, commentId: "comment", hasReply: reply }} presentation={presentation} />- </QueryClientProvider>;+ const view = (current: AgentTask, reply = hasReply) => <TooltipProvider>+ <QueryClientProvider client={client}>+ <InlineCommentRun run={{ task: current, commentId: "comment", hasReply: reply }} presentation={presentation} />+ </QueryClientProvider>+ </TooltipProvider>;const rendered = renderWithI18n(view(initialTask));return { client, rerender: (current: AgentTask, reply = hasReply) => rendered.rerender(view(current, reply)) };}describe("InlineCommentRun", () => {+ it("shows a clipped tool name and its summary when the activity step is focused", async () => {+ const tool = "mcp__company-knowledge-base__search_documents_with_filters";+ vi.mocked(api.listTaskMessages).mockResolvedValue([+ { task_id: id, issue_id: "issue", seq: 1, type: "tool_use", tool, input: { query: "release checklist" } },+ ]);+ setup(task());+ fireEvent.click(screen.getByRole("button", { name: /View activity/ }));+ const label = await screen.findByText(tool);+ label.style.overflowX = "hidden";+ Object.defineProperties(label, {+ scrollWidth: { value: 360 },+ clientWidth: { value: 120 },+ });++ const step = label.closest("summary");+ expect(step).not.toBeNull();+ await act(async () => { step?.focus(); });+ expect(step).toHaveFocus();++ expect(document.querySelector("[data-slot='tooltip-content']")).toHaveTextContent(`${tool} · release checklist`);+ });+it("places a delivered steer between the steps it arrived between", async () => {vi.mocked(api.listTaskMessages).mockResolvedValue([{ task_id: id, issue_id: "issue", seq: 1, type: "tool_use", tool: "exec_command", input: { command: "cat login.tsx" }, created_at: "2026-09-07T00:00:05Z" },diff --git a/packages/views/issues/components/inline-comment-run.tsx b/packages/views/issues/components/inline-comment-run.tsxindex ed1b8aca21..9b62b53a95 100644--- a/packages/views/issues/components/inline-comment-run.tsx+++ b/packages/views/issues/components/inline-comment-run.tsx@@ -405,13 +405,14 @@ function InlineStep({ row, live, formatText }: { row: TraceRow; live: boolean; f: row.kind === "text" ? traceEventSummary({ ...row.item, content: redactSecrets(formatText(row.item.content ?? "")) }) || t(($) => $.inline_run.message): row.kind === "thinking" ? thinkingPreview(row.item.content, formatText) || t(($) => $.inline_run.thinking): t(($) => $.inline_run.error);+ const tooltip = call && toolSummary ? `${row.tool} · ${toolSummary}` : summary;return <details className="min-w-0 text-caption" onToggle={onToggle}>- <TruncatedTooltip content={summary}>+ <TruncatedTooltip content={tooltip}><summary onClick={disclosure.onTrigger} className="flex cursor-pointer list-none items-center gap-2 rounded-xs py-1.5 hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring [&::-webkit-details-marker]:hidden">{pending ? <Loader2 aria-hidden className="size-3.5 shrink-0 animate-spin text-info motion-reduce:animate-none" />: <Icon aria-hidden className={cn("size-3.5 shrink-0", error ? "text-destructive" : "text-muted-foreground")} />}<span className={cn("min-w-0 flex-1 truncate", error && "text-destructive")}>{summary}</span>- {(grouped || call) && <span className="shrink-0 text-micro text-muted-foreground">+ {(grouped || call) && <span className="max-w-[40%] shrink-0 truncate text-micro text-muted-foreground">{grouped ? t(($) => $.inline_run.steps, { count: row.steps.length }) : row.tool}</span>}<ChevronRight ref={disclosure.chevronRef} aria-hidden className={cn("size-3 shrink-0 text-muted-foreground", open && "rotate-90")} />