gui: Turn off telemetry for all agents says it takes effect when each agent next starts
The switch in Settings › Privacy rewrites each agent's config
(agent.SetTelemetryAll). An agent reads its config when it starts, so one
running now keeps sending until it is restarted. An agent's own Telemetry
switch has always said "Takes effect when {agent} next starts". The
switch for all agents said nothing, unless an agent refused. Now it says
"Takes effect when each agent next starts", in every language. A refusal
is still shown as the error.
Tests: privacy-agent-telemetry checks the status after the switch, in
every language, at 1100 and 640, in both engines.
Run (mote, at this tree):
- privacy-agent-telemetry, i18n-keys, gui-de and settings-search,
Chromium and WebKit: 47 pass.
- go test ./internal/gui -run 'TestCoreScriptBudget|TestI18n|TestCSS': ok.
Broken by hand, then put back: with the old status line,
privacy-agent-telemetry was 20 of 22 red.
Not tried: the real app with a running agent.
This commit is contained in:
@@ -22045,7 +22045,8 @@ function renderRedact(s, keep) {
|
||||
rowIn(share, t("Turn off telemetry for all agents"), t("Over each agent's own Telemetry switch, an agent found later too"),
|
||||
onOff(s.agentTelemetryOff, (off) => writingPrefs(api("settings/agent-telemetry", { off })).then((ns) => {
|
||||
prefs = state.settings = ns;
|
||||
if (ns.refused) status(ns.refused, "err");
|
||||
// as an agent's own switch says (telemetryRow): read when it starts
|
||||
status(ns.refused || t("Takes effect when each agent next starts"), ns.refused ? "err" : "ok");
|
||||
renderSettings();
|
||||
refreshAfterSync();
|
||||
}, settingsErr))).id = "agentTelemetryAllRow";
|
||||
|
||||
@@ -5190,6 +5190,7 @@ const I18N = {
|
||||
"{file} couldn't be read": "无法读取 {file}",
|
||||
"Written in {file}: {keys}": "写入 {file}:{keys}",
|
||||
"Takes effect when {agent} next starts": "{agent} 下次启动时生效",
|
||||
"Takes effect when each agent next starts": "各 Agent 下次启动时生效",
|
||||
"Claude Desktop runs in a folder of its own on macOS only": "只有 macOS 上的 Claude Desktop 能在独立文件夹中运行",
|
||||
"Claude Desktop (Claude.app) isn't installed": "未安装 Claude Desktop(Claude.app)",
|
||||
"Claude Magpie.app is there already and isn't magpie's": "Claude Magpie.app 已存在,且不是 magpie 创建的",
|
||||
@@ -10650,6 +10651,7 @@ const I18N = {
|
||||
"{file} couldn't be read": "無法讀取 {file}",
|
||||
"Written in {file}: {keys}": "寫入 {file}:{keys}",
|
||||
"Takes effect when {agent} next starts": "{agent} 下次啟動時生效",
|
||||
"Takes effect when each agent next starts": "各 Agent 下次啟動時生效",
|
||||
"Claude Desktop runs in a folder of its own on macOS only": "只有 macOS 上的 Claude Desktop 能在獨立資料夾中執行",
|
||||
"Claude Desktop (Claude.app) isn't installed": "未安裝 Claude Desktop(Claude.app)",
|
||||
"Claude Magpie.app is there already and isn't magpie's": "Claude Magpie.app 已存在,且不是 magpie 建立的",
|
||||
@@ -16112,6 +16114,7 @@ const I18N = {
|
||||
"{file} couldn't be read": "{file} を読み取れません",
|
||||
"Written in {file}: {keys}": "{file} に書き込みます:{keys}",
|
||||
"Takes effect when {agent} next starts": "{agent} の次回起動時に反映されます",
|
||||
"Takes effect when each agent next starts": "各エージェントの次回起動時に反映されます",
|
||||
"Claude Desktop runs in a folder of its own on macOS only": "Claude Desktop を専用フォルダで動かせるのは macOS のみです",
|
||||
"Claude Desktop (Claude.app) isn't installed": "Claude Desktop(Claude.app)がインストールされていません",
|
||||
"Claude Magpie.app is there already and isn't magpie's": "Claude Magpie.app が既にあり、magpie が作ったものではありません",
|
||||
@@ -21574,6 +21577,7 @@ const I18N = {
|
||||
"{file} couldn't be read": "{file} konnte nicht gelesen werden",
|
||||
"Written in {file}: {keys}": "Wird in {file} geschrieben: {keys}",
|
||||
"Takes effect when {agent} next starts": "Wirkt beim nächsten Start von {agent}",
|
||||
"Takes effect when each agent next starts": "Wirkt beim nächsten Start jedes Agents",
|
||||
"Claude Desktop runs in a folder of its own on macOS only": "Claude Desktop läuft nur unter macOS in einem eigenen Ordner",
|
||||
"Claude Desktop (Claude.app) isn't installed": "Claude Desktop (Claude.app) ist nicht installiert",
|
||||
"Claude Magpie.app is there already and isn't magpie's": "Claude Magpie.app gibt es schon, und es ist nicht von magpie",
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
// Run with Node's test runner and Playwright on the module path; see README.md.
|
||||
// Settings › Privacy turns off every agent's telemetry (OipsAnthony on X).
|
||||
// The switch posts settings/agent-telemetry {off} and draws the settings the
|
||||
// reply carries; an agent that couldn't follow is said in the status. While
|
||||
// reply carries; an agent that couldn't follow is said in the status, else that it
|
||||
// takes effect when each agent next starts. While
|
||||
// it is on, an agent's own Telemetry row shows off, says why, and can't be
|
||||
// pressed; off again, the row is the agent's own. Every language, wide and
|
||||
// narrow, no native select, no scroll on click. No backend: faked here.
|
||||
@@ -55,11 +56,11 @@ function fixture(lang, refused = "") {
|
||||
}
|
||||
|
||||
const W = {
|
||||
en: { all: "Turn off telemetry for all agents", why: "Off for all agents in Settings › Privacy", off: "Off", on: "On", details: "Details" },
|
||||
zh: { all: "关闭所有 Agent 的遥测", why: "已在 设置 › 隐私 中为所有 Agent 关闭", off: "关闭", on: "开启", details: "详情" },
|
||||
"zh-TW": { all: "關閉所有 Agent 的遙測", why: "已在 設定 › 隱私 中為所有 Agent 關閉", off: "關閉", on: "開啟", details: "詳情" },
|
||||
ja: { all: "すべてのエージェントのテレメトリをオフ", why: "設定 › プライバシー ですべてのエージェントでオフです", off: "オフ", on: "オン", details: "詳細" },
|
||||
de: { all: "Telemetrie aller Agents ausschalten", why: "Für alle Agents aus in Einstellungen › Datenschutz", off: "Aus", on: "An", details: "Details" },
|
||||
en: { all: "Turn off telemetry for all agents", why: "Off for all agents in Settings › Privacy", off: "Off", on: "On", details: "Details", next: "Takes effect when each agent next starts" },
|
||||
zh: { all: "关闭所有 Agent 的遥测", why: "已在 设置 › 隐私 中为所有 Agent 关闭", off: "关闭", on: "开启", details: "详情", next: "各 Agent 下次启动时生效" },
|
||||
"zh-TW": { all: "關閉所有 Agent 的遙測", why: "已在 設定 › 隱私 中為所有 Agent 關閉", off: "關閉", on: "開啟", details: "詳情", next: "各 Agent 下次啟動時生效" },
|
||||
ja: { all: "すべてのエージェントのテレメトリをオフ", why: "設定 › プライバシー ですべてのエージェントでオフです", off: "オフ", on: "オン", details: "詳細", next: "各エージェントの次回起動時に反映されます" },
|
||||
de: { all: "Telemetrie aller Agents ausschalten", why: "Für alle Agents aus in Einstellungen › Datenschutz", off: "Aus", on: "An", details: "Details", next: "Wirkt beim nächsten Start jedes Agents" },
|
||||
};
|
||||
const gm = '.row.agent[data-id="gemini"]';
|
||||
const ROW = "#agentTelemetryAllRow";
|
||||
@@ -112,6 +113,8 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
await page.locator(`${ROW} .opt`, { hasText: w.on }).click();
|
||||
await page.waitForFunction(([s, on]) => document.querySelector(s)?.querySelector(".opt.on")?.textContent === on, [ROW, w.on]);
|
||||
assert.deepEqual(fx.posts, [{ off: true }]);
|
||||
// an agent running now reads it when it next starts, as its own row says
|
||||
await page.waitForFunction((s) => document.querySelector("#status")?.textContent === s, w.next);
|
||||
assert.equal(await page.evaluate(() => document.querySelector("#view-settings").scrollTop + scrollY), y, "a click scrolled the page");
|
||||
|
||||
// the agent's own row: off, why, held
|
||||
|
||||
Reference in New Issue
Block a user