Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
MUL-5258: feat(issues): show agent-working indicator in Table view (#5875)
Bohan Jiang2aafa41a5fcb
diff --git a/packages/views/issues/components/table-inline-title.test.tsx b/packages/views/issues/components/table-inline-title.test.tsxindex 3b10b4a967..ea8830f1ea 100644--- a/packages/views/issues/components/table-inline-title.test.tsx+++ b/packages/views/issues/components/table-inline-title.test.tsx@@ -7,6 +7,19 @@ import { describe, expect, it, vi } from "vitest";import { useState } from "react";import type { Issue } from "@multica/core/types";++// InlineTitle renders the self-contained agent-activity badge, which fetches+// the workspace agent-task snapshot via React Query. Stub it (same pattern as+// inbox-list-item.test.tsx) instead of standing up query/workspace providers,+// but render a marker carrying the issue id so a test can assert the badge is+// wired into the cell with the row's issue — otherwise the badge insertion in+// table-view.tsx could be deleted and every test here would still pass.+vi.mock("./issue-agent-activity-indicator", () => ({+ IssueAgentActivityIndicator: ({ issueId }: { issueId: string }) => (+ <span data-testid="issue-agent-activity" data-issue-id={issueId} />+ ),+}));+import { InlineTitle } from "./table-view";import type { IssueTableDisplayRow } from "./table-view-model";@@ -192,4 +205,27 @@ describe("InlineTitle", () => {fireEvent.keyDown(screen.getByRole("textbox"), { key: "Escape" });expect(screen.getByRole("button", { name: "Remote title" })).toBeTruthy();});++ it("renders the agent-activity badge for the row's issue, between the identifier and the title", () => {+ render(<Harness title="Original" />);++ const identifier = screen.getByText("MUL-1");+ const badge = screen.getByTestId("issue-agent-activity");+ const titleButton = screen.getByRole("button", { name: "Original" });++ // Wired to THIS row's issue — deleting the badge insertion in+ // table-view.tsx would drop the marker and fail this test, so the core+ // product change is actually covered.+ expect(badge.getAttribute("data-issue-id")).toBe("issue-1");++ // Same reading order as List/Board: identifier → activity → title.+ expect(+ identifier.compareDocumentPosition(badge) &+ Node.DOCUMENT_POSITION_FOLLOWING,+ ).toBeTruthy();+ expect(+ badge.compareDocumentPosition(titleButton) &+ Node.DOCUMENT_POSITION_FOLLOWING,+ ).toBeTruthy();+ });});diff --git a/packages/views/issues/components/table-view.tsx b/packages/views/issues/components/table-view.tsxindex 92954683c1..2e84e548a0 100644--- a/packages/views/issues/components/table-view.tsx+++ b/packages/views/issues/components/table-view.tsx@@ -136,6 +136,7 @@ import {} from "./table-view-model";import type { ChildProgress } from "./list-row";import { InfiniteScrollSentinel } from "./infinite-scroll-sentinel";+import { IssueAgentActivityIndicator } from "./issue-agent-activity-indicator";const SELECT_COLUMN_ID = "__select";const ADD_COLUMN_ID = "__add";@@ -666,6 +667,7 @@ export function InlineTitle({<span className="w-16 shrink-0 text-xs text-muted-foreground">{row.issue.identifier}</span>+ <IssueAgentActivityIndicator issueId={row.issue.id} />{editing ? (<InputautoFocus