feat(ui): show date-based version in footer #29

Merged
addison merged 3 commits from feat/version-footer into main 2026-08-12 05:34:29 -04:00
Collaborator

Summary

Displays a date-based version string in the app footer, derived from git commit metadata at build time (not wall-clock build time).

Version format: YYYY.M.D+<shortsha> from the last commit, e.g. v2026.8.12+efc2ac5.

Changes

  • justfile: new version variable computed via git log -1 --format='%cs %h' (reformatted to dotted date, falls back to dev when git metadata is unavailable); passed to the Angular build through the existing --define mechanism as APP_VERSION, and to the Go binary via -ldflags -X main.Version.
  • frontend/angular.json: default APP_VERSION define of "dev" so ng serve / tests work without the flag.
  • frontend/src/app/app.ts / app.html / app.css: footer renders v{{ version }} with light, high-contrast styling; degrades gracefully to vdev when the define is absent.
  • frontend/src/app/app.spec.ts: new test asserting the footer version shape.
  • main.go: logs the version at startup.

Verification

  • just build succeeds; 2026.8.12+efc2ac5 confirmed present in the built JS bundle and the Go binary.
  • Frontend unit tests: 50/50 pass.
  • Go tests pass; gofmt/prettier clean (just format).
  • Dev build (ng build --configuration development, no define flag) falls back to dev.
  • e2e tests not run (slow/flaky); unit + build coverage should suffice for this change.
## Summary Displays a date-based version string in the app footer, derived from git commit metadata at build time (not wall-clock build time). **Version format:** `YYYY.M.D+<shortsha>` from the last commit, e.g. `v2026.8.12+efc2ac5`. ## Changes - `justfile`: new `version` variable computed via `git log -1 --format='%cs %h'` (reformatted to dotted date, falls back to `dev` when git metadata is unavailable); passed to the Angular build through the existing `--define` mechanism as `APP_VERSION`, and to the Go binary via `-ldflags -X main.Version`. - `frontend/angular.json`: default `APP_VERSION` define of `"dev"` so `ng serve` / tests work without the flag. - `frontend/src/app/app.ts` / `app.html` / `app.css`: footer renders `v{{ version }}` with light, high-contrast styling; degrades gracefully to `vdev` when the define is absent. - `frontend/src/app/app.spec.ts`: new test asserting the footer version shape. - `main.go`: logs the version at startup. ## Verification - `just build` succeeds; `2026.8.12+efc2ac5` confirmed present in the built JS bundle and the Go binary. - Frontend unit tests: 50/50 pass. - Go tests pass; `gofmt`/`prettier` clean (`just format`). - Dev build (`ng build --configuration development`, no define flag) falls back to `dev`. - e2e tests not run (slow/flaky); unit + build coverage should suffice for this change.
feat(ui): show date-based version in footer
Some checks failed
PR Validation / validate (pull_request) Has been cancelled
f391d4d41b
Derive a version string (commit date + short sha, e.g. 2026.8.12+efc2ac5)
from the last commit at build time in the justfile and inject it into the
Angular bundle via the existing --define mechanism (APP_VERSION), matching
the AMP_ORB pattern. The footer renders it as v<version>, falling back to
"dev" when the define is absent. The Go binary also receives the version
via -ldflags -X main.Version and logs it at startup.

Co-authored-by: Shelley <[email protected]>
fix(ui): hide dev version in footer
Some checks failed
PR Validation / validate (pull_request) Has been cancelled
4c1d49935a
The footer showed "vdev" when APP_VERSION was unavailable (dev builds),
which read as confusing noise. The component now exposes an empty version
for the dev fallback and the template renders the version span only when
a real build version is present.

Co-authored-by: Shelley <[email protected]>
Merge branch 'main' into feat/version-footer
Some checks failed
PR Validation / validate (pull_request) Failing after 4m29s
18d3bb64a7
addison deleted branch feat/version-footer 2026-08-12 05:34:30 -04:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
kwila/tournaments!29
No description provided.