diff --git a/flake.nix b/flake.nix index caf8a4ce..57d760cb 100644 --- a/flake.nix +++ b/flake.nix @@ -60,6 +60,9 @@ bun install 2>&1 echo "=== bun run build (next build --webpack) ===" + # Inline the git SHA into the client bundle so the dashboard header + # shows "v0.5.86 ()" — traceable build identity in the UI. + export NEXT_PUBLIC_GIT_SHA="${rev}" bun run build 2>&1 echo "=== Build complete ===" diff --git a/src/app/(dashboard)/dashboard/profile/page.js b/src/app/(dashboard)/dashboard/profile/page.js index 3628eb4c..ce1cd567 100644 --- a/src/app/(dashboard)/dashboard/profile/page.js +++ b/src/app/(dashboard)/dashboard/profile/page.js @@ -1685,15 +1685,15 @@ export default function ProfilePage() { {/* App Info */}
-

{APP_CONFIG.name} v{APP_CONFIG.version}

+

{APP_CONFIG.name} v{APP_CONFIG.version}{APP_CONFIG.gitSha ? ` (${APP_CONFIG.gitSha})` : ""}

{isRemoteHost ? "Remote Mode" : "Local Mode - All data stored on your machine"}

- MIBP Edition + asepharyana/9router · MIBP merge
diff --git a/src/shared/components/Sidebar.js b/src/shared/components/Sidebar.js index 1b7bbe96..8a935235 100644 --- a/src/shared/components/Sidebar.js +++ b/src/shared/components/Sidebar.js @@ -128,7 +128,7 @@ export default function Sidebar({ onClose }) {

{APP_CONFIG.name}

- v{APP_CONFIG.version} + v{APP_CONFIG.version}{APP_CONFIG.gitSha ? ` (${APP_CONFIG.gitSha})` : ""} {updateInfo && ( diff --git a/src/shared/constants/config.js b/src/shared/constants/config.js index 0650d086..48ab77dd 100644 --- a/src/shared/constants/config.js +++ b/src/shared/constants/config.js @@ -5,6 +5,10 @@ export const APP_CONFIG = { name: "9Router Proxy", description: "AI Infrastructure Management", version: pkg.version, + // Build identity = git short SHA, injected at build time by the Nix flake + // (NEXT_PUBLIC_GIT_SHA). Falls back to "dirty"/undefined in dev where the + // env var is absent, so the dashboard shows just the semver. + gitSha: process.env.NEXT_PUBLIC_GIT_SHA || null, }; // GitHub configuration