fix(connections): show only the privacy policy link in the Google Workspace picker (#22795)

## Thinking Path

> - Paperclip is the open source app people use to manage AI agents for
work
> - The built-in Google Workspace connection lets agents use Gmail,
Drive (with Docs, Sheets and Slides) and Calendar
> - Before Google consent, the user chooses services in the "Connect
Google Workspace" picker
> - On Nov 17, #21998 added two text sections to this picker: "What
agents can do" and "How your data is used"
> - On Nov 24, the owner decided that this screen must show only the
privacy policy link and no other explanatory text
> - This pull request removes the two sections and keeps the privacy
policy link directly under the service rows
> - The benefit is a short picker that matches the owner decision, for
new setup and reconnect, in the Apps flow and the task-hosted flow

## Linked Issues or Issue Description

Refs #22634

**What happened?**
The "Connect Google Workspace" picker shows a "What agents can do"
section and a "How your data is used" section with bullet sentences. The
text changes with the selected services. The owner does not want this
text on the screen.

**What did you expect to happen?**
The picker shows the title, the three service rows (each with its access
select and switch), the privacy policy link, and Cancel / Continue. It
shows no other explanatory text for any selection.

**Steps to reproduce**
1. Open Apps and start a Google Workspace connection, or reconnect an
existing one.
2. Look at the service picker with all services on, with read only, and
with one service on.
3. See the two text sections above the footer.

## What Changed

- `ui/src/features/connections/GoogleWorkspaceServices.tsx`: remove the
`DataUseDisclosure` block. The privacy policy link ("Read our privacy
policy, including how we meet Google's Limited Use requirements",
`https://paperclip.ing/privacy`, new tab) now sits directly under the
service rows for every selection, including no selection. The "Select at
least one service to continue." status stays. The screen-reader
description "Choose the Google services to connect." stays. The URL
constant `GOOGLE_WORKSPACE_PRIVACY_POLICY_URL` moves into this file.
- `ui/src/features/connections/googleWorkspaceDisclosure.ts`: deleted.
Nothing else used the copy builder.
- `ui/src/features/connections/GoogleWorkspaceServices.test.tsx` (new;
the earlier suite was removed in #22729): for all services read & write,
all read only, one service, and no service, the dialog has no section
headings, no lists and none of the removed sentences. The link has its
text, href and new-tab target. The dialog keeps its accessible
description. Continue stays disabled with no service and submits the
chosen services.
-
`ui/storybook/stories/connection-setup/google-workspace-services.stories.tsx`:
the `ProductionPickerReadOnly` play test now checks that the removed
text is absent and the link is present.
- Docs: `doc/memory/google-connector-memory.md` gets a dated Nov 24
decision row with the risk.
`doc/plans/2026-11-17-google-workspace-production-checklist.md` no
longer claims a disclosure in the picker.
`doc/plans/2026-11-17-google-workspace-code-fixes.md` item 1 records the
removal.

The dialog now contains, from top to bottom: the Google Workspace logo
and the title "Connect Google Workspace"; Gmail, Drive ("Docs, Sheets,
and Slides") and Calendar rows, each with a "Read only / Read & write"
select and a switch; the privacy policy link; the empty-selection status
(only with no service on); Cancel and Continue in one footer row.

## Verification

- Red first: the new test ran against the old picker and 4 of 5 tests
failed (removed text present; link absent with no selection). After the
change all 5 pass.
- `cd ui && npx vitest run src/features/connections
src/pages/apps/AppDetail.test.tsx src/pages/apps/AppsConnect.test.tsx`:
8 files, 55 tests pass.
- `cd ui && node ../scripts/run-tsc.mjs -b`: no errors.
- `node scripts/check-token-gates.mjs`: all gates clean. `node
scripts/check-test-budget.mjs --files
ui/src/features/connections/GoogleWorkspaceServices.test.tsx`: pass.
`node scripts/storybook-catalog.mjs`: pass.
- `pnpm verify` exits 2 (a global CI input changed:
`doc/memory/google-connector-memory.md`). Required CI supplies the broad
coverage.
- Headless Playwright against Storybook dev, `ProductionPicker` at
1280x900 (dark and light) and `ProductionPickerMobile` at 375x812: the
dialog text is only the title, the rows, the link, and Cancel /
Continue. No horizontal scroll at 375 px. The link sits under the last
row with the normal dialog gap, and the footer follows it.
- Before: see the screenshots in #21998. After: the same dialog without
the two text sections.

## Risks

- Policy risk: Google's user data policy may expect a disclosure inside
the product, before consent, that says what data the app uses and how. A
privacy policy link alone may not satisfy a Google reviewer. This is a
recorded owner decision. If a reviewer asks, restore a short statement
above the link. The memory doc and the production checklist record this
risk.
- Low code risk. The change is UI-only. Selection, requested scopes,
OAuth and saved state do not change.

> For core feature work, check [`ROADMAP.md`](ROADMAP.md) first and
discuss it in `#dev` before opening the PR. Feature PRs that overlap
with planned core work may need to be redirected — check the roadmap
first. See `CONTRIBUTING.md`.

## Model Used

- Claude Opus 5.5 (`claude-opus-5-5`), Anthropic, in Claude Code with
tool use (shell, file edits, headless browser).

## Checklist

- [x] I have included a thinking path that traces from project context
to this change
- [x] I have specified the model used (with version and capability
details)
- [x] I have checked ROADMAP.md and confirmed this PR does not duplicate
planned core work
- [x] I have searched GitHub for duplicate or related PRs and linked
them above
- [x] I have either (a) linked existing issues with `Fixes: #` / `Closes
#` / `Refs #` OR (b) described the issue in-PR following the relevant
issue template
- [x] I have not referenced internal/instance-local Paperclip issues or
links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip`
URLs)
- [x] My branch name describes the change (e.g. `docs/...`, `fix/...`)
and contains no internal Paperclip ticket id or instance-derived details
- [x] I have run tests locally and they pass
- [x] I have added or updated tests where applicable
- [x] I have updated relevant documentation to reflect my changes
- [x] I have considered and documented any risks above
- [ ] All Paperclip CI gates are green
- [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups
- [x] I will address all Greptile and reviewer comments before
requesting merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
DottaandClaude Opus 5.5 authored and GitHub committed 2026-11-24 11:47:32 -06:00
1 parent 4daeab5c76
commit 6385c171fa
7 files changed
+106 -69

No files matched your search

+2 -1
View File
@@ -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` |
@@ -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
@@ -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):
@@ -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(<QueryClientProvider client={client}>
<GoogleWorkspaceServicesDialog initial={initial} onContinue={onContinue} onCancel={vi.fn()} />
</QueryClientProvider>); });
}
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" });
});
});
@@ -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 <ServicePicker {...props} initial={props.initial ?? (pendingScopes ? googleWorkspaceSelectionForScopes(pendingScopes) : existing ? googleWorkspaceSelectionForScopes(savedScopes) : undefined)} />;
}
function DataUseDisclosure({ selection }: { selection: GoogleWorkspaceServiceSelection }) {
const { access, use } = googleWorkspaceDataUseDisclosure(selection);
return <section aria-label="How Paperclip uses your Google data" className="space-y-3 text-sm">
<div className="space-y-1">
<h3 className="font-medium">What agents can do</h3>
<ul className="list-disc space-y-1 pl-5 text-muted-foreground">{access.map(line => <li key={line}>{line}</li>)}</ul>
</div>
<div className="space-y-1">
<h3 className="font-medium">How your data is used</h3>
<ul className="list-disc space-y-1 pl-5 text-muted-foreground">{use.map(line => <li key={line}>{line}</li>)}</ul>
</div>
<p className="text-muted-foreground">
<a href={GOOGLE_WORKSPACE_PRIVACY_POLICY_URL} target="_blank" rel="noopener noreferrer" className="underline">
Read our privacy policy, including how we meet Google's Limited Use requirements<span className="sr-only"> (opens in a new tab)</span>
</a>
</p>
</section>;
}
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
<DialogDescription className="sr-only">Choose the Google services to connect.</DialogDescription>
</DialogHeader>
<GoogleWorkspaceServiceFields value={selection} onChange={setSelection} />
{empty
? <p role="status" className="text-xs text-muted-foreground">Select at least one service to continue.</p>
: <DataUseDisclosure selection={selection} />}
<p className="text-sm text-muted-foreground">
<a href={GOOGLE_WORKSPACE_PRIVACY_POLICY_URL} target="_blank" rel="noopener noreferrer" className="underline">
Read our privacy policy, including how we meet Google's Limited Use requirements<span className="sr-only"> (opens in a new tab)</span>
</a>
</p>
{empty && <p role="status" className="text-xs text-muted-foreground">Select at least one service to continue.</p>}
<footer className="flex items-center justify-between gap-3 pt-4">
<Button variant="ghost" onClick={() => onCancel(selection)}>Cancel</Button>
<Button disabled={empty} onClick={() => onContinue(selection)}>Continue</Button>
@@ -1,35 +0,0 @@
import { GOOGLE_WORKSPACE_SERVICE_GROUPS, type GoogleWorkspaceServiceSelection } from "@paperclipai/shared";
export const GOOGLE_WORKSPACE_PRIVACY_POLICY_URL = "https://paperclip.ing/privacy";
type ServiceId = (typeof GOOGLE_WORKSPACE_SERVICE_GROUPS)[number]["id"];
const ACCESS: Record<ServiceId, { read: string; write: string }> = {
gmail: {
read: "Gmail: agents can read and search your email.",
write: "Gmail: agents can read and search your email, and create drafts. Google's permission screen also mentions sending email; Paperclip does not send email.",
},
drive: {
read: "Drive: agents can read and search your files, Docs, Sheets and Slides.",
write: "Drive: agents can read and search your files, Docs, Sheets and Slides. They can also create files and edit Docs, Sheets and Slides.",
},
calendar: {
read: "Calendar: agents can see your calendars, events and free/busy times.",
write: "Calendar: agents can see your calendars, events and free/busy times. They can also create, change and delete events, and respond to invitations.",
},
};
const USE = [
"Agents read this content only to do the tasks you give them.",
"To do that, the content is 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. They stay there until you delete them, even after you disconnect.",
];
export function googleWorkspaceDataUseDisclosure(selection: GoogleWorkspaceServiceSelection): { access: string[]; use: string[] } {
const access = GOOGLE_WORKSPACE_SERVICE_GROUPS.flatMap(group => {
const level = selection[group.id];
return level ? [ACCESS[group.id][level]] : [];
});
return { access, use: access.length > 0 ? [...USE] : [] };
}
@@ -21,18 +21,16 @@ export const ProductionPicker: Story = {
};
export const ProductionPickerReadOnly: Story = {
render: () => <GoogleWorkspaceServicesDialog initial={{ gmail: "read", calendar: "read" }} onContinue={fn()} onCancel={fn()} />,
parameters: { docs: { description: { story: "The data-use disclosure follows the selection: only selected services are described, at their chosen access level." } } },
parameters: { docs: { description: { story: "The picker shows the service rows and the privacy policy link only. It has no data-use text for any selection." } } },
play: async ({ canvasElement }) => {
const body = within(canvasElement.ownerDocument.body);
const disclosure = body.getByRole("region", { name: "How Paperclip uses your Google data" });
await expect(disclosure).toHaveTextContent("Gmail: agents can read and search your email.");
await expect(disclosure).not.toHaveTextContent(/Drive|drafts|sending|Paperclip does not send/);
await expect(disclosure).toHaveTextContent("the content is sent to the AI model provider configured for your workspace");
await expect(within(disclosure).getByRole("link", { name: /Limited Use/ })).toHaveAttribute("href", "https://paperclip.ing/privacy");
const dialog = body.getByRole("dialog");
await expect(dialog).not.toHaveTextContent(/What agents can do|How your data is used|agents can|AI model provider|train general AI models/);
await expect(within(dialog).getByRole("link", { name: /Limited Use/ })).toHaveAttribute("href", "https://paperclip.ing/privacy");
await userEvent.click(body.getByRole("switch", { name: /^Gmail$/ }));
await userEvent.click(body.getByRole("switch", { name: /^Calendar$/ }));
await expect(body.queryByRole("region", { name: "How Paperclip uses your Google data" })).not.toBeInTheDocument();
await expect(body.getByRole("status")).toHaveTextContent("Select at least one service to continue.");
await expect(within(dialog).getByRole("link", { name: /Limited Use/ })).toBeVisible();
},
};
export const ProductionPickerMobile: Story = {