diff --git a/api/main.py b/api/main.py index 7f77a02f..382ed67e 100644 --- a/api/main.py +++ b/api/main.py @@ -34,7 +34,7 @@ def filter(self, record): app = FastAPI( title="Modly API", - version="0.4.1", + version="0.4.2", lifespan=lifespan, ) diff --git a/electron/main/index.ts b/electron/main/index.ts index 0cbd5e5a..2f3f5b83 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -33,7 +33,8 @@ function createWindow(): void { preload: join(__dirname, '../preload/index.js'), sandbox: false, contextIsolation: true, - nodeIntegration: false + nodeIntegration: false, + backgroundThrottling: false } }) diff --git a/package-lock.json b/package-lock.json index 5f7152ca..7c354c2b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "modly", - "version": "0.4.1", + "version": "0.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "modly", - "version": "0.4.1", + "version": "0.4.2", "dependencies": { "@electron-toolkit/utils": "^4.0.0", "@mkkellogg/gaussian-splats-3d": "^0.4.7", @@ -34,7 +34,7 @@ "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "cross-env": "^10.1.0", - "electron": "^42.4.1", + "electron": "^42.11.1", "electron-builder": "^26.15.3", "electron-vite": "^5.0.0", "eslint": "^9.17.0", @@ -4166,9 +4166,9 @@ } }, "node_modules/electron": { - "version": "42.9.3", - "resolved": "https://registry.npmjs.org/electron/-/electron-42.9.3.tgz", - "integrity": "sha512-REQUgPrCWOP0FajNcKCwwjkssirN+MVbemyd6bT+x51OVq58y6IqjtpA4vmm/KEzKXj2MIOebx/gF497CkRAPg==", + "version": "42.11.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-42.11.1.tgz", + "integrity": "sha512-mRYYjGDRWCyU+h4FU/0ruqxL/rXc+h2VCLhTb19KHu18HCUFWQAeFS/mFwnEKT/7GQCwlIHOhHie5ICLPXW6aw==", "license": "MIT", "dependencies": { "@electron-internal/extract-zip": "^1.0.1", diff --git a/package.json b/package.json index 0d166b46..48dd6a29 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modly", - "version": "0.4.1", + "version": "0.4.2", "description": "Local AI-powered 3D mesh generation from images", "main": "./out/main/index.js", "author": "Modly", @@ -45,7 +45,7 @@ "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", "cross-env": "^10.1.0", - "electron": "^42.4.1", + "electron": "^42.11.1", "electron-builder": "^26.15.3", "electron-vite": "^5.0.0", "eslint": "^9.17.0", diff --git a/src/shared/stores/appStore.ts b/src/shared/stores/appStore.ts index d06a5211..6e0cb792 100644 --- a/src/shared/stores/appStore.ts +++ b/src/shared/stores/appStore.ts @@ -1,5 +1,6 @@ import { create } from 'zustand' import { persist } from 'zustand/middleware' +import { showErrorNotification } from '@shared/utils/notification' export type UiScale = 'small' | 'medium' | 'large' | 'very-large' export type BackendStatus = 'not_started' | 'starting' | 'ready' | 'error' @@ -290,6 +291,9 @@ export const useAppStore = create()( const current = get().currentJob if (!current) return set({ currentJob: { ...current, ...patch } }) + if (patch.status === 'error') { + void showErrorNotification('Generation failed', `Workspace generation failed: ${patch.error ?? 'Unknown error'}`) + } }, setGenerationOptions: (patch) => { diff --git a/src/shared/utils/notification.ts b/src/shared/utils/notification.ts index 864cd161..789ed827 100644 --- a/src/shared/utils/notification.ts +++ b/src/shared/utils/notification.ts @@ -15,3 +15,11 @@ export async function showCompletionNotification(body: string, title = 'Modly'): // Notifications not available (e.g. unsupported platform) } } + +export async function showErrorNotification(body: string, title = 'Modly'): Promise { + try { + await window.electron.notifications.show(title, body) + } catch { + // Notifications not available (e.g. unsupported platform) + } +}