feat(ui): display running version in footer (fixes #629)#1358
feat(ui): display running version in footer (fixes #629)#1358fl-sean03 wants to merge 3 commits intokagent-dev:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds the running kagent version to the UI footer, primarily sourced from a build-time NEXT_PUBLIC_KAGENT_VERSION env var with a runtime /version endpoint fallback (made browser-accessible via nginx).
Changes:
- Update the footer to display a version string (env var first,
/versionfetch fallback). - Pass the existing Docker build arg
VERSIONinto Next.js asNEXT_PUBLIC_KAGENT_VERSION. - Add an nginx proxy rule to expose
/versionfrom the backend to the browser.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| ui/src/components/Footer.tsx | Adds client-side version display logic with env var + /version fetch fallback. |
| ui/conf/nginx.conf | Proxies /version to the backend so the browser can fetch it in production. |
| ui/Dockerfile | Exposes VERSION to the Next build as NEXT_PUBLIC_KAGENT_VERSION. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <p> | ||
| {version ? `v${version} · ` : ""}is an open source project | ||
| </p> |
There was a problem hiding this comment.
The footer prepends v to the version string, but both the Docker build arg VERSION (used for NEXT_PUBLIC_KAGENT_VERSION) and the backend /version response typically already include the leading v (e.g. v0.5.5). This will render as vv0.5.5 in those cases. Consider normalizing instead (e.g. display version as-is, or only add the v prefix when it’s missing).
|
Closing in favor of a new PR from the opspawn account — CI workflow runs weren't triggering for first-time contributors on this account. Same code, just different contributor account with CI approval. |
|
Please post a screenshot or video with your UI changes |
Visual Demo: Version FooterScreenshots showing the version information footer: 1. Full Page with Version Footer2. Footer Close-upThe version footer displays at the bottom of the page, showing the current kagent version. It uses a subtle, non-intrusive design that doesn't interfere with the main UI content. |
Visual Proof: Version Display in Footer (PR #1358)Screenshots captured from a running kagent UI dev instance showing the version number in the footer. 1. Page with Version in FooterThe footer now displays the running kagent version. Format: "v0.8.2 · is an open source project" with the kagent logo. 2. Footer Close-upClose-up of the footer showing the version display clearly. |
|
Update: keeping this PR open — the planned opspawn duplicate was not needed as CI is running correctly on this account. This PR is the active submission. |
Updated Screenshots: Version Display in FooterFresh screenshots from a running kagent UI dev instance (Next.js 16) with 1. Full Page with Version FooterThe footer now shows the running version: "v0.5.2 · is an open source project" alongside the kagent logo. 2. Footer Close-upZoomed view of the footer showing the version string format: Version sources (two-tier fallback):
If neither is available, the footer gracefully falls back to just "is an open source project" (no version shown). |
0a51e9c to
2876a3b
Compare
Show the kagent version in the UI footer next to the logo. The version is sourced from the NEXT_PUBLIC_KAGENT_VERSION environment variable which is set at build time from the VERSION build arg. As a runtime fallback, the footer fetches from the /version backend endpoint. Also adds an nginx proxy rule for the /version endpoint so it is accessible from the browser in production. Fixes kagent-dev#629 Signed-off-by: fl-sean03 <sean@opspawn.com> Signed-off-by: fl-sean03 <jmhbh@users.noreply.github.com>
The VERSION build arg and /version endpoint may already include a 'v' prefix, which caused the footer to display 'vv0.1.0'. Strip any leading 'v' before prepending it in the display template. Signed-off-by: Sean <sean@opspawn.com> Signed-off-by: fl-sean03 <jmhbh@users.noreply.github.com>
…rror) Signed-off-by: fl-sean03 <jmhbh@users.noreply.github.com>
810653e to
e5f1528
Compare
|
Rebased against main to retrigger CI. The previous sqlite e2e failure was a flaky |






Summary
NEXT_PUBLIC_KAGENT_VERSIONenv var, set at Docker build time from the existingVERSIONbuild arg/versionbackend endpoint/versionso the endpoint is accessible from the browser in productionHow it looks
The footer now shows:
v0.5.5 · is an open source project(with the kagent logo)When version is not available (e.g. local dev without env var and no backend), it gracefully falls back to the original text.
Changes
ui/src/components/Footer.tsx— Added version display with env var + API fallbackui/Dockerfile— PassVERSIONbuild arg asNEXT_PUBLIC_KAGENT_VERSIONfor Next.jsui/conf/nginx.conf— Proxy/versionto backend for runtime accessTest plan
npm run buildpassesNEXT_PUBLIC_KAGENT_VERSION=0.5.5 npm run devFixes #629