diff --git a/ui/src/pages/apps/AssistantConnection.test.tsx b/ui/src/pages/apps/AssistantConnection.test.tsx index 40eca74d3c4..55a3d1c94a7 100644 --- a/ui/src/pages/apps/AssistantConnection.test.tsx +++ b/ui/src/pages/apps/AssistantConnection.test.tsx @@ -87,6 +87,22 @@ describe("assistant setup from Connections", () => { expect(container.textContent).toContain("Connected as you · Read and write"); expect(container.querySelector('[aria-label="Copy first prompt"]')).toBeNull(); }); + it("keeps Dot agent grants out of personal assistant setup and connected status", async () => { + const dot = { ...grant, id: "dot", clientName: "Dedicated Dot", scopes: ["paperclip:agent", "offline_access"] }; + mocks.connections.mockResolvedValue([dot]); + await render(); + expect(container.querySelector('[data-connected]')?.getAttribute("data-connected")).toBe("false"); + expect(container.textContent).not.toContain("Connected as you"); + await render(); + expect(container.textContent).toContain("No assistants connected to Butter yet"); + expect(container.textContent).not.toContain("Dedicated Dot"); + mocks.connections.mockResolvedValue([dot, grant]); + await act(async () => { await client.invalidateQueries({ queryKey: ["mcp-connections"] }); }); + await flush(); + expect(container.textContent).toContain("Connected as you · Read and write"); + expect(container.querySelector('[aria-label="Revoke OpenCode connection"]')).not.toBeNull(); + expect(container.querySelector('[aria-label="Revoke Dedicated Dot connection"]')).toBeNull(); + }); it("shows a recoverable error instead of pretending setup succeeded", async () => { mocks.setup.mockRejectedValue(new Error("offline")); await render(); diff --git a/ui/src/pages/apps/AssistantConnection.tsx b/ui/src/pages/apps/AssistantConnection.tsx index 83c104f4cef..3f54fdd9aa6 100644 --- a/ui/src/pages/apps/AssistantConnection.tsx +++ b/ui/src/pages/apps/AssistantConnection.tsx @@ -32,7 +32,7 @@ export function useAssistantConnections(poll = false) { queryKey: connectionsKey, queryFn: publicMcpApi.connections, retry: false, enabled: Boolean(selectedCompanyId), refetchInterval: poll ? 5000 : false, }); - return { ...query, rows: (query.data ?? []).filter(row => row.companyId === selectedCompanyId) }; + return { ...query, rows: (query.data ?? []).filter(row => row.companyId === selectedCompanyId && !row.scopes.includes("paperclip:agent")) }; } /** Inbound assistant access belongs beside the existing outbound connectors. */