fix(desktop): report real hostname/platform/arch in heartbeat
Renderer was registering clients with navigator.platform ("MacIntel") and
a hardcoded "renderer-preview" cpu_arch. Source device info from the main
process (os.hostname + process.platform/arch) via a new device-info IPC,
and let heartbeats always send the authoritative runtime values so stale
registrations self-heal.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,9 +8,16 @@ import type {
|
||||
} from "@geo/shared-types";
|
||||
import type { DesktopRuntimeSnapshot } from "../renderer/types";
|
||||
|
||||
interface DesktopDeviceInfo {
|
||||
device_name: string;
|
||||
os: string;
|
||||
cpu_arch: string;
|
||||
}
|
||||
|
||||
const desktopBridge = {
|
||||
app: {
|
||||
ping: () => ipcRenderer.invoke("desktop:ping") as Promise<string>,
|
||||
deviceInfo: () => ipcRenderer.invoke("desktop:device-info") as Promise<DesktopDeviceInfo>,
|
||||
runtimeSnapshot: () =>
|
||||
ipcRenderer.invoke("desktop:runtime-snapshot") as Promise<DesktopRuntimeSnapshot>,
|
||||
bindPublishAccount: (platformId: string) =>
|
||||
|
||||
Reference in New Issue
Block a user