Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix(ui): inject root package.json version into client build
Adam Eivyd4d6bed032b7
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdnew file mode 100644index 0000000000..f26cb1f1d2--- /dev/null+++ b/.changelog/NEXT.md@@ -0,0 +1,5 @@+# Unreleased Changes++## Changed++- Inject app version from root package.json at build time via Vite `define`, replacing stale client package.json importdiff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsxindex 1726ce068d..16bc96ad4a 100644--- a/client/src/components/Layout.jsx+++ b/client/src/components/Layout.jsx@@ -58,7 +58,7 @@ import {Shield,Zap} from 'lucide-react';-import packageJson from '../../package.json';+/* global __APP_VERSION__ */import Logo from './Logo';import { useErrorNotifications } from '../hooks/useErrorNotifications';import { useNotifications } from '../hooks/useNotifications';@@ -547,7 +547,7 @@ export default function Layout() {<div className={`p-4 border-t border-port-border ${collapsed ? 'lg:flex lg:justify-center' : ''}`}><div className={`flex items-center ${collapsed ? 'lg:justify-center' : 'justify-between'}`}><span className={`text-sm text-gray-500 ${collapsed ? 'lg:hidden' : ''}`}>- v{packageJson.version}+ v{__APP_VERSION__}</span><div className="flex items-center gap-1"><ThemeSwitcher />diff --git a/client/vite.config.js b/client/vite.config.jsindex a896053ddc..fe1091bfed 100644--- a/client/vite.config.js+++ b/client/vite.config.js@@ -1,5 +1,9 @@import { defineConfig, loadEnv } from 'vite';import react from '@vitejs/plugin-react';+import { readFileSync } from 'fs';+import { resolve } from 'path';++const rootPkg = JSON.parse(readFileSync(resolve(__dirname, '../package.json'), 'utf-8'));export default defineConfig(({ mode }) => {const env = loadEnv(mode, process.cwd(), 'VITE_');@@ -7,6 +11,9 @@ export default defineConfig(({ mode }) => {const API_TARGET = `http://${API_HOST}:5555`;return {+ define: {+ __APP_VERSION__: JSON.stringify(rootPkg.version)+ },plugins: [react()],server: {host: '0.0.0.0',