Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(inbox): align agent avatars with Views rows in the Work panel Inbox (MUL-10285) (#11657)
Jiayuan Zhangcd2869498c07
diff --git a/packages/views/layout/panels/inbox-section.test.tsx b/packages/views/layout/panels/inbox-section.test.tsxindex f0731882ce..697c39e0ff 100644--- a/packages/views/layout/panels/inbox-section.test.tsx+++ b/packages/views/layout/panels/inbox-section.test.tsx@@ -349,6 +349,28 @@ describe("InboxSection", () => {expect(rows()[0]!.querySelector("[data-mc='unread-dot']")).not.toBeNull();});+ it("puts a read row's agents at a tree row's right edge, and leaves an unread row's dot in the dots' column", () => {+ useSidebarTreeStore.setState({ inboxSettings: { ...DEFAULT_SIDEBAR_INBOX_SETTINGS, compact: true } });+ renderSection(+ [+ item({ id: "n1", issue_id: "issue-a", title: "Read one", read: true }),+ item({ id: "n2", issue_id: "issue-b", title: "Unread one", created_at: "2026-11-09T08:00:00Z" }),+ ],+ null,+ "/acme/issues",+ [+ { id: "t1", issue_id: "issue-a", agent_id: "a1", status: "running" },+ { id: "t2", issue_id: "issue-b", agent_id: "a2", status: "running" },+ ],+ );+ const link = screen.getByRole("link", { name: /^Read one/ });+ expect(link.lastElementChild).toContainElement(within(link).getByTestId("agents"));+ const [read, unread] = rows().map((row) => row.querySelector("[data-mc='nav-item']"));+ expect(read).toHaveClass("pr-2");+ expect(unread).not.toHaveClass("pr-2");+ expect(unread!.querySelector("[data-mc='unread-dot']")).not.toBeNull();+ });+it("shows the whole notification on hover, with its actions", async () => {renderSection([item({ id: "n1", issue_id: "issue-a", title: "Commented", body: "Ship it on Friday" })]);fireEvent.mouseEnter(rows()[0]!.firstElementChild!);diff --git a/packages/views/layout/panels/inbox-section.tsx b/packages/views/layout/panels/inbox-section.tsxindex 9f65c73974..2685a9dc09 100644--- a/packages/views/layout/panels/inbox-section.tsx+++ b/packages/views/layout/panels/inbox-section.tsx@@ -1070,6 +1070,9 @@ const InboxRow = memo(function InboxRow({panelRowStateClass(active),"relative select-none data-[popup-open]:bg-surface-hover",!compact && "items-start py-1.5",+ // The agents hold the same right-edge slot as a tree row's avatars;+ // a compact unread row ends with its dot, which keeps the other dots' column.+ agents && !(compact && unread) && "pr-2",)}>{statusIcon ||@@ -1114,10 +1117,7 @@ const InboxRow = memo(function InboxRow({) : unread ? (<span className={cn("flex shrink-0 items-center", yields)}>{dot}</span>) : (- <>- <span className={cn("flex shrink-0 items-center", yields)}>{dot}</span>- {!agents && time}- </>+ !agents && time)}</>) : (