Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

Use one explicit Help improve Screenpipe opt-in (#7248)

Louis Beaumont7be797a3b4d7
diff --git a/.github/pr-assets/workflow-single-consent/after.png b/.github/pr-assets/workflow-single-consent/after.png
new file mode 100644
index 000000000..1f07c6ba2
Binary files /dev/null and b/.github/pr-assets/workflow-single-consent/after.png differ
diff --git a/apps/screenpipe-app-tauri/components/workflows/workflow-sharing-controls.test.tsx b/apps/screenpipe-app-tauri/components/workflows/workflow-sharing-controls.test.tsx
index 5993d61c9..6497f8818 100644
--- a/apps/screenpipe-app-tauri/components/workflows/workflow-sharing-controls.test.tsx
+++ b/apps/screenpipe-app-tauri/components/workflows/workflow-sharing-controls.test.tsx
@@ -15,13 +15,13 @@ beforeEach(() => {
f.settings = { user: { id: "internal-id" }, piiBackend: "local", workflowSharing: null };
f.managed = false; f.token = "token";
f.update.mockReset().mockImplementation(async (updates: any) => { f.settings = { ...f.settings, ...updates }; });
- remote = { accountId: "user_one", available: true, sharing: false, training: false, epoch: null, revision: 0, noticeVersion: "2026-09-21" };
+ remote = { accountId: "user_one", available: true, sharing: false, training: false, epoch: null, revision: 0, noticeVersion: "2026-09-23", acceptedNoticeVersion: null };
requests = []; offline = false;
vi.stubGlobal("fetch", vi.fn(async (_url, init) => {
if (offline) throw new Error("offline");
const body = init.body ? JSON.parse(init.body) : null;
requests.push({ method: init.method, body });
- if (init.method === "PUT") remote = { ...remote, ...body, epoch: `epoch-${++remote.revision}` };
+ if (init.method === "PUT") remote = { ...remote, ...body, acceptedNoticeVersion: body.noticeVersion, epoch: `epoch-${++remote.revision}` };
if (init.method === "DELETE") remote = { ...remote, sharing: false, training: false, epoch: "deleted" };
return { ok: true, json: async () => ({ ...remote }) };
}));
@@ -37,16 +37,14 @@ describe("sharing consent UI", () => {
expect(requests.every(r => r.method === "GET")).toBe(true);
fireEvent.click(screen.getByRole("switch"));
await waitFor(() => expect(screen.getByRole("switch")).toBeChecked());
- expect(f.update).toHaveBeenCalledWith({ piiBackend: "tinfoil", workflowSharing: { accountId: "user_one", epoch: "epoch-1", enabledAt: expect.any(Number), priorBackend: "local" } });
- expect(requests.find(r => r.method === "PUT")!.body).toMatchObject({ sharing: true, training: false });
- expect(screen.getByRole("checkbox")).not.toBeChecked();
+ expect(f.update).toHaveBeenCalledWith({ piiBackend: "tinfoil", workflowSharingPromptSeen: { "internal-id": "2026-09-23" }, workflowSharing: { accountId: "user_one", epoch: "epoch-1", enabledAt: expect.any(Number), priorBackend: "local" } });
+ expect(requests.find(r => r.method === "PUT")!.body).toMatchObject({ sharing: true, training: true, noticeVersion: "2026-09-23" });
+ expect(screen.queryByRole("checkbox")).not.toBeInTheDocument();
});
- it("requires a separate training choice and restores the prior backend on off", async () => {
+ it("revokes both permissions and restores the prior backend on off", async () => {
render(<WorkflowSharingControls />); await ready();
fireEvent.click(screen.getByRole("switch"));
- await waitFor(() => expect(screen.getByRole("checkbox")).toBeEnabled());
- fireEvent.click(screen.getByRole("checkbox"));
- await waitFor(() => expect(screen.getByRole("checkbox")).toBeChecked());
+ await waitFor(() => expect(screen.getByRole("switch")).toBeChecked());
expect(requests.filter(r => r.method === "PUT").at(-1)!.body.training).toBe(true);
fireEvent.click(screen.getByRole("button", { name: "Turn off sharing" }));
await waitFor(() => expect(f.settings.workflowSharing).toBeNull());
@@ -79,29 +77,31 @@ describe("sharing consent UI", () => {
await waitFor(() => expect(requests.length).toBe(1));
expect(screen.getByRole("switch")).toBeDisabled();
});
- it("keeps training unchecked and submits sharing only after the explicit prompt action", async () => {
+ it("submits both permissions only after the explicit prompt action", async () => {
const done = vi.fn();
render(<WorkflowSharingControls compact onDone={done} />);
- await waitFor(() => expect(screen.getByRole("button", { name: "Share chats" })).toBeEnabled());
- expect(screen.getByRole("checkbox")).not.toBeChecked();
- expect(screen.getByText("Optional. Never external providers’ models.")).toBeVisible();
+ await waitFor(() => expect(screen.getByRole("button", { name: "Allow sharing" })).toBeEnabled());
+ expect(screen.queryByRole("checkbox")).not.toBeInTheDocument();
expect(requests.every(r => r.method === "GET")).toBe(true);
- fireEvent.click(screen.getByRole("button", { name: "Share chats" }));
+ fireEvent.click(screen.getByRole("button", { name: "Allow sharing" }));
await waitFor(() => expect(done).toHaveBeenCalledOnce());
- expect(requests.find(r => r.method === "PUT")!.body).toMatchObject({ sharing: true, training: false });
+ expect(requests.find(r => r.method === "PUT")!.body).toMatchObject({ sharing: true, training: true, noticeVersion: "2026-09-23" });
});
- it("submits separate first-party training consent only when the checkbox was selected", async () => {
- render(<WorkflowSharingControls compact />);
- await waitFor(() => expect(screen.getByRole("checkbox")).toBeEnabled());
- fireEvent.click(screen.getByRole("checkbox"));
+ it("does not silently upgrade existing sharing-only consent", async () => {
+ f.settings.workflowSharing = { accountId: "user_one", epoch: "legacy", enabledAt: 0, priorBackend: "local" };
+ remote = { ...remote, sharing: true, training: false, epoch: "legacy", acceptedNoticeVersion: "2026-09-21" };
+ render(<WorkflowSharingControls />); await ready();
+ expect(screen.getByRole("switch")).not.toBeChecked();
+ expect(screen.getByText(/Sharing is paused on this version/)).toBeVisible();
expect(requests.every(r => r.method === "GET")).toBe(true);
- fireEvent.click(screen.getByRole("button", { name: "Share chats" }));
- await waitFor(() => expect(requests.find(r => r.method === "PUT")!.body.training).toBe(true));
+ fireEvent.click(screen.getByRole("switch"));
+ await waitFor(() => expect(screen.getByRole("switch")).toBeChecked());
+ expect(requests.find(r => r.method === "PUT")!.body).toMatchObject({ sharing: true, training: true, noticeVersion: "2026-09-23" });
});
it("skips the sharing prompt without saving consent", async () => {
const done = vi.fn();
render(<WorkflowSharingControls compact onDone={done} />);
- fireEvent.click(screen.getByRole("button", { name: "Don’t share" }));
+ fireEvent.click(screen.getByRole("button", { name: "Not now" }));
expect(done).toHaveBeenCalledOnce();
expect(f.update).not.toHaveBeenCalled();
expect(requests.every(r => r.method === "GET")).toBe(true);
@@ -109,23 +109,29 @@ describe("sharing consent UI", () => {
it("keeps the prompt open when saving fails", async () => {
const done = vi.fn();
render(<WorkflowSharingControls compact onDone={done} />);
- await waitFor(() => expect(screen.getByRole("button", { name: "Share chats" })).toBeEnabled());
+ await waitFor(() => expect(screen.getByRole("button", { name: "Allow sharing" })).toBeEnabled());
offline = true;
- fireEvent.click(screen.getByRole("button", { name: "Share chats" }));
+ fireEvent.click(screen.getByRole("button", { name: "Allow sharing" }));
expect(await screen.findByRole("alert")).toHaveTextContent("Could not enable sharing");
expect(done).not.toHaveBeenCalled();
expect(f.update).not.toHaveBeenCalled();
});
- it("clears an unsubmitted training choice when the signed-in account changes", async () => {
+ it("does not save a late consent response into a different signed-in account", async () => {
const view = render(<WorkflowSharingControls compact />);
- await waitFor(() => expect(screen.getByRole("checkbox")).toBeEnabled());
- fireEvent.click(screen.getByRole("checkbox"));
- expect(screen.getByRole("checkbox")).toBeChecked();
+ await waitFor(() => expect(screen.getByRole("button", { name: "Allow sharing" })).toBeEnabled());
+ let release!: () => void;
+ const fetchNow = globalThis.fetch;
+ vi.stubGlobal("fetch", vi.fn(async (...args: Parameters<typeof fetch>) => {
+ if ((args[1] as RequestInit).method === "PUT") await new Promise<void>(resolve => { release = resolve; });
+ return fetchNow(...args);
+ }));
+ fireEvent.click(screen.getByRole("button", { name: "Allow sharing" }));
+ await waitFor(() => expect(release).toBeDefined());
f.settings = { ...f.settings, user: { id: "different-account" } };
view.rerender(<WorkflowSharingControls compact />);
- await waitFor(() => expect(screen.getByRole("checkbox")).not.toBeChecked());
- expect(requests.every(r => r.method === "GET")).toBe(true);
+ release();
+ await waitFor(() => expect(screen.getByRole("button", { name: "Allow sharing" })).toBeEnabled());
+ expect(f.update).not.toHaveBeenCalled();
});
-
});
diff --git a/apps/screenpipe-app-tauri/components/workflows/workflow-sharing-controls.tsx b/apps/screenpipe-app-tauri/components/workflows/workflow-sharing-controls.tsx
index 78e0ccf5e..3569e513b 100644
--- a/apps/screenpipe-app-tauri/components/workflows/workflow-sharing-controls.tsx
+++ b/apps/screenpipe-app-tauri/components/workflows/workflow-sharing-controls.tsx
@@ -24,8 +24,6 @@ export function WorkflowSharingControls({ compact = false, onDone, onUnavailable
const [error, setError] = useState("");
const [confirmDelete, setConfirmDelete] = useState(false);
const [reload, setReload] = useState(0);
- const [trainingChoice, setTrainingChoice] = useState(false);
- useEffect(() => { setTrainingChoice(false); }, [settings.user?.id]);
useEffect(() => { onBusyChange?.(busy); return () => onBusyChange?.(false); }, [busy, onBusyChange]);
const current = useRef(settings);
current.current = settings;
@@ -40,14 +38,14 @@ export function WorkflowSharingControls({ compact = false, onDone, onUnavailable
return () => { cancelled = true; };
}, [settings.user?.id, settings.workflowSharing?.epoch, reload, compact]);
const local = settings.workflowSharing;
- const enabled = !!local && status?.sharing === true && status.accountId === local.accountId && status.epoch === local.epoch;
+ const enabled = !!local && status?.acceptedNoticeVersion === SHARING_NOTICE_VERSION && status.training && status?.sharing === true && status.accountId === local.accountId && status.epoch === local.epoch;
const available = !!status?.available && !isManagedDeployment && status.noticeVersion === SHARING_NOTICE_VERSION;
useEffect(() => {
if (compact && status && !available && !local) onUnavailable?.();
}, [compact, status, available, local, onUnavailable]);
- async function change(sharing: boolean, training: boolean, remove = false) {
+ async function change(sharing: boolean, remove = false) {
if (busy || (sharing && !available)) return;
setBusy(true); setError("");
const before = current.current;
@@ -63,12 +61,14 @@ export function WorkflowSharingControls({ compact = false, onDone, onUnavailable
}
if (!token) throw new Error("Sign in to update account sharing.");
const result = await sharingRequest(remove ? "DELETE" : "PUT", remove ? undefined : {
- sharing, training, noticeVersion: SHARING_NOTICE_VERSION, revision: status?.revision ?? 0,
+ sharing, training: sharing, noticeVersion: SHARING_NOTICE_VERSION, revision: status?.revision ?? 0,
}, token);
if (!mounted.current || await commands.getCloudToken() !== token || current.current.user?.id !== before.user?.id) return;
if (sharing) {
- if (!result.epoch || !result.sharing || result.accountId !== status?.accountId) throw new Error("Sharing could not be enabled.");
- await updateSettings({ piiBackend: "tinfoil", workflowSharing: {
+ const account = before.user?.id;
+ if (!account) throw new Error("Sign in to update sharing.");
+ if (!result.epoch || !result.sharing || !result.training || result.acceptedNoticeVersion !== SHARING_NOTICE_VERSION || result.accountId !== status?.accountId) throw new Error("Sharing could not be enabled.");
+ await updateSettings({ piiBackend: "tinfoil", workflowSharingPromptSeen: { ...before.workflowSharingPromptSeen, [account]: SHARING_NOTICE_VERSION }, workflowSharing: {
accountId: result.accountId, epoch: result.epoch, enabledAt: Date.now(),
priorBackend: before.workflowSharing?.priorBackend ?? (before.piiBackend === "tinfoil" ? "tinfoil" : "local"),
} });
@@ -80,12 +80,11 @@ export function WorkflowSharingControls({ compact = false, onDone, onUnavailable
"Stopped on this device. Account changes are unconfirmed; retry to stop other devices or delete shared chats.");
} finally { if (mounted.current) setBusy(false); }
}
- const trainingLabel = <span className="font-medium">Also train Screenpipe’s own models<span className="mt-1 block text-xs font-normal text-muted-foreground">Optional. Never external providers’ models.</span></span>;
return <section id="workflow-sharing" className={compact ? "space-y-5 text-foreground" : "space-y-3 rounded-lg border p-4 text-foreground"}>
{!compact && <div className="flex items-center justify-between gap-4">
- <div><label htmlFor="workflow-sharing-setting" className="text-sm font-medium">Help improve Workflows</label>
- <p className="text-xs text-muted-foreground">Share new Workflows chats to improve skills and evaluations.</p></div>
- <Switch id="workflow-sharing-setting" checked={enabled} disabled={busy || (!available && !local)} onCheckedChange={value => void change(value, false)} />
+ <div><label htmlFor="workflow-sharing-setting" className="text-sm font-medium">Help improve Screenpipe</label>
+ <p className="text-xs text-muted-foreground">Share new Workflows chats to improve workflows and train Screenpipe’s own AI models. Never external providers’ models.</p></div>
+ <Switch id="workflow-sharing-setting" checked={enabled} disabled={busy || (!available && !local)} onCheckedChange={value => void change(value)} />
</div>}
{compact ? <div className="space-y-4">
<div className="flex gap-3"><MessageSquare className="mt-0.5 h-4 w-4 shrink-0 text-muted-foreground" aria-hidden="true" /><div>
@@ -100,18 +99,15 @@ export function WorkflowSharingControls({ compact = false, onDone, onUnavailable
<p className="text-xs text-muted-foreground">Only chats inside Workflows. No raw recordings, main Chat conversations, or other apps’ chat history.</p>
<p className="text-xs text-muted-foreground">AI redacts sensitive information in Tinfoil’s secure cloud before sharing. Redaction can miss details.</p>
</>}
- <label className={`flex items-start gap-3 text-sm ${compact ? "rounded-lg border p-4 transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 " + (trainingChoice ? "border-foreground/40 bg-foreground/[0.03]" : "border-border") : ""}`}>
- <input type="checkbox" className="mt-0.5 h-4 w-4 shrink-0 accent-foreground" checked={compact ? trainingChoice : enabled && status?.training === true} disabled={busy || (compact ? !available : !enabled)} onChange={event => compact ? setTrainingChoice(event.target.checked) : void change(true, event.target.checked)} />
- {trainingLabel}
- </label>
+ {!!local && !enabled && available && <p className="text-xs text-muted-foreground">Sharing is paused on this version until you accept the updated choice, which includes training Screenpipe’s own models.</p>}
{enabled && !compact && <a href="#workflow-cloud-redaction" className="block text-xs underline">Cloud redaction is on. View settings</a>}
<details className="text-xs text-muted-foreground"><summary className="cursor-pointer rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-foreground">Sharing details</summary>
- <p className="mt-2">Replies may quote your private context. Screenpipe keeps shared text for up to 30 days, plus the next hourly cleanup. Cloud redaction is required while sharing is on. Recording settings remain separate. You can stop sharing and delete shared copies in Privacy settings. Model training requires separate permission and an eligibility review; no training export is enabled in this version.</p>
+ <p className="mt-2">Replies may quote your private context. Screenpipe keeps shared text for up to 30 days, plus the next hourly cleanup. Cloud redaction is required while sharing is on. Recording settings remain separate. You can stop sharing and delete shared copies in Privacy settings. Training permission covers only Screenpipe’s own models. Previously shared chats keep their original permissions.</p>
<a href={screenpipeWebUrl("/privacy", PROD_WEB_BASE)} target="_blank" rel="noreferrer" className="mt-2 inline-block underline">Privacy policy</a>
</details>
{!compact && <div className="flex flex-wrap gap-2">
- {!!local && <Button size="sm" variant="outline" disabled={busy} onClick={() => void change(false, false)}>Turn off sharing</Button>}
- <Button size="sm" variant="outline" disabled={busy || !settings.user?.id} onClick={() => confirmDelete ? void change(false, false, true) : setConfirmDelete(true)}>{confirmDelete ? "Confirm deletion and stop sharing" : "Delete shared chats"}</Button>
+ {!!local && <Button size="sm" variant="outline" disabled={busy} onClick={() => void change(false)}>Turn off sharing</Button>}
+ <Button size="sm" variant="outline" disabled={busy || !settings.user?.id} onClick={() => confirmDelete ? void change(false, true) : setConfirmDelete(true)}>{confirmDelete ? "Confirm deletion and stop sharing" : "Delete shared chats"}</Button>
{confirmDelete && <Button size="sm" variant="ghost" disabled={busy} onClick={() => setConfirmDelete(false)}>Cancel</Button>}
{!available && <span className="text-xs text-muted-foreground">Sharing is not available for this account.</span>}
{confirmDelete && <p className="w-full text-xs text-muted-foreground">Deletes shared copies for this account and stops sharing on all devices. Your local chats stay on this device.</p>}
@@ -120,9 +116,9 @@ export function WorkflowSharingControls({ compact = false, onDone, onUnavailable
{!status && !error && <p role="status" className="text-xs text-muted-foreground">Checking sharing availability…</p>}
<p className="text-xs text-muted-foreground">Stop sharing or delete shared chats in Privacy settings.</p>
<div className="grid grid-cols-2 gap-3">
- <Button variant="outline" disabled={busy} onClick={onDone}>Don’t share</Button>
- <Button disabled={busy || !available} onClick={() => void change(true, trainingChoice)}>
- {busy && <Loader2 className="mr-2 h-4 w-4 animate-spin" aria-hidden="true" />}{busy ? "Saving…" : "Share chats"}
+ <Button variant="outline" disabled={busy} onClick={onDone}>Not now</Button>
+ <Button disabled={busy || !available} onClick={() => void change(true)}>
+ {busy && <Loader2 className="mr-2 h-4 w-4 animate-spin" aria-hidden="true" />}{busy ? "Saving…" : "Allow sharing"}
</Button>
</div>
</>}
diff --git a/apps/screenpipe-app-tauri/components/workflows/workflow-tasks-prompt.test.tsx b/apps/screenpipe-app-tauri/components/workflows/workflow-tasks-prompt.test.tsx
index 87a6b5120..2b176c1e8 100644
--- a/apps/screenpipe-app-tauri/components/workflows/workflow-tasks-prompt.test.tsx
+++ b/apps/screenpipe-app-tauri/components/workflows/workflow-tasks-prompt.test.tsx
@@ -36,18 +36,18 @@ describe("workflow task opt-in", () => {
expect(tasks.enable).not.toHaveBeenCalled();
fireEvent.click(screen.getByRole("button", { name: "Not now" }));
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
- await waitFor(() => expect(f.settings.workflowSharingPromptSeen).toEqual({ "fixture-user": "2026-09-21" }));
+ await waitFor(() => expect(f.settings.workflowSharingPromptSeen).toEqual({ "fixture-user": "2026-09-23" }));
view.rerender(<WorkflowTasksPrompt active={false} tasks={tasks} />);
view.rerender(<WorkflowTasksPrompt active tasks={tasks} />);
expect(await screen.findByRole("dialog")).toBeVisible();
fireEvent.click(screen.getByRole("button", { name: "Not now" }));
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
});
- it("does not prompt or mutate an already enabled task", async () => {
+ it("offers the new consent without mutating an already enabled task", async () => {
const tasks = service(true);
render(<WorkflowTasksPrompt active tasks={tasks} />);
await waitFor(() => expect(tasks.load).toHaveBeenCalledOnce());
- expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
+ expect(await screen.findByTestId("sharing-controls")).toBeVisible();
expect(tasks.enable).not.toHaveBeenCalled();
});
it("enables once then offers sharing only on success", async () => {
@@ -83,12 +83,22 @@ describe("workflow task opt-in", () => {
});
it("does not ask again when sharing is already enabled", async () => {
f.settings.workflowSharing = { epoch: "existing" };
+ f.settings.workflowSharingPromptSeen = { "fixture-user": "2026-09-23" };
render(<WorkflowTasksPrompt active tasks={service()} />);
fireEvent.click(await screen.findByRole("button", { name: "Not now" }));
expect(screen.queryByRole("dialog")).not.toBeInTheDocument();
});
+ it("asks existing sharing users to accept the new notice", async () => {
+ f.settings.workflowSharing = { epoch: "existing" };
+ f.settings.workflowSharingPromptSeen = { "fixture-user": "2026-09-21" };
+ render(<WorkflowTasksPrompt active tasks={service(true)} />);
+ expect(await screen.findByTestId("sharing-controls")).toBeVisible();
+ expect(screen.getByText("Help improve Screenpipe")).toBeVisible();
+ expect(screen.getByText(/train Screenpipe’s own AI models/)).toBeVisible();
+ expect(f.update).not.toHaveBeenCalled();
+ });
it("does not reuse another account's dismissal", async () => {
- f.settings.workflowSharingPromptSeen = { "different-user": "2026-09-21" };
+ f.settings.workflowSharingPromptSeen = { "different-user": "2026-09-23" };
render(<WorkflowTasksPrompt active tasks={service()} />);
fireEvent.click(await screen.findByRole("button", { name: "Not now" }));
expect(screen.getByTestId("sharing-controls")).toBeVisible();
diff --git a/apps/screenpipe-app-tauri/components/workflows/workflow-tasks-prompt.tsx b/apps/screenpipe-app-tauri/components/workflows/workflow-tasks-prompt.tsx
index 885001a2a..add70148b 100644
--- a/apps/screenpipe-app-tauri/components/workflows/workflow-tasks-prompt.tsx
+++ b/apps/screenpipe-app-tauri/components/workflows/workflow-tasks-prompt.tsx
@@ -41,7 +41,7 @@ export function WorkflowTasksPrompt({ active, tasks = desktopTasks }: {
}, [updateSettings]);
function nextStep() {
const value = current.current;
- if (value.user?.id && !value.workflowSharing && value.workflowSharingPromptSeen?.[value.user.id] !== SHARING_NOTICE_VERSION) {
+ if (value.user?.id && value.workflowSharingPromptSeen?.[value.user.id] !== SHARING_NOTICE_VERSION) {
setError(""); setStep("sharing");
} else setOpen(false);
}
@@ -61,7 +61,10 @@ export function WorkflowTasksPrompt({ active, tasks = desktopTasks }: {
if (cancelled) return;
setSetup(value);
setError("");
- setOpen(!value.enabled);
+ const account = current.current.user?.id;
+ const offerSharing = !!account && current.current.workflowSharingPromptSeen?.[account] !== SHARING_NOTICE_VERSION;
+ setStep(value.enabled ? "sharing" : "tasks");
+ setOpen(!value.enabled || offerSharing);
} catch {
if (cancelled) return;
// Recorder startup is not a consent failure. Retry quietly first.
@@ -102,10 +105,10 @@ export function WorkflowTasksPrompt({ active, tasks = desktopTasks }: {
} as CSSProperties} className="max-w-md [&_button]:normal-case [&_button]:tracking-normal [&_button]:font-[inherit]" overlayClassName="bg-black/30" hideCloseButton={busy}>
<DialogHeader className="text-left">
<DialogTitle ref={title} tabIndex={-1} style={{ fontFamily: "inherit", letterSpacing: 0 }} className="text-xl normal-case outline-none">
- {step === "tasks" ? "Keep your workflows up to date?" : "Help improve Workflows?"}
+ {step === "tasks" ? "Keep your workflows up to date?" : "Help improve Screenpipe"}
</DialogTitle>
<DialogDescription className="text-muted-foreground">
- {step === "tasks" ? "Discover workflows and keep them accurate with daily updates." : "Share new Workflows chats to improve skills and evaluations."}
+ {step === "tasks" ? "Discover workflows and keep them accurate with daily updates." : "Share new Workflows chats to improve workflows and train Screenpipe’s own AI models. Never external providers’ models."}
</DialogDescription>
</DialogHeader>
{step === "sharing" ? <WorkflowSharingControls compact onDone={finishSharing} onUnavailable={close} onBusyChange={setBusy} /> : <>
diff --git a/apps/screenpipe-app-tauri/lib/trajectories/collector.test.ts b/apps/screenpipe-app-tauri/lib/trajectories/collector.test.ts
index f94cd1d90..1bb8f428b 100644
--- a/apps/screenpipe-app-tauri/lib/trajectories/collector.test.ts
+++ b/apps/screenpipe-app-tauri/lib/trajectories/collector.test.ts
@@ -5,7 +5,7 @@ import { createTrajectoryCollector, type LocalSharing, type SharingStatus } from
function fixture() {
let local: LocalSharing | null = { accountId: "user_one", epoch: "epoch-one", enabledAt: 0, priorBackend: "local" };
let token: string | null = "token-one";
- const status: SharingStatus = { accountId: "user_one", epoch: "epoch-one", available: true, sharing: true, training: false, revision: 1, noticeVersion: "2026-09-21" };
+ const status: SharingStatus = { accountId: "user_one", epoch: "epoch-one", available: true, sharing: true, training: true, revision: 1, noticeVersion: "2026-09-23", acceptedNoticeVersion: "2026-09-23" };
const request = vi.fn(async (_method: string, _body?: unknown, _token?: string, _signal?: AbortSignal) => status);
const redact = vi.fn(async (_text: string) => "[REDACTED]");
const collector = createTrajectoryCollector({ local: async () => local, token: async () => token, request, redact });
@@ -27,12 +27,12 @@ describe("Trajectory collection boundary", () => {
}, "token-one", expect.any(AbortSignal));
expect(JSON.stringify(f.request.mock.calls)).not.toContain("private question");
});
- it.each(["available", "sharing"] as const)("fails closed when server %s is false", async key => {
+ it.each(["available", "sharing", "training"] as const)("fails closed when server %s is false", async key => {
const f = fixture(); f.status[key] = false;
await f.collector.complete(await f.collector.begin(), "question", "answer");
expect(f.redact).not.toHaveBeenCalled(); expect(f.request).toHaveBeenCalledTimes(1);
});
- it.each(["accountId", "epoch", "noticeVersion"] as const)("refuses a stale %s", async key => {
+ it.each(["accountId", "epoch", "noticeVersion", "acceptedNoticeVersion"] as const)("refuses a stale %s", async key => {
const f = fixture(); f.status[key] = "changed";
await f.collector.complete(await f.collector.begin(), "question", "answer");
expect(f.redact).not.toHaveBeenCalled();
diff --git a/apps/screenpipe-app-tauri/lib/trajectories/collector.ts b/apps/screenpipe-app-tauri/lib/trajectories/collector.ts
index 2ed40f5cd..9aac90616 100644
--- a/apps/screenpipe-app-tauri/lib/trajectories/collector.ts
+++ b/apps/screenpipe-app-tauri/lib/trajectories/collector.ts
@@ -3,12 +3,12 @@
import { PROD_WEB_BASE, screenpipeWebUrl } from "@/lib/web-url";
import { commands } from "@/lib/utils/tauri";
-export const SHARING_NOTICE_VERSION = "2026-09-21";
-const endpoint = screenpipeWebUrl("/api/trajectories", PROD_WEB_BASE);
+export const SHARING_NOTICE_VERSION = "2026-09-23";
+const endpoint = screenpipeWebUrl(`/api/trajectories?noticeVersion=${SHARING_NOTICE_VERSION}`, PROD_WEB_BASE);
export type LocalSharing = { accountId: string; epoch: string; enabledAt: number; priorBackend: "local" | "tinfoil" };
export type SharingStatus = {
accountId: string; available: boolean; sharing: boolean; training: boolean;
- epoch: string | null; revision: number; noticeVersion: string;
+ epoch: string | null; revision: number; noticeVersion: string; acceptedNoticeVersion: string | null;
};
export async function sharingRequest(method: string, body?: unknown, token?: string, signal?: AbortSignal): Promise<SharingStatus> {
const bearer = token ?? await commands.getCloudToken();
@@ -74,6 +74,7 @@ export function createTrajectoryCollector(ports: Ports) {
const consent = await ports.request("GET", undefined, ticket.token, controller.signal);
if (!consent.available || !consent.sharing || consent.accountId !== ticket.local.accountId ||
consent.epoch !== ticket.local.epoch || consent.noticeVersion !== SHARING_NOTICE_VERSION ||
+ consent.acceptedNoticeVersion !== SHARING_NOTICE_VERSION || !consent.training ||
controller.signal.aborted || !await current(ticket)) return;
const redactedQuestion = await ports.redact(question);
if (controller.signal.aborted || !await current(ticket)) return;