Skip to content

Add app version in footer#486

Merged
kdid merged 2 commits into
deploy/stagingfrom
version-footer
Jun 16, 2026
Merged

Add app version in footer#486
kdid merged 2 commits into
deploy/stagingfrom
version-footer

Conversation

@kdid

@kdid kdid commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

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

  • Production: displays the version as a link to the GitHub release tag (e.g. v3.1.4 -> github.com/nulib/dc-nextjs/releases/tag/v3.1.4)
  • Staging: displays the version as plain text with the short commit SHA linking to the commit on GitHub (e.g. v3.1.4 (staging abc1234))
  • Dev: displays the version as plain text with the short commit SHA if available (e.g. v3.1.4 (DEV abc1234))
  • Version is read from package.json; environment is read from the existing HONEYBADGER_ENV and HONEYBADGER_REVISION env vars already exposed via next.config.js
Screenshot 2026-06-16 at 9 09 01 AM

@kdid kdid self-assigned this Jun 16, 2026
@kdid kdid force-pushed the version-footer branch from 9fcc112 to 2957d5a Compare June 16, 2026 16:15
@kdid kdid changed the title Add version in footer Add app version in footer Jun 16, 2026

@bmquinn bmquinn 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.

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>

@bmquinn bmquinn 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.

Looks great 👍

@kdid kdid merged commit 7a90371 into deploy/staging Jun 16, 2026
3 checks passed
@kdid kdid deleted the version-footer branch June 16, 2026 17:07
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.

2 participants