fix(telemetry): report real VS Code platform and honor usage opt-out
The VS Code bridge re-mapped the already-mapped platform value from the webview, collapsing every install to platform "web"; it also sent the installId even when usage reporting was disabled. The remote-instance update poll in the header and the post-update wait poll now send reportUsage=false so status checks no longer count as activity.
This commit is contained in:
@@ -950,7 +950,8 @@ export const Header: React.FC<HeaderProps> = ({
|
||||
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' },
|
||||
|
||||
@@ -161,7 +161,8 @@ async function waitForUpdateApplied(
|
||||
): Promise<boolean> {
|
||||
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' },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user