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:
2026-04-20 11:59:35 +08:00
parent 4d0c4510ef
commit 9bfe0fab48
5 changed files with 51 additions and 14 deletions
+1
View File
@@ -14,6 +14,7 @@ declare global {
desktopBridge: {
app: {
ping(): Promise<string>;
deviceInfo(): Promise<{ device_name: string; os: string; cpu_arch: string }>;
runtimeSnapshot(): Promise<DesktopRuntimeSnapshot>;
bindPublishAccount(platformId: string): Promise<DesktopAccountInfo>;
refreshRuntimeAccounts(): Promise<null>;