From c2a701fe039a58f5a57cf4955351e13f20111db3 Mon Sep 17 00:00:00 2001 From: Lightning Pixel Date: Wed, 18 Mar 2026 22:18:24 +0100 Subject: [PATCH 01/12] fix: re-run python setup after app update --- electron/main/python-setup.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/electron/main/python-setup.ts b/electron/main/python-setup.ts index a4cf8f8..8d48b89 100644 --- a/electron/main/python-setup.ts +++ b/electron/main/python-setup.ts @@ -3,11 +3,12 @@ import { existsSync, readFileSync, writeFileSync, readdirSync } from 'fs' import { join } from 'path' import { spawn, execSync } from 'child_process' -const SETUP_VERSION = 1 +const SETUP_VERSION = 2 const TOTAL_PACKAGES = 20 interface SetupJson { version: number + appVersion?: string } // ─── Public helpers ────────────────────────────────────────────────────────── @@ -18,6 +19,8 @@ export function checkSetupNeeded(userData: string): boolean { try { const data = JSON.parse(readFileSync(jsonPath, 'utf-8')) as SetupJson if (data.version < SETUP_VERSION) return true + // Re-run setup if the app was updated (new python-embed is fresh, no packages) + if (data.appVersion !== app.getVersion()) return true } catch { return true } @@ -30,7 +33,11 @@ export function checkSetupNeeded(userData: string): boolean { export function markSetupDone(userData: string): void { const jsonPath = join(userData, 'python_setup.json') - writeFileSync(jsonPath, JSON.stringify({ version: SETUP_VERSION }), 'utf-8') + writeFileSync( + jsonPath, + JSON.stringify({ version: SETUP_VERSION, appVersion: app.getVersion() }), + 'utf-8' + ) } /** Path to the venv Python executable created during setup (packaged Unix). */ From 90d0b8ab370b31e9c4715a09c8840e9fa35e0f37 Mon Sep 17 00:00:00 2001 From: Lightning Pixel Date: Thu, 19 Mar 2026 10:41:07 +0100 Subject: [PATCH 02/12] fix(settings): dynamic version and about page links --- src/areas/settings/components/AboutSection.tsx | 17 ++++++++++++----- src/shared/ui/index.tsx | 7 +++++-- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/areas/settings/components/AboutSection.tsx b/src/areas/settings/components/AboutSection.tsx index 8c4c642..6ecbda1 100644 --- a/src/areas/settings/components/AboutSection.tsx +++ b/src/areas/settings/components/AboutSection.tsx @@ -1,28 +1,35 @@ +import { useEffect, useState } from 'react' import { Section, Card, Row, LinkButton } from '@shared/ui' export function AboutSection(): JSX.Element { + const [version, setVersion] = useState('') + + useEffect(() => { + window.electron.app.info().then(({ version }) => setVersion(version)) + }, []) + return (
- v0.1.0 + {version ? `v${version}` : '—'} - + - + - + - + diff --git a/src/shared/ui/index.tsx b/src/shared/ui/index.tsx index 5eef227..9fba52d 100644 --- a/src/shared/ui/index.tsx +++ b/src/shared/ui/index.tsx @@ -110,9 +110,12 @@ export function Select({ value, onChange, options }: { ) } -export function LinkButton({ label }: { label: string }): JSX.Element { +export function LinkButton({ label, href }: { label: string; href?: string }): JSX.Element { + const handleClick = (): void => { + if (href) window.open(href, '_blank') + } return ( - + +
+ + + + , + document.body + ) +} From fe3743013272fbccaeaecba458ae2a05b264765c Mon Sep 17 00:00:00 2001 From: Lightning Pixel Date: Thu, 19 Mar 2026 11:31:30 +0100 Subject: [PATCH 04/12] fix(update): restore version check condition --- src/App.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index f7a0900..ddd5e0f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -31,7 +31,13 @@ export default function App(): JSX.Element { if (backendStatus !== 'ready') return window.electron.app.info().then(({ version }) => { setCurrentVersion(version) - setUpdateVersion('v9.9.9') + fetch('https://api.github.com/repos/lightningpixel/modly/releases/latest') + .then((r) => r.json()) + .then((data) => { + const latest = data?.tag_name as string | undefined + if (latest && compareSemver(latest, version) > 0) setUpdateVersion(latest) + }) + .catch(() => {}) }) }, [backendStatus]) From 63c960bc6add904e900f4baa06953f4d47155eb2 Mon Sep 17 00:00:00 2001 From: Lightning Pixel Date: Thu, 19 Mar 2026 14:32:39 +0100 Subject: [PATCH 05/12] fix single model download --- src/areas/models/ModelsPage.tsx | 4 ++++ src/areas/models/components/ExtensionCard.tsx | 16 +++++++++------- src/areas/models/components/ModelCard.tsx | 8 +++++--- 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/src/areas/models/ModelsPage.tsx b/src/areas/models/ModelsPage.tsx index 1123050..b9cdc90 100644 --- a/src/areas/models/ModelsPage.tsx +++ b/src/areas/models/ModelsPage.tsx @@ -105,6 +105,8 @@ export default function ModelsPage(): JSX.Element { installProgress.step !== 'done' && installProgress.step !== 'error' + const isBusy = isInstalling || inProgressIds.length > 0 + function installProgressLabel(): string { if (!installProgress) return '' switch (installProgress.step) { @@ -256,6 +258,7 @@ export default function ModelsPage(): JSX.Element { ext={ext} installedIds={models.map((m) => m.id)} downloading={downloading} + disabled={isBusy} loadError={ loadErrors[ext.id] ?? ext.models.map((v) => loadErrors[v.id]).find(Boolean) @@ -311,6 +314,7 @@ export default function ModelsPage(): JSX.Element { setDeleteTarget(model)} onGenerate={() => { setGenerationOptions({ modelId: model.id }) diff --git a/src/areas/models/components/ExtensionCard.tsx b/src/areas/models/components/ExtensionCard.tsx index 46fe807..d7f26c5 100644 --- a/src/areas/models/components/ExtensionCard.tsx +++ b/src/areas/models/components/ExtensionCard.tsx @@ -7,11 +7,12 @@ interface Props { installedIds: string[] downloading: Record loadError?: string + disabled?: boolean onInstall: (variant: ExtensionVariant) => void onUninstall: (extId: string) => void } -export function ExtensionCard({ ext, installedIds, downloading, loadError, onInstall, onUninstall }: Props): JSX.Element { +export function ExtensionCard({ ext, installedIds, downloading, loadError, disabled, onInstall, onUninstall }: Props): JSX.Element { return (
@@ -59,8 +60,9 @@ export function ExtensionCard({ ext, installedIds, downloading, loadError, onIns {/* Uninstall extension button */}
) : (