diff --git a/server/routes/system.js b/server/routes/system.js index 4c71250..55809e7 100644 --- a/server/routes/system.js +++ b/server/routes/system.js @@ -545,7 +545,11 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res const history = allTags.filter(t => compare(t.version, currentVersion) <= 0); const latestFromRemote = allTags[0] || null; - const needsUpdate = latestFromRemote ? (compare(latestFromRemote.version, currentVersion) > 0) : false; + const compResult = latestFromRemote ? compare(latestFromRemote.version, currentVersion) : 0; + const needsUpdate = compResult > 0; + + console.log(`[VersionCheck] Path: ${packageJsonPath}`); + console.log(`[VersionCheck] Current: "${currentVersion}", Latest: "${latestFromRemote?.version}", Comp: ${compResult}, NeedsUpdate: ${needsUpdate}`); res.json({ current: currentVersion, @@ -553,7 +557,7 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res needsUpdate: needsUpdate, latestInfo: needsUpdate ? latestFromRemote : null, history: history, - debug: { path: packageJsonPath } + debug: { path: packageJsonPath, compResult } }); }); }); diff --git a/src/platform/pages/VersionPage.tsx b/src/platform/pages/VersionPage.tsx index e6713a7..41868f6 100644 --- a/src/platform/pages/VersionPage.tsx +++ b/src/platform/pages/VersionPage.tsx @@ -110,7 +110,7 @@ export function VersionPage() { }; // Source of truth for versioning comes from the API - const currentVersion = remoteInfo?.current || '0.4.0'; + const currentVersion = remoteInfo?.current || healthIcon?.version || '---'; const buildDate = '2026-01-25'; // Check if update is needed based on API-supplied needsUpdate flag