Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

UN-2265 [FEAT] Show the running platform version on the profile page (#2034)

Athul076fd6f93da3
diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml
index 0ece7bb43..aa36cbf96 100644
--- a/docker/docker-compose.yaml
+++ b/docker/docker-compose.yaml
@@ -144,6 +144,10 @@ services:
- reverse-proxy
environment:
- ENVIRONMENT=development
+ # Running platform version, surfaced on the profile page. Reuses the same
+ # ${VERSION} that tags the image, so it always matches what's deployed
+ # (and updates on RC->stable promotion, which only retags — doesn't rebuild).
+ - UNSTRACT_APPS_VERSION=${VERSION}
labels:
- traefik.enable=true
- traefik.http.routers.frontend.rule=Host(`frontend.unstract.localhost`) && !PathPrefix(`/api/v1`) && !PathPrefix(`/deployment`) && !PathPrefix(`/public`)
diff --git a/frontend/generate-runtime-config.sh b/frontend/generate-runtime-config.sh
index 12d5f1442..51dba1426 100755
--- a/frontend/generate-runtime-config.sh
+++ b/frontend/generate-runtime-config.sh
@@ -5,12 +5,21 @@
# Generate the runtime-config.js file with the current environment variables
# Note: Using VITE_ prefix for Vite compatibility, fallback to REACT_APP_ for backward compatibility
+
+# Escape backslashes and double quotes so values stay valid inside JS strings
+js_escape() {
+ printf '%s' "$1" | sed -e 's/\\/\\\\/g' -e 's/"/\\"/g'
+}
+
+APP_VERSION=$(js_escape "${UNSTRACT_APPS_VERSION:-}")
+
cat > /usr/share/nginx/html/config/runtime-config.js << EOF
// This file is auto-generated at runtime. Do not modify manually.
window.RUNTIME_CONFIG = {
faviconPath: "${VITE_FAVICON_PATH:-${REACT_APP_FAVICON_PATH}}",
logoUrl: "${VITE_CUSTOM_LOGO_URL:-${REACT_APP_CUSTOM_LOGO_URL}}",
- enablePosthog: "${VITE_ENABLE_POSTHOG:-${REACT_APP_ENABLE_POSTHOG}}"
+ enablePosthog: "${VITE_ENABLE_POSTHOG:-${REACT_APP_ENABLE_POSTHOG}}",
+ version: "${APP_VERSION}"
};
EOF
diff --git a/frontend/src/components/profile/Profile.jsx b/frontend/src/components/profile/Profile.jsx
index 899110c77..aedf755e4 100644
--- a/frontend/src/components/profile/Profile.jsx
+++ b/frontend/src/components/profile/Profile.jsx
@@ -11,6 +11,7 @@ import { useNavigate } from "react-router-dom";
import "./Profile.css";
import { OrganizationIcon } from "../../assets";
+import config from "../../config";
import { useAxiosPrivate } from "../../hooks/useAxiosPrivate";
import { useAlertStore } from "../../store/alert-store.js";
import { useSessionStore } from "../../store/session-store.js";
@@ -234,6 +235,18 @@ function Profile() {
</Typography.Text>
</div>
)}
+ {config.version && (
+ <div className="field-group">
+ <Typography.Text type="secondary" className="field-label">
+ Platform Version
+ </Typography.Text>
+ <div className="field-box">
+ <Typography.Text className="field-value">
+ {config.version}
+ </Typography.Text>
+ </div>
+ </div>
+ )}
</Space>
</Card>
</Col>
diff --git a/frontend/src/config.js b/frontend/src/config.js
index c3c79d417..1f1abc3bf 100644
--- a/frontend/src/config.js
+++ b/frontend/src/config.js
@@ -17,6 +17,7 @@ const config = {
import.meta.env.VITE_FAVICON_PATH ||
"/favicon.ico",
logoUrl: runtimeConfig.logoUrl || import.meta.env.VITE_CUSTOM_LOGO_URL,
+ version: runtimeConfig.version || import.meta.env.VITE_VERSION,
// Add more values as OR case, if needed for fallback.
};