diff --git a/ui/src/components/coordinator/CoordinatorNeedsYou.toolbar.test.tsx b/ui/src/components/coordinator/CoordinatorNeedsYou.toolbar.test.tsx index 2a210747810..f26886054ca 100644 --- a/ui/src/components/coordinator/CoordinatorNeedsYou.toolbar.test.tsx +++ b/ui/src/components/coordinator/CoordinatorNeedsYou.toolbar.test.tsx @@ -361,12 +361,15 @@ describe("Needs You keeps its toolbar between visits", () => { await vi.waitFor(() => expect(assignee().value).toBe("me")); await choose("Filter decisions by assignee", "Dotta"); await vi.waitFor(() => expect(cards()).toEqual(["dottas"])); + const folderDescription = () => container.querySelector("[data-inbox-folders] p")?.textContent ?? null; + expect(folderDescription()).toBeNull(); await choose("Filter decisions by agent", "Chief of Staff"); await choose("Filter decisions by project", "Website"); const waitingTab = [...container.querySelectorAll('[aria-label="Inbox views"] button')].find((button) => button.textContent?.startsWith("Waiting"))!; await act(async () => waitingTab.click()); await flush(); await vi.waitFor(() => expect(cards()).toEqual(["waiting-1"])); + expect(folderDescription()).toContain("snoozed"); const needsTab = [...container.querySelectorAll('[aria-label="Inbox views"] button')].find((button) => button.textContent === "Needs you")!; await act(async () => needsTab.click()); await flush(); diff --git a/ui/src/components/coordinator/CoordinatorNeedsYou.tsx b/ui/src/components/coordinator/CoordinatorNeedsYou.tsx index d95ea82fabf..3264fa2249c 100644 --- a/ui/src/components/coordinator/CoordinatorNeedsYou.tsx +++ b/ui/src/components/coordinator/CoordinatorNeedsYou.tsx @@ -50,11 +50,11 @@ import { CoordinatorNeedsYouSidePanel, needsYouReviewTab, needsYouReviewTabId, n import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy"; import { cn } from "@/lib/utils"; -const inboxFolders = [ - { value: "needs", label: "Needs you", description: "Review open requests and decide what happens next." }, +const inboxFolders: ReadonlyArray<{ value: "needs" | "waiting" | "history"; label: string; description?: string }> = [ + { value: "needs", label: "Needs you" }, { value: "waiting", label: "Waiting", description: "See what you’ve snoozed and which tasks are waiting for an automatic retry." }, { value: "history", label: "History", description: "Look back at past decisions and see what happened to failed runs." }, -] as const; +]; /** Rule 7: a card that cannot answer inline links to the exact control, named by its verb. */ function openLabel(item: AttentionItem) { @@ -437,7 +437,7 @@ export function CoordinatorNeedsYou() { return ; })} - {activeFolder &&

{activeFolder.description}

} + {activeFolder?.description &&

{activeFolder.description}

} ; const receipts = feed.data?.receipts ?? []; if (historyOpen) return