Skip to content

Show server build info on settings page - #685

Merged
bgentry merged 3 commits into
riverqueue:masterfrom
edwardsb:build-info-settings
Sep 27, 2026
Merged

bgentry merged 3 commits into
riverqueue:masterfrom
edwardsb:build-info-settings

Conversation

@edwardsb

@edwardsb edwardsb commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

I couldn't tell which version of River UI I was running, and couldn't remember the last time I'd upgraded, so I added a Build info section to the settings page showing the running binary's version, commit, commit date, and Go version.

The data comes from a new GET /api/version endpoint backed by runtime/debug.ReadBuildInfo, with -ldflags -X overrides so Docker builds made from a partial source copy still report real metadata (the release workflow now computes and passes BUILD_VERSION, BUILD_REVISION, and BUILD_COMMIT_TIME as build args). When River UI is embedded, the section notes the info describes the host application.

Includes endpoint + component coverage following the existing features test patterns.

Build info section on the settings page

Couldn't tell which version of River UI was running or when it was last upgraded.

Add a Build info section to the settings page backed by a new GET /api/version endpoint using runtime/debug.ReadBuildInfo, with -ldflags -X overrides so Docker builds report real metadata.
@brandur

brandur commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator

@edwardsb Thanks!

@bgentry This seems like kind of a good idea. Thoughts on general feature direction?

@bgentry bgentry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes I think this makes sense! I'm going to push a few fixes on top of this real quick before we merge.

Pro builds from this checkout currently resolve the previous River UI
release, so they omit the new version endpoint and embedded UI assets.

Replace that dependency with the local module during development. The
separate Pro release can remove the replacement and update the version
pin after River UI is released, following the existing release process.
A long-lived browser tab can show the prior server's version after a
deployment because the build info query stays fresh indefinitely.

Expire that query after five minutes so a later visit or window focus
fetches the running server's version while nearby visits reuse the cache.
@bgentry
bgentry force-pushed the build-info-settings branch from c61e798 to 379e2cf Compare September 27, 2026 21:00
Comment thread src/hooks/use-version.ts Outdated
import { useQuery } from "@tanstack/react-query";

export function useVersion() {
// Build info is immutable for the lifetime of the server process.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI this is a client-side staleness setting, so even if the server gets restarted & updated the client would continue reporting the stale older version. That doesn't seem desirable even if the JS UI might need updating. We don't have an app outdated warning in JS but imo this is still better than caching forever.

@bgentry bgentry left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@edwardsb thank you for this! Can you add yourself to the CLA here and then we'll get it merged? https://github.com/riverqueue/rivercla

@edwardsb

Copy link
Copy Markdown
Contributor Author

@bgentry CLA PR is up: riverqueue/rivercla#35 — thanks!

@bgentry
bgentry merged commit 88a3ddc into riverqueue:master Sep 27, 2026
6 of 17 checks passed
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.

3 participants