Add app version in footer#486
Merged
Merged
Conversation
bmquinn
reviewed
Jun 16, 2026
bmquinn
left a comment
Contributor
There was a problem hiding this comment.
Could we move the env logic into a small app-level helper like lib/build-info.ts with a getBuildInfo() function? The helper could normalize the deployment cases: production gets a release tag link, staging gets the version plus linked short SHA, and every other env gets a non-production label plus the short SHA when available.
That would keep the Honeybadger-specific env names out of the footer and let the component render from the helper instead of deciding the behavior itself. Something like this maybe?
const buildInfo = getBuildInfo();
<FooterVersion as={buildInfo.href ? "a" : "span"} href={buildInfo.href}>
{buildInfo.label}
{buildInfo.sha && buildInfo.shaHref && (
<>
{" "}
(<a href={buildInfo.shaHref}>{buildInfo.sha}</a>)
</>
)}
</FooterVersion>
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
Adds a version indicator to the site footer, similar to how Meadow displays its version. The display very unobtrusive and is environment-aware to avoid showing links to releases that don't exist yet.
Changes
v3.1.4->github.com/nulib/dc-nextjs/releases/tag/v3.1.4)v3.1.4 (staging abc1234))v3.1.4 (DEV abc1234))package.json; environment is read from the existingHONEYBADGER_ENVandHONEYBADGER_REVISIONenv vars already exposed vianext.config.js