AI-native knowledge base & Evernote/Obsidian alternative with instant sync & native MCP. Free on Cloudflare or self-hosted via Docker.
HTML ai-agentcloudflarecloudflare-d1cloudflare-r2cloudflare-workersdockerelectronevernoteevernote-alternativeknowledge-basemcpnote-takingobsidian-alternativeoffline-firstpersonal-knowledge-basepwaself-hostedsqlitetiptapweb-clipper
fix: capture desktop update network diagnostics
tianma-ifbe93432e7893
diff --git a/apps/desktop/src/main/index.mjs b/apps/desktop/src/main/index.mjsindex b037452c..4f70160e 100644--- a/apps/desktop/src/main/index.mjs+++ b/apps/desktop/src/main/index.mjs@@ -50,6 +50,7 @@ import {} from "./windows-update-trust.mjs";import electronUpdater from "electron-updater";import { createUpdateDiagnostic } from "./update-diagnostics.mjs";+import { createUpdateNetworkDiagnostics } from "./update-network-diagnostics.mjs";import { normalizeUpdateProgress } from "./update-progress.mjs";import { inspectWindowsTaskbarShortcuts } from "./windows-taskbar-diagnostics.mjs";import { testPicGoConnection, createPicGoUploadQueue } from "./picgo.mjs";@@ -1110,9 +1111,20 @@ const desktopUpdateStatus = () => ({progress: updateProgress,});+const updateNetworkDiagnostics = createUpdateNetworkDiagnostics({+ write: writeDiagnostic,+ onChange: () => {+ const network = updateNetworkDiagnostics.snapshot();+ if (updateError?.network?.checkId !== network.checkId) return;+ updateError = { ...updateError, network };+ publishDesktopUpdateStatus();+ },+});+const recordUpdateError = (error, stage) => {updateError = createUpdateDiagnostic(error, {stage, version: app.getVersion(), platform: process.platform, arch: process.arch,+ network: updateNetworkDiagnostics.snapshot(),});};@@ -1146,7 +1158,7 @@ const trackDesktopUpdateDownload = (downloadPromise, reason) => {publishDesktopUpdateStatus();await writeDiagnostic("update.download-failed", { reason, message: error.message });})- .finally(() => { updateDownloadInFlight = null; });+ .finally(() => { updateDownloadInFlight = null; updateNetworkDiagnostics.stop(); });return updateDownloadInFlight;};@@ -1155,6 +1167,7 @@ const downloadTrustedDesktopUpdate = (reason) => {if (process.platform === "win32" && !trustedWindowsUpdate) {return Promise.reject(new Error("Windows update metadata has not passed the signature gate"));}+ updateNetworkDiagnostics.setStage("download");return trackDesktopUpdateDownload(autoUpdater.downloadUpdate(), reason);};@@ -1198,6 +1211,7 @@ const checkForDesktopUpdate = (reason, { force = false, throwOnError = false } =if (!force && now - lastUpdateCheckAt < updateCheckFocusThrottleMs) return Promise.resolve(null);lastUpdateCheckAt = now;updateError = null;+ updateNetworkDiagnostics.beginCheck();publishDesktopUpdateStatus();let diagnosticStage = "check";void writeDiagnostic("update.check-started", { reason });@@ -1205,6 +1219,7 @@ const checkForDesktopUpdate = (reason, { force = false, throwOnError = false } =.then(async (result) => {if (process.platform === "win32" && result?.isUpdateAvailable) {diagnosticStage = "verify-windows-metadata";+ updateNetworkDiagnostics.setStage(diagnosticStage);trustedWindowsUpdate = await fetchTrustedWindowsUpdate({version: result.updateInfo.version,updateInfo: result.updateInfo,@@ -1218,6 +1233,7 @@ const checkForDesktopUpdate = (reason, { force = false, throwOnError = false } =void downloadTrustedDesktopUpdate(reason);}if (result?.downloadPromise) {+ updateNetworkDiagnostics.setStage("download");trackDesktopUpdateDownload(result.downloadPromise, reason);}return result;@@ -1234,12 +1250,28 @@ const checkForDesktopUpdate = (reason, { force = false, throwOnError = false } =await writeDiagnostic("update.check-failed", { reason, message: error.message });throw error;})- .finally(() => { updateCheckInFlight = null; });+ .finally(() => {+ updateCheckInFlight = null;+ if (!updateDownloadInFlight) updateNetworkDiagnostics.stop();+ });return throwOnError ? updateCheckInFlight : updateCheckInFlight.catch(() => null);};const configureAutoUpdater = () => {if (!app.isPackaged || process.env.EDGE_EVER_DISABLE_AUTO_UPDATE === "1") return;+ // Observe the exact session used by electron-updater, plus net.fetch metadata.+ // No setProxy, request headers, bodies, credentials or response bodies are collected.+ for (const [name, getSession] of [+ ["electron-updater", () => autoUpdater.netSession],+ ["default-metadata", () => session.defaultSession],+ ]) {+ try { updateNetworkDiagnostics.observeSession(getSession(), name); }+ catch (error) {+ void writeDiagnostic("update.network-diagnostics-unavailable", {+ session: name, code: createUpdateDiagnostic(error, { stage: "diagnostics" }).code,+ });+ }+ }if (linuxUpdateTestMode) {if (!/^http:\/\/127\.0\.0\.1:\d+\/$/.test(linuxUpdateTestFeedUrl)) {throw new Error("Linux update verification requires a loopback HTTP feed");diff --git a/apps/desktop/src/main/update-diagnostics.mjs b/apps/desktop/src/main/update-diagnostics.mjsindex 496c33c3..d92ffc45 100644--- a/apps/desktop/src/main/update-diagnostics.mjs+++ b/apps/desktop/src/main/update-diagnostics.mjs@@ -1,4 +1,4 @@-export const createUpdateDiagnostic = (error, { stage, version, platform, arch, now = new Date() }) => {+export const createUpdateDiagnostic = (error, { stage, version, platform, arch, network, now = new Date() }) => {// Keep actionable errors, not response bodies, stacks, credentials or local paths.const message = String(error?.message || error || "Unknown update error").split(/\r?\n(?:XML:|Response:|Headers:|Body:|\s*at )/i, 1)[0]@@ -18,5 +18,6 @@ export const createUpdateDiagnostic = (error, { stage, version, platform, arch,code: /^[A-Z0-9_-]{1,80}$/.test(rawCode) ? rawCode : null,message,source: "https://github.com/tianma-if/edgeever/releases",+ ...(network ? { network } : {}),};};diff --git a/apps/desktop/src/main/update-network-diagnostics.mjs b/apps/desktop/src/main/update-network-diagnostics.mjsnew file mode 100644index 00000000..0062db7e--- /dev/null+++ b/apps/desktop/src/main/update-network-diagnostics.mjs@@ -0,0 +1,117 @@+const MAX_REQUESTS = 24;+const ASSET_HOSTS = new Set(["release-assets.githubusercontent.com", "objects.githubusercontent.com", "github-releases.githubusercontent.com"]);+export const sanitizeUpdateUrl = (value) => {+ try {+ const url = new URL(value);+ return `${url.origin}${url.pathname}`.slice(0, 1500);+ } catch { return null; }+};++export const sanitizeProxyResult = (value) => String(value).split(";").slice(0, 8).map((entry) => {+ const text = entry.trim();+ if (text === "DIRECT") return text;+ const match = /^(PROXY|HTTPS|SOCKS|SOCKS4|SOCKS5|QUIC)\s+(.+)$/i.exec(text);+ if (!match) return "[unrecognized proxy]";+ try {+ const endpoint = new URL(`http://${match[2]}`);+ return `${match[1].toUpperCase()} ${endpoint.host}`;+ } catch { return "[unrecognized proxy]"; }+}).join("; ").slice(0, 500);++const isReleaseUrl = (value) => {+ try {+ const url = new URL(value);+ return url.protocol === "https:" && (+ (url.hostname === "github.com" && /^\/tianma-if\/edgeever\/releases(?:[/.]|$)/.test(url.pathname))+ || (url.hostname === "api.github.com" && /^\/repos\/tianma-if\/edgeever\/releases(?:\/|$)/.test(url.pathname))+ );+ } catch { return false; }+};+const isAssetUrl = (value) => {+ try { const url = new URL(value); return url.protocol === "https:" && ASSET_HOSTS.has(url.hostname); }+ catch { return false; }+};+const errorCode = (value) => String(value || "").match(/\b(?:ERR_[A-Z0-9_]+|E[A-Z]{3,})\b/)?.[0] || "UNKNOWN";++export const createUpdateNetworkDiagnostics = ({ now = Date.now, write = () => {}, onChange = () => {}, proxyTimeoutMs = 2000 } = {}) => {+ let checkId = 0;+ let startedAt = null;+ let endedAt = null;+ let accepting = false;+ let stage = "check";+ let requests = [];+ let omittedRequests = 0;+ const active = new Map();+ const redirects = new Set();+ const attached = new WeakSet();+ const observedSessions = [];+ const notify = (request) => {+ try { Promise.resolve(write("update.network-request", { checkId: request.checkId, ...request })).catch(() => {}); } catch {}+ try { onChange(); } catch {}+ };+ const snapshot = () => ({+ checkId, startedAt, elapsedMs: startedAt === null ? 0 : Math.max(0, (endedAt ?? now()) - startedAt),+ observedSessions: [...observedSessions],+ proxyScope: "Electron session proxy resolution; DIRECT does not rule out TUN routing.",+ omittedRequests,+ requests: requests.map((request) => ({ ...request, elapsedMs: request.status === "pending" ? Math.max(0, now() - request.startedAt) : request.elapsedMs, proxy: { ...request.proxy } })),+ });+ const observeSession = (ses, name) => {+ if (attached.has(ses)) return;+ attached.add(ses);+ observedSessions.push(name);+ const filter = { urls: ["https://github.com/tianma-if/edgeever/releases*", "https://api.github.com/repos/tianma-if/edgeever/releases*", ...[...ASSET_HOSTS].map((host) => `https://${host}/*`)] };+ const key = (id) => `${name}:${id}`;+ ses.webRequest.onBeforeRequest(filter, (details, callback) => {+ // Always release the request immediately; proxy inspection runs separately.+ callback({});+ try {+ if (!accepting || details.webContentsId > 0) return;+ const url = sanitizeUpdateUrl(details.url);+ if (!isReleaseUrl(details.url) && !(isAssetUrl(details.url) && (name === "electron-updater" || redirects.has(url)))) return;+ if (requests.length >= MAX_REQUESTS) { omittedRequests++; return; }+ const request = {+ checkId, requestId: key(details.id), session: name, stage, url,+ startedAt: now(), elapsedMs: 0, status: "pending", httpStatus: null, errorCode: null,+ proxy: { state: "pending", value: null },+ };+ requests.push(request);+ active.set(request.requestId, request);+ let timer;+ Promise.race([+ Promise.resolve().then(() => ses.resolveProxy(details.url)).then((result) => ({ state: "resolved", value: sanitizeProxyResult(result) })),+ new Promise((resolve) => { timer = setTimeout(() => resolve({ state: "timeout", value: null }), proxyTimeoutMs); timer.unref?.(); }),+ ]).catch((error) => ({ state: "failed", value: null, errorCode: errorCode(error?.code || error?.message) }))+ .then((proxy) => {+ clearTimeout(timer);+ if (request.checkId !== checkId) return;+ request.proxy = proxy;+ notify(request);+ });+ } catch {}+ });+ const finish = (details, status) => {+ const request = active.get(key(details.id));+ if (!request) return;+ active.delete(request.requestId);+ request.elapsedMs = Math.max(0, now() - request.startedAt);+ request.status = status;+ request.httpStatus = Number.isInteger(details.statusCode) ? details.statusCode : null;+ request.errorCode = status === "failed" ? errorCode(details.error) : null;+ if (status === "redirected") {+ request.redirectUrl = sanitizeUpdateUrl(details.redirectURL);+ if (request.redirectUrl && isAssetUrl(details.redirectURL)) redirects.add(request.redirectUrl);+ }+ notify(request);+ };+ ses.webRequest.onCompleted(filter, (details) => { try { finish(details, "completed"); } catch {} });+ ses.webRequest.onErrorOccurred(filter, (details) => { try { finish(details, "failed"); } catch {} });+ ses.webRequest.onBeforeRedirect(filter, (details) => { try { finish(details, "redirected"); } catch {} });+ };+ return {+ observeSession, snapshot,+ beginCheck: () => { checkId++; startedAt = now(); endedAt = null; accepting = true; stage = "check"; requests = []; omittedRequests = 0; active.clear(); redirects.clear(); },+ stop: () => { accepting = false; endedAt ??= now(); try { onChange(); } catch {} },+ setStage: (value) => { stage = value; },+ };+};diff --git a/apps/desktop/src/main/update-network-diagnostics.test.mjs b/apps/desktop/src/main/update-network-diagnostics.test.mjsnew file mode 100644index 00000000..abb87d57--- /dev/null+++ b/apps/desktop/src/main/update-network-diagnostics.test.mjs@@ -0,0 +1,96 @@+import { expect, test } from "bun:test";+import { createUpdateNetworkDiagnostics, sanitizeProxyResult, sanitizeUpdateUrl } from "./update-network-diagnostics.mjs";++const flush = () => new Promise((resolve) => setImmediate(resolve));+const makeSession = (resolveProxy = async () => "DIRECT") => {+ const handlers = {};+ return { handlers, resolveProxy, webRequest: Object.fromEntries(+ ["onBeforeRequest", "onCompleted", "onErrorOccurred", "onBeforeRedirect"].map((name) => [name, (_filter, listener) => { handlers[name] = listener; }]),+ ) };+};+const start = (ses, id, url = "https://github.com/tianma-if/edgeever/releases.atom", extra = {}) => {+ let response;+ ses.handlers.onBeforeRequest({ id, url, ...extra }, (value) => { response = value; });+ expect(response).toEqual({});+};++test("records the actual failed URL, elapsed time and proxy of the updater session", async () => {+ let time = 1000;+ const logs = [];+ const ses = makeSession(async () => "PROXY user:[email protected]:7890; DIRECT");+ const diagnostics = createUpdateNetworkDiagnostics({ now: () => time, write: (_event, value) => logs.push(value) });+ diagnostics.observeSession(ses, "electron-updater");+ diagnostics.beginCheck();+ start(ses, 7, "https://user:[email protected]/tianma-if/edgeever/releases.atom?token=private", { uploadData: ["private"], requestHeaders: { Cookie: "private" } });+ await flush();+ time = 31000;+ ses.handlers.onErrorOccurred({ id: 7, error: "net::ERR_CONNECTION_TIMED_OUT" });+ const request = diagnostics.snapshot().requests[0];+ expect(request).toMatchObject({ url: "https://github.com/tianma-if/edgeever/releases.atom", elapsedMs: 30000, status: "failed", errorCode: "ERR_CONNECTION_TIMED_OUT", session: "electron-updater", proxy: { state: "resolved", value: "PROXY 127.0.0.1:7890; DIRECT" } });+ expect(JSON.stringify(logs)).not.toMatch(/secret|password|private|Cookie|uploadData/);+});++test("tracks metadata redirects and their HTTP status without recording signed URL queries", async () => {+ const ses = makeSession();+ const diagnostics = createUpdateNetworkDiagnostics();+ diagnostics.observeSession(ses, "default-metadata");+ diagnostics.beginCheck();+ start(ses, 1, "https://github.com/tianma-if/edgeever/releases/download/v1.111.0/latest-windows.json");+ ses.handlers.onBeforeRedirect({ id: 1, statusCode: 302, redirectURL: "https://release-assets.githubusercontent.com/asset/file?jwt=secret" });+ start(ses, 1, "https://release-assets.githubusercontent.com/asset/file?jwt=secret");+ ses.handlers.onCompleted({ id: 1, statusCode: 200, error: "net::OK" });+ await flush();+ const requests = diagnostics.snapshot().requests;+ expect(requests).toHaveLength(2);+ expect(requests[0]).toMatchObject({ status: "redirected", httpStatus: 302, redirectUrl: "https://release-assets.githubusercontent.com/asset/file" });+ expect(requests[1]).toMatchObject({ status: "completed", httpStatus: 200, errorCode: null, proxy: { value: "DIRECT" } });+});++test("excludes browser/plugin traffic and requests outside an active update attempt", () => {+ const ses = makeSession();+ const diagnostics = createUpdateNetworkDiagnostics();+ diagnostics.observeSession(ses, "default-metadata");+ start(ses, 1);+ diagnostics.beginCheck();+ start(ses, 2, undefined, { webContentsId: 10 });+ start(ses, 3, "https://github.com/tianma-if/edgeever-tasks/releases/latest");+ start(ses, 4, "https://release-assets.githubusercontent.com/unrelated/asset");+ diagnostics.stop();+ start(ses, 5);+ expect(diagnostics.snapshot().requests).toEqual([]);+});++test("proxy inspection cannot delay or fail an update request", async () => {+ const ses = makeSession(() => new Promise(() => {}));+ const diagnostics = createUpdateNetworkDiagnostics({ proxyTimeoutMs: 5, write: () => { throw new Error("disk failure"); }, onChange: () => { throw new Error("window closed"); } });+ diagnostics.observeSession(ses, "electron-updater");+ diagnostics.beginCheck();+ start(ses, 1);+ await new Promise((resolve) => setTimeout(resolve, 15));+ expect(diagnostics.snapshot().requests[0].proxy.state).toBe("timeout");+ ses.handlers.onErrorOccurred({ id: 1, error: "net::ERR_NETWORK_CHANGED" });+ expect(diagnostics.snapshot().requests[0].errorCode).toBe("ERR_NETWORK_CHANGED");+});++test("resets attempts, ignores late proxy results and bounds collection", async () => {+ let resolveProxy;+ const ses = makeSession(() => new Promise((resolve) => { resolveProxy = resolve; }));+ const diagnostics = createUpdateNetworkDiagnostics();+ diagnostics.observeSession(ses, "electron-updater");+ diagnostics.beginCheck();+ start(ses, 1);+ await flush();+ diagnostics.beginCheck();+ resolveProxy("DIRECT");+ await flush();+ expect(diagnostics.snapshot().requests).toEqual([]);+ for (let id = 0; id < 26; id++) start(ses, id);+ expect(diagnostics.snapshot().requests).toHaveLength(24);+ expect(diagnostics.snapshot().omittedRequests).toBe(2);+ diagnostics.stop();+});++test("proxy and URL sanitizers never expose credentials or URL parameters", () => {+ expect(sanitizeUpdateUrl("https://user:[email protected]/path?token=secret#private")).toBe("https://github.com/path");+ expect(sanitizeProxyResult("SOCKS5 user:pass@[::1]:1080; garbage-secret")).toBe("SOCKS5 [::1]:1080; [unrecognized proxy]");+});diff --git a/apps/web/src/vite-env.d.ts b/apps/web/src/vite-env.d.tsindex 4c2924f4..63cf2c49 100644--- a/apps/web/src/vite-env.d.ts+++ b/apps/web/src/vite-env.d.ts@@ -182,6 +182,29 @@ interface EdgeEverDesktopBridge {}) => void): () => void;}+interface DesktopUpdateNetworkDiagnostic {+ checkId: number;+ startedAt: number | null;+ elapsedMs: number;+ observedSessions: string[];+ proxyScope: string;+ omittedRequests: number;+ requests: Array<{+ checkId: number;+ requestId: string;+ session: string;+ stage: string;+ url: string | null;+ startedAt: number;+ elapsedMs: number;+ status: "pending" | "completed" | "failed" | "redirected";+ httpStatus: number | null;+ errorCode: string | null;+ redirectUrl?: string | null;+ proxy: { state: "pending" | "resolved" | "failed" | "timeout"; value: string | null; errorCode?: string };+ }>;+}+interface DesktopUpdateDiagnostic {at: string;stage: string;@@ -191,6 +214,7 @@ interface DesktopUpdateDiagnostic {code: string | null;message: string;source: string;+ network?: DesktopUpdateNetworkDiagnostic;}interface DesktopUpdateDownloadProgress {diff --git a/package.json b/package.jsonindex 45bedb68..bf7ebb55 100644--- a/package.json+++ b/package.json@@ -65,7 +65,7 @@"publish:extension": "bun scripts/publish-web-clipper.mjs","test:plugin-sync": "bun tests/plugin-structured-sync.integration.mjs","test:desktop:sidecar": "bun scripts/test-desktop-sidecar.mjs && bun run test:plugin-sync",- "test:desktop": "bun test apps/desktop/src/main/global-shortcut.test.mjs apps/desktop/src/main/account-scope.test.mjs apps/desktop/src/main/app-protocol.test.mjs apps/desktop/src/main/child-process-start.test.mjs apps/desktop/src/main/clipboard-write.test.mjs apps/desktop/src/main/desktop-diagnostics.test.mjs apps/desktop/src/main/desktop-menu.test.mjs apps/desktop/src/main/desktop-update-flow.test.mjs apps/desktop/src/main/update-diagnostics.test.mjs apps/desktop/src/main/update-progress.test.mjs apps/desktop/src/main/diagnostic-log.test.mjs apps/desktop/src/main/file-association.test.mjs apps/desktop/src/main/wechat-chat-archive.test.mjs apps/desktop/src/main/wechat-share-import.test.mjs apps/desktop/src/main/share-extension-registration.test.mjs apps/desktop/src/main/windows-share-menu.test.mjs apps/desktop/src/main/file-permissions.test.mjs apps/desktop/src/main/installation-location.test.mjs apps/desktop/src/main/local-data-reset.test.mjs apps/desktop/src/main/ai-direct.test.mjs apps/desktop/src/main/plugin-public-network.test.mjs apps/desktop/src/main/picgo.test.mjs apps/desktop/src/main/renderer-recovery.test.mjs apps/desktop/src/main/renderer-hibernate.test.mjs apps/desktop/src/main/renderer-startup-guard.test.mjs apps/desktop/src/main/renderer-storage-migration.test.mjs apps/desktop/src/main/resource-request.test.mjs apps/desktop/src/main/resource-url.test.mjs apps/desktop/src/main/security-boundaries.test.mjs apps/desktop/src/main/scheduled-task-scheduler.test.mjs apps/desktop/src/main/screenshot-capture.test.mjs apps/desktop/src/main/staged-resource.test.mjs apps/desktop/src/main/staged-resource-alias.test.mjs apps/desktop/src/main/tray-icon.test.mjs apps/desktop/src/main/user-data-directory.test.mjs apps/desktop/src/main/window-open-policy.test.mjs apps/desktop/src/main/window-visibility.test.mjs apps/desktop/src/main/windows-update-trust.test.mjs apps/desktop/src/main/windows-taskbar-diagnostics.test.mjs apps/web/src/lib/api.test.mjs apps/web/src/lib/app-page-path.test.mjs apps/web/src/lib/clipboard.test.mjs apps/web/src/lib/desktop-renderer-ready.test.mjs apps/web/src/lib/desktop-workspace-restore.test.mjs apps/web/src/lib/desktop-repository.test.mjs apps/web/src/lib/desktop-resources.test.mjs apps/web/src/lib/desktop-acp.test.mjs apps/web/src/lib/desktop-sync.test.mjs apps/web/src/lib/local-mirror.test.mjs apps/web/src/lib/repository.test.mjs apps/web/src/lib/runtime.test.mjs apps/web/src/lib/picgo.test.mjs apps/web/src/lib/screenshot-import.test.mjs apps/web/src/lib/wechat-chat-import.test.mjs apps/web/src/lib/shared-file-import.test.mjs apps/web/src/lib/sync-queue.test.mjs && bun test --cwd apps/desktop src/main/acp-adapter-manager.test.mjs src/main/acp-host.test.mjs src/main/workbuddy-auth.test.mjs src/main/antigravity-proxy.test.mjs src/main/acp-mcp-bridge.test.mjs && bun run test:desktop:sidecar",+ "test:desktop": "bun test apps/desktop/src/main/global-shortcut.test.mjs apps/desktop/src/main/account-scope.test.mjs apps/desktop/src/main/app-protocol.test.mjs apps/desktop/src/main/child-process-start.test.mjs apps/desktop/src/main/clipboard-write.test.mjs apps/desktop/src/main/desktop-diagnostics.test.mjs apps/desktop/src/main/desktop-menu.test.mjs apps/desktop/src/main/desktop-update-flow.test.mjs apps/desktop/src/main/update-diagnostics.test.mjs apps/desktop/src/main/update-network-diagnostics.test.mjs apps/desktop/src/main/update-progress.test.mjs apps/desktop/src/main/diagnostic-log.test.mjs apps/desktop/src/main/file-association.test.mjs apps/desktop/src/main/wechat-chat-archive.test.mjs apps/desktop/src/main/wechat-share-import.test.mjs apps/desktop/src/main/share-extension-registration.test.mjs apps/desktop/src/main/windows-share-menu.test.mjs apps/desktop/src/main/file-permissions.test.mjs apps/desktop/src/main/installation-location.test.mjs apps/desktop/src/main/local-data-reset.test.mjs apps/desktop/src/main/ai-direct.test.mjs apps/desktop/src/main/plugin-public-network.test.mjs apps/desktop/src/main/picgo.test.mjs apps/desktop/src/main/renderer-recovery.test.mjs apps/desktop/src/main/renderer-hibernate.test.mjs apps/desktop/src/main/renderer-startup-guard.test.mjs apps/desktop/src/main/renderer-storage-migration.test.mjs apps/desktop/src/main/resource-request.test.mjs apps/desktop/src/main/resource-url.test.mjs apps/desktop/src/main/security-boundaries.test.mjs apps/desktop/src/main/scheduled-task-scheduler.test.mjs apps/desktop/src/main/screenshot-capture.test.mjs apps/desktop/src/main/staged-resource.test.mjs apps/desktop/src/main/staged-resource-alias.test.mjs apps/desktop/src/main/tray-icon.test.mjs apps/desktop/src/main/user-data-directory.test.mjs apps/desktop/src/main/window-open-policy.test.mjs apps/desktop/src/main/window-visibility.test.mjs apps/desktop/src/main/windows-update-trust.test.mjs apps/desktop/src/main/windows-taskbar-diagnostics.test.mjs apps/web/src/lib/api.test.mjs apps/web/src/lib/app-page-path.test.mjs apps/web/src/lib/clipboard.test.mjs apps/web/src/lib/desktop-renderer-ready.test.mjs apps/web/src/lib/desktop-workspace-restore.test.mjs apps/web/src/lib/desktop-repository.test.mjs apps/web/src/lib/desktop-resources.test.mjs apps/web/src/lib/desktop-acp.test.mjs apps/web/src/lib/desktop-sync.test.mjs apps/web/src/lib/local-mirror.test.mjs apps/web/src/lib/repository.test.mjs apps/web/src/lib/runtime.test.mjs apps/web/src/lib/picgo.test.mjs apps/web/src/lib/screenshot-import.test.mjs apps/web/src/lib/wechat-chat-import.test.mjs apps/web/src/lib/shared-file-import.test.mjs apps/web/src/lib/sync-queue.test.mjs && bun test --cwd apps/desktop src/main/acp-adapter-manager.test.mjs src/main/acp-host.test.mjs src/main/workbuddy-auth.test.mjs src/main/antigravity-proxy.test.mjs src/main/acp-mcp-bridge.test.mjs && bun run test:desktop:sidecar","verify:desktop-renderer": "bun scripts/verify-desktop-renderer.mjs","verify:renderer-origin-migration": "bun run --cwd apps/desktop verify-origin-migration","verify:desktop-cross-version-startup": "bun scripts/verify-desktop-cross-version-startup.mjs",