feat(ui): show build commit id in side nav footer - #272
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 viagit rev-parse --short HEADat build time and expose it as adefineconstant__UI_COMMIT__. Falls back to"dev"outside a git checkout (e.g. release tarballs).vite-env.d.ts: declare the__UI_COMMIT__global fortsc.Shell.tsx: renderui <commit>in the footer, read defensively (__UI_COMMIT__is undefined under Vitest, which does not apply Vitedefine). Dropped the now-unuseduseConnectionHealth()call inSidebar.The
loopback onlynote was removed as redundant — the App banner already states the loopback-only / SSH-tunnel caveat.Test plan
npm run typecheckpassesnpm test— all 219 tests pass