Skip to content

feat: show version on dashboard - #170

Merged
willnorris merged 3 commits into
tailscale:mainfrom
DAcodedBEAT:version-in-ui
Jul 24, 2026
Merged

feat: show version on dashboard#170
willnorris merged 3 commits into
tailscale:mainfrom
DAcodedBEAT:version-in-ui

Conversation

@DAcodedBEAT

@DAcodedBEAT DAcodedBEAT commented May 13, 2026

Copy link
Copy Markdown
Contributor

Display release version in dashboard footer and includes template optimizations for better reuse.

tested by running go build -o build/tsidp-server-darwin-arm64-$(shell date +%Y-%m-%d)-$(shell git rev-parse --short=5 HEAD) -ldflags "-X github.com/tailscale/tsidp/server.version=v1.2.3" ./tsidp-server.go and going to the app

image image

Closes #157

@DAcodedBEAT
DAcodedBEAT force-pushed the version-in-ui branch 2 times, most recently from c88c566 to 034b3f2 Compare May 27, 2026 03:27
Comment thread server/ui-edit.html Outdated
<h2>
{{if .IsNew}}Add New OIDC Client{{else}}Edit OIDC Client{{end}}
</h2>
<a class="btn btn-secondary" href="/">← Back to Clients</a>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

it looks like your editor is sorting HTML attributes? Would you mind disabling that, or moving these changes to a different commit (on the same PR is fine), so the actual changes related to showing the version are easier to see?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks @willnorris - I've amended the changes so the attributes are in the same order as it was previously

https://github.com/tailscale/tsidp/pull/170/changes?w=1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Sorry I missed it on the first round, but there are also a bunch of whitespace only edits: https://github.com/tailscale/tsidp/pull/170/changes?w=0 most notably, server/ui-header.html which has only whitespace edits. I'm imagining these were auto-applied by your editor?

I can also just clean these up after with a full pass with prettier or something. But in general, please try to make sure your PRs just includes the necessary changes, not all the extra formatting. Unless of course the formatting is the intent of the PR 😄 ... we do that occasionally, just to get everything consistent with a defined style.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

hey @willnorris thanks again for the review - the whitespace changes were editor-generated, but I think it makes sense to keep them in this case.

Since we're already doing a broader pass on the HTML to make it more composable/template-friendly, it felt consistent to include them here rather than separate them out. It seemed cleaner to include them since these files are already being updated.

Happy to adjust if you'd prefer we separate out formatting changes in the future. 👍

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@willnorris / @tailscale I will be offline the next few weeks so let me know if you want these changes in :)

Signed-off-by: Arun Philip <arun@corkinc.com>
Signed-off-by: Arun Philip <arun@corkinc.com>
Display release version in dashboard footer via a new ui-footer.html
template and a GetAppVersion func map entry that resolves to
server.GetVersion.

Also strip the leading "v" from GITHUB_REF_NAME in the release
workflow's --version check so the expected value matches the CLI
output.

Signed-off-by: Arun Philip <arun@corkinc.com>
@willnorris

Copy link
Copy Markdown
Member

okay, I've split your change into three commits:

  • refactor the templates (the bulk of the changes, but effectively a noop for the final rendered page)
  • combine the copy* javascript helper methods into copyValue (also effectively a noop in terms of behavior)
  • add the version to the footer (much, much smaller commit now, and this is the one that really changes things)

The only difference between these three and your original change is that it now preserves the correct <title> value.

This kind of split between refactoring changes that have no change on the final results and those that actually introduce new behavior are MUCH easier to review and see what's changing.

@willnorris
willnorris merged commit 99effa5 into tailscale:main Jul 24, 2026
3 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.

Feature Request: Version number visible on dashboard

2 participants