Skip to content

feat: show build version and git commit in UI and startup log - #1177

Merged
helpcodeai merged 5 commits into
HelpCode-ai:mainfrom
Furox-Art:feat/version-display
Oct 21, 2026
Merged

helpcodeai merged 5 commits into
HelpCode-ai:mainfrom
Furox-Art:feat/version-display

Conversation

@Furox-Art

Copy link
Copy Markdown
Contributor

Re-opens #1023, which was closed when its head branch was lost during a fork cleanup. This branch carries the exact same commits (head 324f185), with your approval and green CI from the final review round intact.

What this does

  • Shows the build version and git commit in the UI footer, served by a new version endpoint (cached per session, full SHA linked to the commit on GitHub)
  • Adds an "About this instance" card with a copy-version-info button under Settings → Administration
  • Logs version, commit and build date at startup
  • Passes APP_VERSION, APP_COMMIT and APP_BUILD_DATE through the Docker build/publish workflow
  • Docs: build provenance section in deployment.md, service identity row in observability.md

Local verification on 324f185

  • npm ci — pass
  • Frontend typecheck, lint (0 errors, pre-existing warnings) and production build — pass
  • Backend Prisma client generation and Nest production build — pass
  • app-version.spec.ts — 6 tests pass

Thanks @helpcodeai — sorry for the churn on the branch.

Furox-Art and others added 4 commits October 11, 2026 15:40
Closes HelpCode-ai#1000

- packages/backend/src/common/app-version.ts: single source of truth
  exporting APP_VERSION, APP_COMMIT (APP_COMMIT || SENTRY_RELEASE || dev)
  and APP_BUILD_DATE (APP_BUILD_DATE || null), moving readAppVersion()
  out of mcp-endpoint.controller.ts
- packages/backend/src/tracing.ts + instrument.ts: use APP_VERSION as the
  service.version / Sentry release fallback instead of npm_package_version
- packages/backend/src/main.ts: log version, commit, build date and mode
  at startup
- packages/backend/src/health/version.controller.ts: new GET /api/version
  behind AuthGuard('jwt') returning { version, commit, buildDate,
  deploymentMode }; registered in health.module.ts
- packages/frontend/src/components/footer.tsx: show v{version} for
  signed-in users, with full version+commit in the tooltip
- Dockerfile: APP_COMMIT and APP_BUILD_DATE build args to ENV, plus
  org.opencontainers.image.revision and .version OCI labels
- app-version.spec.ts: unit tests for env precedence and dev fallback
- docs: deployment.md documents the build args; observability.md notes
  the service.version source change
- admin/page.tsx: import versionApi (TS2304 at line 68)
- admin/page.tsx: use copyText from @/lib/clipboard for the Copy button
  (navigator.clipboard is undefined on plain-HTTP origins); show
  "Version info unavailable" when the fetch fails
- docker-publish.yml: APP_BUILD_DATE from steps.meta labels instead of
  github.event.head_commit.timestamp (empty on workflow_dispatch)
- observability.md: OTEL_SERVICE_VERSION default is APP_VERSION from
  package.json; sentence stays below the table
- deployment.md: Build provenance is a ### subsection under Production
  Deployment (after "With Docker (Manual)"); use git rev-parse HEAD
  (40-char SHA) instead of --short HEAD so the footer link works
- footer.tsx: reset versionPromise on failed fetch so a mid-session
  token expiry doesn't hide the version until page reload
@helpcodeai
helpcodeai enabled auto-merge (squash) October 21, 2026 09:50
@helpcodeai
helpcodeai merged commit e64a9de into HelpCode-ai:main Oct 21, 2026
14 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 21, 2026
@helpcodeai

Copy link
Copy Markdown
Contributor

Merged, thanks @Furox-Art! It goes out with the next release, and after that every instance shows its version and commit in the footer and on the admin page. Thanks for seeing #1000 through.

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.

2 participants