Skip to content

feat(ui): show build commit id in side nav footer - #272

Merged
zheli merged 4 commits into
mainfrom
version-at-ui-bottom
Jul 12, 2026
Merged

feat(ui): show build commit id in side nav footer#272
zheli merged 4 commits into
mainfrom
version-at-ui-bottom

Conversation

@zheli

@zheli zheli commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

What

Replaces the non-actionable side nav footer text (loopback only / schema v1) with the short git commit the UI bundle was built from. When people share screenshots we can now tell which UI commit they're on.

How

  • vite.config.ts: compute short commit via git rev-parse --short HEAD at build time and expose it as a define constant __UI_COMMIT__. Falls back to "dev" outside a git checkout (e.g. release tarballs).
  • vite-env.d.ts: declare the __UI_COMMIT__ global for tsc.
  • Shell.tsx: render ui <commit> in the footer, read defensively (__UI_COMMIT__ is undefined under Vitest, which does not apply Vite define). Dropped the now-unused useConnectionHealth() call in Sidebar.

The loopback only note was removed as redundant — the App banner already states the loopback-only / SSH-tunnel caveat.

Test plan

  • npm run typecheck passes
  • npm test — all 219 tests pass

zheli added 4 commits July 12, 2026 18:57
Replace the non-actionable "loopback only" / "schema v1" footer text
with the short git commit the UI bundle was built from, so screenshots
reveal which UI commit a user is on. Injected via a Vite `define`
constant sourced from `git rev-parse --short HEAD` at build time,
falling back to "dev" outside a git checkout.
The schema version still guards the stale-tab-after-upgrade case, so
show it in the side nav footer next to the UI build commit id.
Render the build commit id as a link to
github.com/bitdynamics-ab/canton-devkit/commit/<sha>. The "dev"
fallback (no git checkout / Vitest) stays plain text since there's no
commit to point at.
@zheli
zheli merged commit f2f6dbe into main Jul 12, 2026
22 checks passed
@zheli
zheli deleted the version-at-ui-bottom branch July 12, 2026 17:15
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.

1 participant