Settings → Updates: committed version + always-enabled check¶
Motivation¶
Two papercuts in the Settings → Updates section:
- Current version showed only the backend release version (
vA.B.0fromupgrade.status.running_version), while the app header/footer stamp shows the full committed build version (vA.B.<build> · <sha>). The two surfaces disagreed, and the release-only string looked stale next to the footer. - The Check now button was disabled whenever the persisted upgrade-state
row had no
git_remote. But the row'sgit_remoteis only populated after a discovery check runs (check_latest_inline→_set_latest/_clear_latest), so a freshly deployed control plane withUPGRADE_GIT_REMOTEset could not trigger its first check from this surface — a chicken-and-egg lockout.
User-facing change¶
- Current version now renders the committed build version using the same
build-time constants as the header/footer stamp:
v<release>.<buildNumber> · <commit>(via the existing localformatBuildVersionhelper and__APP_VERSION__/__APP_BUILD_NUMBER__/__APP_COMMIT__). The hint shows the release version (Release vA.B.0) for reference. This row no longer waits on the/upgrade/statuspoll to paint. - Check now is enabled regardless of whether a git remote has been recorded
(only disabled while a check is already in flight). The
/api/upgrade/checkcall is throttled (429) and safe with no remote — it simply clears the latest fields and updateslatest_checked_at. - When a check runs and the refreshed status still has no
git_remote, the result message reads "No upgrade remote is configured — nothing to check." instead of a misleading "Checked just now." The persistent "No upgrade remote is configured" info line is unchanged.
API / IaC diff summary¶
- No backend or IaC change. Reuses the existing
upgradeApi.status()/upgradeApi.check()typed clients and the build-time version constants. - Frontend only —
web/src/components/SettingsPanel.tsx: UpdatesSection"Current version" row now shows the build/commit version.- "Check now" button
disableddrops the!configuredterm. handleChecktailors the result message based on the refreshedgit_remote.
Validation evidence¶
cd web && npm run build— succeeds.cd web && npm test -- --run— 70 files / 632 tests passing.- No
*.test.*targets the Settings panel directly; no fixture/mocks reference the changed row text.