Skip to content

Show build version and commit in the UI and startup log - #1050

Closed
notlakshitha wants to merge 1 commit into
HelpCode-ai:mainfrom
notlakshitha:cursor/show-build-version-988d
Closed

notlakshitha wants to merge 1 commit into
HelpCode-ai:mainfrom
notlakshitha:cursor/show-build-version-988d

Conversation

@notlakshitha

Copy link
Copy Markdown

Summary

Signed-in users can see which build they are running. Bug reports start with that question, and until now neither the UI nor the backend startup log could answer it. Inside the container npm_package_version is unset, so OpenTelemetry was reporting service.version 0.0.0.

Version, commit and build date now come from one helper. Self-hosted and Cloud both show them. A local image build has no commit, so it shows dev. Cloud runs the published image, which records the commit and build date. GET /api/version requires a JWT. The public /health/server-info route is unchanged, so an unauthenticated probe still cannot fingerprint the build.

Tracks upstream #1000. This pull request stays on the fork.

Changes

  • Move readAppVersion() to packages/backend/src/common/app-version.ts and export APP_VERSION, APP_COMMIT (APP_COMMIT, then SENTRY_RELEASE, else dev) and APP_BUILD_DATE.
  • Log AnythingMCP v0.24.0 (commit 3bd9f8b, built 2026-10-04, mode self-hosted) on startup. A 40-character SHA is shortened to seven characters in the log; the API keeps the full value.
  • Add GET /api/version behind AuthGuard('jwt'), returning { version, commit, buildDate, deploymentMode }.
  • Pass APP_COMMIT and APP_BUILD_DATE into the runner image, and set the OCI revision and version labels. The publish workflow fills both build args. APP_BUILD_DATE uses the timestamp the metadata action already computed, because workflow_dispatch has no head_commit.
  • Footer (signed-in, one fetch per session) shows v0.24.0 · 3bd9f8b. A full SHA links to the commit; dev is plain text. A failed fetch is not cached.
  • Settings → Administration has an "About this instance" card with "Copy version info", using the existing clipboard fallback. A failed fetch says "Version info unavailable".
  • Sentry release and OpenTelemetry service.version fall back to APP_VERSION. docs/deployment.md and docs/operations/observability.md describe the build args and that default.

Type

  • New feature
  • Documentation

Testing

  • Added/updated unit tests
  • Tested manually (no Docker in this environment, so the image build args were not exercised end to end)

Commands, from the repository root unless noted:

  • cd packages/backend && npx jest src/common/app-version.spec.ts src/health/version.controller.spec.ts --no-coverage — 2 suites, 16 tests, passed.
  • cd packages/backend && npx tsc --noEmit -p tsconfig.json — passed.
  • cd packages/backend && npm run lint — passed, 11 pre-existing warnings, none in these files. eslint --fix also rewrote two unrelated specs (it dropped existing eslint-disable comments); those edits were reverted.
  • cd packages/backend && npm test — 532 passed, 4 skipped, 13168 tests passed. No database was available; the suite still exited 0.
  • cd packages/frontend && npx tsc --noEmit -p tsconfig.json — passed.
  • cd packages/frontend && npm run lint — passed, 26 pre-existing warnings, none in these files.

Checklist

  • My code follows the existing code style
  • I have tested my changes locally
  • I have updated documentation (if applicable)
  • All existing tests pass (npm test)
  • This PR has a descriptive title

Related Issues

Tracks #1000

Open in Web Open in Cursor 

Signed-in users can answer which build they are running. One helper
reads the package version, the image commit and the build date. The
startup log, the footer and Settings → Administration all use it.
The public health route is unchanged.

Refs HelpCode-ai#1000

Co-authored-by: Lakshitha Deshan (ReadY) <notlakshitha@gmail.com>
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@notlakshitha

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@helpcodeai

Copy link
Copy Markdown
Contributor

Thanks @notlakshitha, but this one overlaps almost file for file with #1023, which @Furox-Art opened first for #1000 and is already through two review rounds, so I'm closing it as a duplicate. If you want something to pick up, #1049 is yours now (the env var docs you found), and there are open ones under the hacktoberfest label like #1008 or #1010. Please comment on the issue before you start so we don't end up with two PRs for the same thing again.

@helpcodeai helpcodeai closed this Oct 12, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants