diff --git a/packages/ui/src/components/layout/Header.tsx b/packages/ui/src/components/layout/Header.tsx index 70596531..4a788066 100644 --- a/packages/ui/src/components/layout/Header.tsx +++ b/packages/ui/src/components/layout/Header.tsx @@ -950,7 +950,8 @@ export const Header: React.FC = ({ setRemoteUpdateChecking(true); setRemoteUpdateError(null); try { - const params = new URLSearchParams({ appType: 'web', instanceMode: 'remote' }); + // Status-only poll: must not count as usage on the remote server's install id. + const params = new URLSearchParams({ appType: 'web', instanceMode: 'remote', reportUsage: 'false' }); const response = await runtimeFetch(`/api/openchamber/update-check?${params.toString()}`, { method: 'GET', headers: { Accept: 'application/json' }, diff --git a/packages/ui/src/components/ui/UpdateDialog.tsx b/packages/ui/src/components/ui/UpdateDialog.tsx index bdf2a6d2..02cf4545 100644 --- a/packages/ui/src/components/ui/UpdateDialog.tsx +++ b/packages/ui/src/components/ui/UpdateDialog.tsx @@ -161,7 +161,8 @@ async function waitForUpdateApplied( ): Promise { for (let i = 0; i < maxAttempts; i++) { try { - const response = await runtimeFetch('/api/openchamber/update-check', { + // Status-only poll while waiting for the update to apply; not a usage report. + const response = await runtimeFetch('/api/openchamber/update-check?reportUsage=false', { method: 'GET', headers: { Accept: 'application/json' }, }); diff --git a/packages/vscode/src/bridge-system-runtime.ts b/packages/vscode/src/bridge-system-runtime.ts index eacbb3aa..ffc1bfaf 100644 --- a/packages/vscode/src/bridge-system-runtime.ts +++ b/packages/vscode/src/bridge-system-runtime.ts @@ -77,10 +77,13 @@ const getOrCreateInstallId = (scope: string): string => { return installId; }; -const mapNodePlatformToApiPlatform = (value: string): 'macos' | 'windows' | 'linux' | 'web' => { +const mapNodePlatformToApiPlatform = (value: string): 'macos' | 'windows' | 'linux' | 'android' | 'ios' | 'web' => { + // The webview already sends API-shaped values; Node's os.platform() is the fallback source. + if (value === 'macos' || value === 'windows' || value === 'linux' || value === 'android' || value === 'ios' || value === 'web') { + return value; + } if (value === 'darwin') return 'macos'; if (value === 'win32') return 'windows'; - if (value === 'linux') return 'linux'; return 'web'; }; @@ -315,7 +318,6 @@ export async function handleSystemBridgeMessage( : os.arch(); const reportUsage = body.reportUsage !== false; - const installId = getOrCreateInstallId('vscode'); const requestBody = { appType: 'vscode', deviceClass, @@ -323,7 +325,7 @@ export async function handleSystemBridgeMessage( arch: mapNodeArchToApiArch(archRaw), channel: 'stable', currentVersion, - installId, + ...(reportUsage ? { installId: getOrCreateInstallId('vscode') } : {}), instanceMode, reportUsage, };