fix(build-info): ship VERSION in backend image, add dialog blurb + fallback (#958) - #975
Merged
Merged
Conversation
…llback (#958) The Build Info dialog showed "unknown" for every field in local dev because the VERSION file was bind-mounted by docker-compose.yml only — the backend Dockerfile never COPYed it. Prod compose has no such mount, so prod also fell back to "unknown" for `version`. Bake the file into the image directly so both surfaces work without a host mount; dev's `./VERSION:/app/VERSION:ro` bind still overrides for hot edits. Add operator-facing guidance to the dialog so a "wall of unknown" isn't its own UX bug: - `useBuildInfo` exposes `isMissing` — true when every metadata field equals "unknown". - NavBar modal: blurb under the title explaining what Build Info is for; a gray-bg note ("Build metadata not available — rebuild with scripts/deploy/start.sh to populate.") shown only when isMissing. - Settings panel: same fallback message between the error and data states. The existing blurb was kept. Related to #958 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
vybe
approved these changes
Jun 1, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
LGTM — verified VERSION file exists at repo root (0.9.0), the COPY matches the established ../../ build-context pattern, and CI 'build' check passes (Dockerfile compiles). isMissing is correctly singleton-scoped and both consumers unwrap .value properly. Dev bind mount retained for hot edits. Validated via /validate-pr.
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.
Summary
Two problems behind the "every field shows unknown" Build Info dialog:
versionalways unknown on dev/prod. Backend reads version from/app/VERSION, but the file was only present via adocker-compose.ymlbind mount (./VERSION:/app/VERSION:ro). Prod compose has no such mount and the Dockerfile never COPYed the file, soversiondefaulted to "unknown" everywhere except local-dev-with-bind-mount.start.shrun produced a wall of "unknown" rows with no explanation of what Build Info is or how to populate it.Changes
docker/backend/Dockerfile—COPY ../../VERSION /app/VERSIONso the file ships in the image. Dev's bind mount still overrides for hot edits.src/frontend/src/composables/useBuildInfo.js— exposeisMissingcomputed (true when every metadata field equals "unknown").src/frontend/src/components/NavBar.vue(Build Info modal) — short blurb under the title; gray-bg fallback note ("Build metadata not available — rebuild withscripts/deploy/start.shto populate.") shown only whenisMissing.src/frontend/src/views/Settings.vue(Build Info section) — same fallback note in the loading/error/data state chain. Existing blurb retained.Related to #958
Test plan
Verified via Playwright (headless Chromium, route mock for missing state):
/app/VERSIONpresent in image (docker run --rm --entrypoint cat trinity-backend /app/VERSION→0.9.0).GET /api/versionreturns"version": "0.9.0"instead of "unknown".GET /api/versionwith all fields = "unknown" → modal shows fallback note + blurb; Settings panel shows fallback note. Screenshots.isMissingcorrectly false whenversionpopulated but git fields unknown (intentional — partial provenance is still useful, not a "missing metadata" state).🤖 Generated with Claude Code