Skip to content

feat(ui): display running version in footer (fixes #629)#1358

Open
fl-sean03 wants to merge 3 commits intokagent-dev:mainfrom
fl-sean03:fix/629-version-display
Open

feat(ui): display running version in footer (fixes #629)#1358
fl-sean03 wants to merge 3 commits intokagent-dev:mainfrom
fl-sean03:fix/629-version-display

Conversation

@fl-sean03
Copy link
Contributor

Summary

  • Display the kagent version in the UI footer next to the kagent logo
  • Version is sourced from NEXT_PUBLIC_KAGENT_VERSION env var, set at Docker build time from the existing VERSION build arg
  • Runtime fallback: if the env var isn't set (e.g. local dev), the footer fetches from the /version backend endpoint
  • Added nginx proxy rule for /version so the endpoint is accessible from the browser in production

How 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 fallback
  • ui/Dockerfile — Pass VERSION build arg as NEXT_PUBLIC_KAGENT_VERSION for Next.js
  • ui/conf/nginx.conf — Proxy /version to backend for runtime access

Test plan

  • npm run build passes
  • Verify version displays correctly with NEXT_PUBLIC_KAGENT_VERSION=0.5.5 npm run dev
  • Verify fallback works when env var is not set but backend is running
  • Verify graceful degradation when neither source is available

Fixes #629

Copilot AI review requested due to automatic review settings February 21, 2026 18:26
@fl-sean03 fl-sean03 requested a review from peterj as a code owner February 21, 2026 18:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, /version fetch fallback).
  • Pass the existing Docker build arg VERSION into Next.js as NEXT_PUBLIC_KAGENT_VERSION.
  • Add an nginx proxy rule to expose /version from 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.

Comment on lines 28 to 30
<p>
{version ? `v${version} · ` : ""}is an open source project
</p>
Copy link

Copilot AI Feb 21, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copilot uses AI. Check for mistakes.
@fl-sean03
Copy link
Contributor Author

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.

@EItanya
Copy link
Contributor

EItanya commented Feb 25, 2026

Please post a screenshot or video with your UI changes

@fl-sean03
Copy link
Contributor Author

Visual Demo: Version Footer

Screenshots showing the version information footer:

1. Full Page with Version Footer

page-with-footer

2. Footer Close-up

footer-closeup

The 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.

@fl-sean03
Copy link
Contributor Author

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 Footer

The footer now displays the running kagent version. Format: "v0.8.2 · is an open source project" with the kagent logo.

Page with Version Footer

2. Footer Close-up

Close-up of the footer showing the version display clearly.

Footer Closeup

@fl-sean03
Copy link
Contributor Author

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.

@fl-sean03
Copy link
Contributor Author

Updated Screenshots: Version Display in Footer

Fresh screenshots from a running kagent UI dev instance (Next.js 16) with NEXT_PUBLIC_KAGENT_VERSION=0.5.2 and mock /version endpoint.

1. Full Page with Version Footer

The footer now shows the running version: "v0.5.2 · is an open source project" alongside the kagent logo.

Version Footer

2. Footer Close-up

Zoomed view of the footer showing the version string format: v{version} · is an open source project.

Footer Close-up

Version sources (two-tier fallback):

  1. Build-time: NEXT_PUBLIC_KAGENT_VERSION env var (set via Docker build arg)
  2. Runtime: Fetches from /version endpoint (proxied via nginx)

If neither is available, the footer gracefully falls back to just "is an open source project" (no version shown).

@fl-sean03 fl-sean03 force-pushed the fix/629-version-display branch from 0a51e9c to 2876a3b Compare February 27, 2026 18:51
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>
@fl-sean03 fl-sean03 force-pushed the fix/629-version-display branch from 810653e to e5f1528 Compare February 27, 2026 20:06
@fl-sean03
Copy link
Contributor Author

Rebased against main to retrigger CI. The previous sqlite e2e failure was a flaky TestE2EInvokeSTSIntegration/sync_invocation — the MCP session creation timed out with Failed to create MCP session: unhandled errors in a TaskGroup. This test passed on the same commit in the postgres e2e run and also passed on the prior sqlite e2e run. Unrelated to the version footer changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Display running version in UI

4 participants