feat: surface app version in dashboard header and group roles on hover #48
No reviewers
Labels
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
brooktrails/pr-reviewer!48
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/dashboard-version-header"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two related header tweaks:
from server config. The layout renders it as a small muted "v0.19.2"
next to the "pr-reviewer" title — same number that's stamped into
every PR comment header, so operators have one less source of
ambiguity about which build they're staring at.
it to attach a tooltip to the username ("Roles: admins, viewers"),
marking the span with a dotted underline + help cursor so it's
clear the username is hoverable. Skipped silently when the session
has no groups (e.g. a user not in any tracked group).
A small commaJoin template helper does the joining; renderAuthError
now backfills AppVersion from server config so callers don't have to
remember to set it on each authErrorData construction.
Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com
Two related header tweaks: - pageData and authErrorData both gain an AppVersion field, populated from server config. The layout renders it as a small muted "v0.19.2" next to the "pr-reviewer" title — same number that's stamped into every PR comment header, so operators have one less source of ambiguity about which build they're staring at. - pageData also picks up the session's Groups slice. The layout uses it to attach a tooltip to the username ("Roles: admins, viewers"), marking the span with a dotted underline + help cursor so it's clear the username is hoverable. Skipped silently when the session has no groups (e.g. a user not in any tracked group). A small commaJoin template helper does the joining; renderAuthError now backfills AppVersion from server config so callers don't have to remember to set it on each authErrorData construction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>Automated review by pr-reviewer v0.19.1 | Full Review | Claude Sonnet 4 | tracking id
r-f47174-31167bThis is an AI-generated review and may contain mistkaes.
Status: ✅ Completed
✅ Verdict: Approve — Clean UI enhancement that adds helpful version visibility and role information with good error handling.
Complexity: trivial
Code Review: Surface app version and group roles in dashboard header
Summary
This PR enhances the dashboard header with two quality-of-life improvements: displaying the application version and showing user roles on hover. The implementation is clean and follows existing patterns.
What's Good
✅ Consistent version display: The version now appears in both PR comment headers and the dashboard, eliminating operator confusion about which build they're viewing.
✅ Thoughtful UX design: The role tooltip uses standard web conventions (dotted underline, help cursor) to indicate interactivity.
✅ Robust error handling: The
renderAuthErrorfunction automatically backfillsAppVersionfrom server config, preventing template errors if callers forget to set it.✅ Template safety: The layout template gracefully handles missing data with conditional rendering (
{{if .AppVersion}},{{if .Groups}}).✅ Code organization: The
commaJoinhelper is appropriately placed in the template function map and keeps the template readable.Technical Implementation
The changes are well-structured:
pageDataandauthErrorDatastructs gainAppVersionandGroupsfieldscommaJoinfunction added to handle role list formattingMinor Observations
0.15.0while the PR description mentionsv0.19.2- this is expected since the VERSION file represents the current state, not the example in the description.Groupsfield inauthErrorDatais documented as "always nil here" which is correct since auth error pages don't have authenticated sessions.Verdict
This is a clean, low-risk enhancement that improves operator experience without changing any core functionality. The implementation follows established patterns and includes appropriate safety measures.
📚 Context used in this review
Project guidance files:
CLAUDE.mdRepository fragments:
internal/config/config.go— extracted in answer to: "the definition and field type of AppVersion in the configuration struct"VERSION(whole file)