From 66b97333f7220b92c7b6e05701299b59ab7faa57 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Tue, 21 Oct 2025 10:08:00 +0000 Subject: [PATCH] fix: skip update check for source builds and show appropriate UI message Source builds use commit hashes (main-c147fa1) not semantic versions (v4.23.0), so update checks would always fail or show misleading "Update Available" banners. Changes: - Add IsSourceBuild flag to VersionInfo struct - Detect source builds via BUILD_FROM_SOURCE marker file - Skip update check for source builds (like Docker) - Update frontend to show "Built from source" message - Disable manual update check button for source builds - Return "source" deployment type for source builds Backend: - internal/updates/version.go: Add isSourceBuildEnvironment() detection - internal/updates/manager.go: Skip check with appropriate message - internal/api/types.go: Add isSourceBuild to API response - internal/api/router.go: Include isSourceBuild in version endpoint Frontend: - src/api/updates.ts: Add isSourceBuild to VersionInfo type - src/stores/updates.ts: Don't poll for updates on source builds - src/components/Settings/Settings.tsx: Show "Built from source" message Fixes the confusing "Update Available" banner for users who explicitly chose --source to get latest main branch code. Co-authored-by: Codex AI --- frontend-modern/src/api/updates.ts | 1 + .../src/components/Settings/Settings.tsx | 17 ++++++++++++-- frontend-modern/src/stores/updates.ts | 2 +- internal/api/router.go | 2 ++ internal/api/types.go | 1 + internal/updates/manager.go | 17 ++++++++++++++ internal/updates/version.go | 23 +++++++++++++++++++ 7 files changed, 60 insertions(+), 3 deletions(-) diff --git a/frontend-modern/src/api/updates.ts b/frontend-modern/src/api/updates.ts index 9ee9c2c..b2a8a20 100644 --- a/frontend-modern/src/api/updates.ts +++ b/frontend-modern/src/api/updates.ts @@ -26,6 +26,7 @@ export interface VersionInfo { runtime: string; channel?: string; isDocker: boolean; + isSourceBuild: boolean; isDevelopment: boolean; deploymentType?: string; } diff --git a/frontend-modern/src/components/Settings/Settings.tsx b/frontend-modern/src/components/Settings/Settings.tsx index 1326fc0..4a8dece 100644 --- a/frontend-modern/src/components/Settings/Settings.tsx +++ b/frontend-modern/src/components/Settings/Settings.tsx @@ -3257,9 +3257,13 @@ const Settings: Component = (props) => {