From 88ee7f69eff84f740444da727b5d8bfbcd5a477b Mon Sep 17 00:00:00 2001 From: jh-block Date: Tue, 31 Mar 2026 11:11:10 +0200 Subject: [PATCH] Persist mesh provider ID across remounts, reject download on Intel Macs - Store meshProviderId in localStorage so reopening Settings finds the previously created provider instead of creating duplicates - Gate auto-download on process.arch === 'arm64' in addition to darwin check, since the bundled binaries are Apple Silicon only Signed-off-by: jh-block --- ui/desktop/src/components/settings/mesh/MeshSettings.tsx | 8 +++++++- ui/desktop/src/main.ts | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ui/desktop/src/components/settings/mesh/MeshSettings.tsx b/ui/desktop/src/components/settings/mesh/MeshSettings.tsx index 0617463781..ffacd1c4fb 100644 --- a/ui/desktop/src/components/settings/mesh/MeshSettings.tsx +++ b/ui/desktop/src/components/settings/mesh/MeshSettings.tsx @@ -61,7 +61,13 @@ export const MeshSettings = () => { const [saving, setSaving] = useState(false); const [error, setError] = useState(null); const [activeModel, setActiveModel] = useState(null); - const [meshProviderId, setMeshProviderId] = useState('mesh'); + const [meshProviderId, setMeshProviderIdState] = useState( + () => localStorage.getItem('mesh-provider-id') ?? 'mesh' + ); + const setMeshProviderId = (id: string) => { + setMeshProviderIdState(id); + localStorage.setItem('mesh-provider-id', id); + }; const [checking, setChecking] = useState(false); const checkStatus = useCallback(async () => { diff --git a/ui/desktop/src/main.ts b/ui/desktop/src/main.ts index 76d92fe086..fdbb8113ee 100644 --- a/ui/desktop/src/main.ts +++ b/ui/desktop/src/main.ts @@ -1744,7 +1744,7 @@ ipcMain.handle('stop-mesh', async () => { }); ipcMain.handle('download-mesh', async () => { - if (process.platform !== 'darwin') { + if (process.platform !== 'darwin' || process.arch !== 'arm64') { return { downloaded: false, error: 'Auto-download is only available on macOS (Apple Silicon)' }; }