diff --git a/doc/memory/google-connector-memory.md b/doc/memory/google-connector-memory.md index 0b154384aff..546bd7e9a09 100644 --- a/doc/memory/google-connector-memory.md +++ b/doc/memory/google-connector-memory.md @@ -49,13 +49,14 @@ Last updated: November 23, 2026 (evening). | Nov 23 | **Security lab: TAC Security (recommended, not yet engaged)** | Google's discounted Tier 2 partner. Plan about $2,000 for year one including a retest. Confirm with a quote; Google assigns the tier. | | Nov 23 | **A tool refuses an argument it does not know** | All 36 tools fail before any request to Google and name the accepted arguments. Found live: `list_threads` ignored a filter and returned unfiltered mail. | | Nov 23 | **A cancelled or abandoned first sign-in leaves no connection** | Cancel removes the draft; a closed tab leaves a hidden draft that the next attempt reuses. Applies to every sign-in connector. | +| Nov 24 | **The service picker shows no explanatory text, only the privacy policy link** | Owner decision. This removes the in-product data-use disclosure added on Nov 17 ([#21998](https://github.com/paperclipai/paperclip/pull/21998)). Risk noted by the coordinator: Google's user data policy may expect an in-product disclosure before consent; if a reviewer asks, restore a short statement above the link. | ## What has shipped | PR | What it does | Merged commit | | --- | --- | --- | | [#21996](https://github.com/paperclipai/paperclip/pull/21996) | Plan docs: this file, the production checklist and the code-fix plan. | `12cb18e17d` | -| [#21998](https://github.com/paperclipai/paperclip/pull/21998) | Data-use disclosure in the service picker, shown just before Google consent. Every Google Workspace sign-in start goes through the picker, including four sign-in paths on the app page (Reconnect, Connect as me, Connect organization identity, dedicated-agent connect). The Gmail read & write line says Google's screen also mentions sending and that Paperclip does not send. | `b124ad0674` | +| [#21998](https://github.com/paperclipai/paperclip/pull/21998) | Data-use disclosure in the service picker, shown just before Google consent. Every Google Workspace sign-in start goes through the picker, including four sign-in paths on the app page (Reconnect, Connect as me, Connect organization identity, dedicated-agent connect). The Gmail read & write line says Google's screen also mentions sending and that Paperclip does not send. Removed on Nov 24 by owner decision (see "Decisions"); the picker keeps the privacy policy link. | `b124ad0674` | | [#21999](https://github.com/paperclipai/paperclip/pull/21999) | Prompt-injection screening now also covers resource reads through a named gateway, the one path that was not screened. Applies to every connector, not only Google. | `65eac24876` | | [#22001](https://github.com/paperclipai/paperclip/pull/22001) | Scope lock. `GOOGLE_WORKSPACE_SUBMITTED_SCOPES` is the hand-written list of 14, and `workspace.all` uses it. Paperclip-managed Google methods outside the 14 (Gmail archive, Chat, People, Workspace Search) are no longer offered for new setup or reconnect through Paperclip's Google app; saved ones keep refreshing and running. | `66ac5d7aa0` | | [#22000](https://github.com/paperclipai/paperclip/pull/22000) | REST tool set part 1: the folder `server/src/google-workspace-rest-tools/` with Gmail `get_message`, `search_threads` and `create_draft`. Nothing calls it yet; the switch comes in a later PR. | `a29658b5b7` | diff --git a/doc/plans/2026-11-17-google-workspace-code-fixes.md b/doc/plans/2026-11-17-google-workspace-code-fixes.md index 3c1a1dc698b..d646d262a39 100644 --- a/doc/plans/2026-11-17-google-workspace-code-fixes.md +++ b/doc/plans/2026-11-17-google-workspace-code-fixes.md @@ -17,7 +17,7 @@ change in fix 2, the deploy order is app first, then broker (see fix 10). | # | Fix | Size | Blocks submission | Status | | --- | --- | --- | --- | --- | -| 1 | Data-use disclosure in the picker | Small | Yes | Done, [#21998](https://github.com/paperclipai/paperclip/pull/21998) | +| 1 | Data-use disclosure in the picker | Small | Yes | Done, [#21998](https://github.com/paperclipai/paperclip/pull/21998); removed Nov 24 by owner decision | | 2 | Lock the managed scope set to 14 | Small to medium | Yes | Done in the app, [#22001](https://github.com/paperclipai/paperclip/pull/22001) | | 3 | Take `gmail.modify` off the Paperclip-managed client | Small | Yes | Done, [#22001](https://github.com/paperclipai/paperclip/pull/22001) | | 4 | Confirm injection screening on Google results | Check, then small | Yes | Done, [#21999](https://github.com/paperclipai/paperclip/pull/21999) | @@ -36,6 +36,9 @@ four sign-in paths on the app page. The Gmail read & write line says Google's screen also mentions sending and that Paperclip does not send. The plan below is kept for reference. +**Removed** (Nov 24) by owner decision. The picker keeps only the privacy +policy link, which names Google's Limited Use requirements. + **Confirmed gap.** `ServicePicker` in `ui/src/features/connections/GoogleWorkspaceServices.tsx` shows three service rows and Cancel / Continue. Its only description is screen-reader text. Google diff --git a/doc/plans/2026-11-17-google-workspace-production-checklist.md b/doc/plans/2026-11-17-google-workspace-production-checklist.md index 081a87de2d5..9fed8d06fc2 100644 --- a/doc/plans/2026-11-17-google-workspace-production-checklist.md +++ b/doc/plans/2026-11-17-google-workspace-production-checklist.md @@ -59,8 +59,12 @@ Decisions and the details behind them are kept in the ## 2. Product and code (see the code-fix plan) -- [x] Data-use disclosure shown in the picker immediately before Google consent - (Nov 17, [#21998](https://github.com/paperclipai/paperclip/pull/21998)). +- [ ] Data-use disclosure in the picker immediately before Google consent. + Added Nov 17 ([#21998](https://github.com/paperclipai/paperclip/pull/21998)), + then removed on Nov 24 by owner decision. The picker now shows only the + service rows and a link to the privacy policy and its Limited Use + statement. If a Google reviewer asks for an in-product disclosure, + restore a short statement above the link. - [ ] Limited Use statement published and linked from the picker. - [x] Help page: how to disconnect and how to delete stored Google data (Nov 17, [#22010](https://github.com/paperclipai/paperclip/pull/22010): diff --git a/ui/src/features/connections/GoogleWorkspaceServices.test.tsx b/ui/src/features/connections/GoogleWorkspaceServices.test.tsx new file mode 100644 index 00000000000..94af67a8922 --- /dev/null +++ b/ui/src/features/connections/GoogleWorkspaceServices.test.tsx @@ -0,0 +1,81 @@ +// @vitest-environment jsdom +import { act } from "react"; +import { createRoot, type Root } from "react-dom/client"; +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import type { GoogleWorkspaceServiceSelection } from "@paperclipai/shared"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { GoogleWorkspaceServicesDialog } from "./GoogleWorkspaceServices"; + +vi.mock("@/api/tools", () => ({ toolsApi: { listConnectionGrants: vi.fn() } })); +vi.mock("@/pages/apps/AppLogo", () => ({ AppLogo: () => null })); + +const removedText = [ + "What agents can do", + "How your data is used", + "agents can read and search your email", + "agents can read and search your files", + "agents can see your calendars", + "Paperclip does not send email", + "Agents read this content only to do the tasks you give them.", + "sent to the AI model provider configured for your workspace", + "It is not used to train general AI models.", + "Results are saved in the task and its run history", +]; + +describe("Google Workspace service picker", () => { + let root: Root; + let container: HTMLDivElement; + let client: QueryClient; + const onContinue = vi.fn(); + + async function render(initial?: GoogleWorkspaceServiceSelection) { + await act(async () => { root.render( + + ); }); + } + + beforeEach(() => { + vi.clearAllMocks(); + container = document.createElement("div"); + document.body.append(container); + root = createRoot(container); + client = new QueryClient(); + }); + afterEach(async () => { + await act(async () => { root.unmount(); }); + client.clear(); + container.remove(); + }); + + it.each<[string, GoogleWorkspaceServiceSelection | undefined]>([ + ["all services with read & write", undefined], + ["all services read only", { gmail: "read", drive: "read", calendar: "read" }], + ["a single service", { calendar: "write" }], + ["no services", {}], + ])("shows only the service rows and the privacy policy link for %s", async (_label, initial) => { + await render(initial); + const dialog = document.querySelector('[role="dialog"]')!; + for (const text of removedText) expect(dialog.textContent).not.toContain(text); + expect(dialog.querySelector("h3")).toBeNull(); + expect(dialog.querySelector("ul")).toBeNull(); + expect(document.querySelectorAll('[role="switch"]')).toHaveLength(3); + const link = [...dialog.querySelectorAll("a")].find(item => item.textContent?.includes("Limited Use"))!; + expect(link.textContent).toBe("Read our privacy policy, including how we meet Google's Limited Use requirements (opens in a new tab)"); + expect(link.getAttribute("href")).toBe("https://paperclip.ing/privacy"); + expect(link.getAttribute("target")).toBe("_blank"); + const description = document.getElementById(dialog.getAttribute("aria-describedby") ?? ""); + expect(description?.textContent).toBe("Choose the Google services to connect."); + }); + + it("keeps Continue disabled with no services and submits the chosen services", async () => { + await render({}); + const disabled = [...document.querySelectorAll("button")].find(item => item.textContent === "Continue")!; + expect(disabled.disabled).toBe(true); + expect(document.querySelector('[role="status"]')?.textContent).toBe("Select at least one service to continue."); + await act(async () => { root.unmount(); }); + root = createRoot(container); + await render({ gmail: "read" }); + await act(async () => { [...document.querySelectorAll("button")].find(item => item.textContent === "Continue")!.click(); }); + expect(onContinue).toHaveBeenCalledWith({ gmail: "read" }); + }); +}); diff --git a/ui/src/features/connections/GoogleWorkspaceServices.tsx b/ui/src/features/connections/GoogleWorkspaceServices.tsx index e3c3ddf00f9..35052237688 100644 --- a/ui/src/features/connections/GoogleWorkspaceServices.tsx +++ b/ui/src/features/connections/GoogleWorkspaceServices.tsx @@ -8,10 +8,11 @@ import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } f import { NativeSelect } from "@/components/ui/select"; import { ToggleSwitch } from "@/components/ui/toggle-switch"; import { AppLogo } from "@/pages/apps/AppLogo"; -import { GOOGLE_WORKSPACE_PRIVACY_POLICY_URL, googleWorkspaceDataUseDisclosure } from "./googleWorkspaceDisclosure"; import { ANALYTICS_MASK_CLASS } from "@/lib/analytics/privacy"; import { cn } from "@/lib/utils"; +export const GOOGLE_WORKSPACE_PRIVACY_POLICY_URL = "https://paperclip.ing/privacy"; + export function GoogleWorkspaceServiceFields({ value, onChange }: { value: GoogleWorkspaceServiceSelection; onChange: (value: GoogleWorkspaceServiceSelection) => void; @@ -100,25 +101,6 @@ export function GoogleWorkspaceServicesDialog(props: DialogProps) { return ; } -function DataUseDisclosure({ selection }: { selection: GoogleWorkspaceServiceSelection }) { - const { access, use } = googleWorkspaceDataUseDisclosure(selection); - return
-
-

What agents can do

-
    {access.map(line =>
  • {line}
  • )}
-
-
-

How your data is used

-
    {use.map(line =>
  • {line}
  • )}
-
-

- - Read our privacy policy, including how we meet Google's Limited Use requirements (opens in a new tab) - -

-
; -} - function ServicePicker({ onContinue, onCancel, initial = GOOGLE_WORKSPACE_DEFAULT_SELECTION }: DialogProps) { const [selection, setSelection] = useState(initial); const empty = Object.keys(selection).length === 0; @@ -129,9 +111,12 @@ function ServicePicker({ onContinue, onCancel, initial = GOOGLE_WORKSPACE_DEFAUL Choose the Google services to connect. - {empty - ?

Select at least one service to continue.

- : } +

+ + Read our privacy policy, including how we meet Google's Limited Use requirements (opens in a new tab) + +

+ {empty &&

Select at least one service to continue.

}