From aaddf6b6b0143c838383550f675800021239bc1b Mon Sep 17 00:00:00 2001 From: Dotta Date: Tue, 6 Oct 2026 19:00:26 -0500 Subject: [PATCH] Keep Dot agent grants out of personal assistant connections The merged Connections entry describes assistants that act as the user. Filter the dedicated agent scope from its status and management list so a paired Dot cannot be presented as personal read-only access. Co-Authored-By: Paperclip --- ui/src/pages/apps/AssistantConnection.test.tsx | 16 ++++++++++++++++ ui/src/pages/apps/AssistantConnection.tsx | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) 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. */