Skip to content

AI-native design editor. Open-source Figma alternative.

fix(tauri): use navigator.platform for Windows detection in MCP spawn

Danila Poyarkov8b5e372953d0
diff --git a/src/automation/spawn-mcp.ts b/src/automation/spawn-mcp.ts
index 3e8ed21bf..a5ebbb581 100644
--- a/src/automation/spawn-mcp.ts
+++ b/src/automation/spawn-mcp.ts
@@ -67,7 +67,7 @@ export async function spawnMCPIfNeeded(): Promise<AutomationServerHandle | null>
runtimeAutomationAuthToken = authToken
const { Command } = await import('@tauri-apps/plugin-shell')
- const isWindows = navigator.userAgent.includes('Windows')
+ const isWindows = navigator.platform.includes('Win')
const command = isWindows
? Command.create('cmd', ['/c', 'openpencil-mcp-http'], {
env: {