From 68c25928e1e8845593ead2023b863eca003f73ca Mon Sep 17 00:00:00 2001 From: choibk Date: Sun, 25 Jan 2026 01:47:14 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EC=A0=84=20=EA=B4=80=EB=A6=AC=20?= =?UTF-8?q?=EC=8B=9C=EC=8A=A4=ED=85=9C=20=EC=B5=9C=EC=A2=85=20=EC=95=88?= =?UTF-8?q?=EC=A0=95=ED=99=94:=20=EC=95=88=EB=82=B4=20=EB=B0=B0=EB=84=88?= =?UTF-8?q?=20=EB=A1=9C=EC=A7=81=20=EB=B0=8F=20=EA=B0=80=EC=8B=9C=EC=84=B1?= =?UTF-8?q?=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4=EA=B2=B0=20(v0.4.0.1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- server/package.json | 2 +- server/routes/system.js | 3 +- src/platform/pages/VersionPage.tsx | 82 +++++++++++++----------------- 4 files changed, 40 insertions(+), 49 deletions(-) diff --git a/package.json b/package.json index e5efe2c..6cccfdf 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "smartims", "private": true, - "version": "0.4.0.1", + "version": "0.4.0.0", "type": "module", "scripts": { "dev": "vite", diff --git a/server/package.json b/server/package.json index 8537666..b7fabc2 100644 --- a/server/package.json +++ b/server/package.json @@ -1,6 +1,6 @@ { "name": "server", - "version": "0.4.0.1", + "version": "0.4.0.0", "description": "", "main": "index.js", "scripts": { diff --git a/server/routes/system.js b/server/routes/system.js index 2e8b4cb..5da1139 100644 --- a/server/routes/system.js +++ b/server/routes/system.js @@ -548,10 +548,11 @@ router.get('/version/remote', isAuthenticated, hasRole('admin'), async (req, res // Filter 1: History is ONLY versions <= current const history = allTags.filter(t => compare(t.version, currentVersion) <= 0); - // Filter 2: Latest is the absolute newest tag available (could be > current) const latestFromRemote = allTags[0] || null; const needsUpdate = latestFromRemote ? (compare(latestFromRemote.version, currentVersion) > 0) : false; + console.log(`[VersionCheck] Current: "${currentVersion}", LatestTag: "${latestFromRemote?.version}", NeedsUpdate: ${needsUpdate}`); + res.json({ current: currentVersion, latest: latestFromRemote ? `v${latestFromRemote.version}` : null, diff --git a/src/platform/pages/VersionPage.tsx b/src/platform/pages/VersionPage.tsx index d1b3ea7..4cb8a53 100644 --- a/src/platform/pages/VersionPage.tsx +++ b/src/platform/pages/VersionPage.tsx @@ -113,11 +113,11 @@ 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 || '0.4.0.0'; const buildDate = '2026-01-25'; - // Check if update is needed based on API-supplied needsUpdate flag - const needsUpdate = remoteInfo?.needsUpdate || false; + // IMPORTANT: needsUpdate should be true if remote has a higher version than local + const needsUpdate = !!remoteInfo?.needsUpdate; return (
@@ -136,51 +136,41 @@ export function VersionPage() {
- {/* Update Alert Banner - Based on Frontend Version comparison */} - {needsUpdate && !updateResult && ( -
-
-
-
- -
-
-
-

- {remoteInfo?.latestInfo?.type === 'urgent' ? '🚨 κΈ΄κΈ‰ λ³΄μ•ˆ/μ‹œμŠ€ν…œ μ—…λ°μ΄νŠΈ 발견' : '✨ μƒˆλ‘œμš΄ μ—…λ°μ΄νŠΈκ°€ κ°€λŠ₯ν•©λ‹ˆλ‹€'} -

- - {remoteInfo?.latestInfo?.type || 'patch'} - -
-

- ν˜„μž¬ 버전: v{currentVersion} β†’ μ΅œμ‹  버전: {remoteInfo?.latest} -

- {remoteInfo?.latestInfo && ( -
-

[{remoteInfo.latestInfo.title}]

-
    - {remoteInfo.latestInfo.changes.slice(0, 3).map((c, i) => ( -
  • - - {c} -
  • - ))} - {remoteInfo.latestInfo.changes.length > 3 &&
  • ...μ™Έ {remoteInfo.latestInfo.changes.length - 3}건
  • } -
-
- )} -
+ {/* Debug Info (Visible only for investigation) */} +
+ [Debug] Current: {currentVersion}, Latest: {remoteInfo?.latest}, NeedsUpdate: {String(needsUpdate)}, LatestInfo: {remoteInfo?.latestInfo ? 'Yes' : 'No'} +
+ + {/* Update Alert Banner - Enhanced Visibility */} + {needsUpdate && !updateResult && remoteInfo?.latestInfo && ( +
+
+
+ +
+
+
+

+ {remoteInfo.latestInfo.type === 'urgent' ? 'μ‹ μ†ν•œ μ‹œμŠ€ν…œ μ—…λ°μ΄νŠΈκ°€ ν•„μš”ν•©λ‹ˆλ‹€' : 'μƒˆλ‘œμš΄ ν”Œλž«νΌ κΈ°λŠ₯이 μ€€λΉ„λ˜μ—ˆμŠ΅λ‹ˆλ‹€'} +

+ + {remoteInfo.latestInfo.type} + +
+

+ ν˜„μž¬: v{currentVersion} β†’ μ°¨κΈ°: {remoteInfo.latest} +

-
+ +
)}