Skip to content

Show app version in settings popover#145

Merged
jasonmadigan merged 7 commits into
mainfrom
144-show-version
Jul 18, 2026
Merged

Show app version in settings popover#145
jasonmadigan merged 7 commits into
mainfrom
144-show-version

Conversation

@jasonmadigan

@jasonmadigan jasonmadigan commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Self-hosters could not tell which release they were running (Show version somewhere on self-hosted variants #144). The release workflow now bakes the tag into the image as APP_VERSION, the backend serves it at GET /api/version, and the settings popover shows it. Local runs fall back to dev; dev images report dev-<sha> matching their image tag.
  • SHOW_APP_VERSION=false turns it off
  • The release workflow now smoke-tests the baked version against the release tag on a single-arch build before the multi-arch push, so a wrong version cannot ship silently. Empty env vars (SHOW_APP_VERSION=, MAX_UPLOAD_MB=) no longer crash Settings at boot.

Test evidence

Backend pytest 260 passed, frontend vitest 95 passed, make lint clean. Live-verified with uvicorn and a real browser: /api/version returns the env value, 404 when disabled, popover shows "Version 0.7.0-preview", line hidden when disabled.

Closes #144

Bake APP_VERSION into the Docker image (release tag for releases,
dev-<sha> for dev builds, dev locally) and expose it via GET
/api/version.

Signed-off-by: Jason Madigan <[email protected]>
Fetched from /api/version on first open, hidden if the request
fails.

Signed-off-by: Jason Madigan <[email protected]>
Fail the release build if the pushed image does not report the
release tag, catching a dropped build-arg or non-semver tag.

Signed-off-by: Jason Madigan <[email protected]>
Check the Settings default with APP_VERSION unset rather than via
the import-time singleton, and use the fixture style of
neighbouring route tests.

Signed-off-by: Jason Madigan <[email protected]>
Defaults on. When false, /api/version returns 404 (so the settings
popover shows nothing) and the OpenAPI version is a neutral
placeholder, disclosing nothing.

Signed-off-by: Jason Madigan <[email protected]>
Build a single-arch image with load, check the baked APP_VERSION
against the release tag with a literal compare that logs both
values, and only then run the multi-arch push. Stops a bad version
reaching the public tags.

Signed-off-by: Jason Madigan <[email protected]>
An empty value (docker run -e SHOW_APP_VERSION=) crashed settings
validation at import; fall back to defaults instead. Tests build
fresh Settings without the dotenv file and restore reloaded modules
even if the reload itself fails.

Signed-off-by: Jason Madigan <[email protected]>
@jasonmadigan
jasonmadigan merged commit a56a841 into main Jul 18, 2026
3 checks passed
@jasonmadigan
jasonmadigan deleted the 144-show-version branch July 18, 2026 21:00
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.

Show version somewhere on self-hosted variants

1 participant