Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Desktop: keep desktopNotices.shown so a Cloud page on 0.1.135 doesn't go blank (#4053)
Milind Soni03065106b520
diff --git a/electron/desktop-prefs.node-test.mjs b/electron/desktop-prefs.node-test.mjsindex ce7f6362c8..61872cf894 100644--- a/electron/desktop-prefs.node-test.mjs+++ b/electron/desktop-prefs.node-test.mjs@@ -202,7 +202,7 @@ test("the preload gives every page of the window the notices and the switch's stassert.equal(page.bridge.desktopAnalytics.set, undefined, "a server's page cannot change the desktop's switch");await page.bridge.desktopNotices.state(); await page.bridge.desktopNotices.seen({ toString: () => POPUP });assert.deepEqual(page.invoked, [["desktop-notices:state"], ["desktop-notices:seen", POPUP]]);- assert.deepEqual(Object.keys(page.bridge.desktopNotices), ["state", "seen"], "no page moves the window to this computer");+ assert.deepEqual(Object.keys(page.bridge.desktopNotices), ["state", "seen", "shown"], "no page moves the window to this computer");}const local = preload(LOCAL, { activation: true, saved: false });assert.equal(typeof local.bridge.desktopNotices.state, "function");diff --git a/electron/preload.cjs b/electron/preload.cjsindex 5a5ce16522..6a328b566f 100644--- a/electron/preload.cjs+++ b/electron/preload.cjs@@ -586,6 +586,9 @@ const bridge = {desktopNotices: {state: () => ipcRenderer.invoke("desktop-notices:state"),seen: id => ipcRenderer.invoke("desktop-notices:seen", String(id)),+ // A Cloud or server page on 0.1.135 or older calls this as its Cloud Pro popup opens, and the whole page went blank+ // when it was missing. Nothing asks main any more: never the first showing today, so that page reports nothing.+ shown: () => Promise.resolve(false),},desktopAnalytics: {enabled: () => {diff --git a/electron/preload.node-test.mjs b/electron/preload.node-test.mjsindex e9e3fd0e97..3cdbb5c16f 100644--- a/electron/preload.node-test.mjs+++ b/electron/preload.node-test.mjs@@ -50,6 +50,13 @@ test("exposes the full local-shell bridge on window.ogb", () => {assert.equal(typeof exposed.api.onOpenAppSettings, "function");});+test("desktopNotices keeps shown() for a Cloud page on an older release, and asks main nothing", async () => {+ // 0.1.135's page calls desktopNotices.shown(...) as its Cloud Pro popup opens; without it the page threw and went blank.+ const before = invocations.length;+ assert.equal(await exposed.api.desktopNotices.shown("cloud-pro-update-2026-10"), false);+ assert.deepEqual(invocations.slice(before), []);+});+test("openLogsFolder asks main for its own logs folder and names no path", async () => {const before = invocations.length;await exposed.api.openLogsFolder("C:\\Windows\\System32");