Skip to content

Auto-refresh backend version in UI and reduce font sizes#48

Merged
dkrizic merged 6 commits intomainfrom
copilot/fix-ui-service-version-display
Jan 26, 2026
Merged

Auto-refresh backend version in UI and reduce font sizes#48
dkrizic merged 6 commits intomainfrom
copilot/fix-ui-service-version-display

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 26, 2026

UI displayed stale backend version when backend restarted after UI startup. Version was fetched once at startup and never updated.

Changes

  • Added /version endpoint: Calls existing gRPC metaClient.Meta(), returns plain text
  • HTMX polling: Backend version span polls every 5 minutes via hx-trigger="every 5m"
  • Reduced font sizes: Base 0.875rem → 0.75rem, headings proportionally smaller, tighter padding
// handlers.go - New endpoint reuses existing gRPC service
func (s *Server) handleVersion(w http.ResponseWriter, r *http.Request) {
    metaResp, err := s.metaClient.Meta(ctx, &metav1.MetaRequest{})
    if err != nil {
        w.Write([]byte("")) // Fail silently
        return
    }
    w.Header().Set("Content-Type", "text/plain")
    w.Write([]byte(metaResp.Version))
}
<!-- index.gohtml - HTMX auto-polling -->
<span id="backend-version" 
      hx-get="{{.Subpath}}/version" 
      hx-trigger="every 5m" 
      hx-swap="innerHTML">{{.BackendVersion}}</span>

No new backend functionality required. Follows existing HTMX pattern used for feature list.

Original prompt

This section details on the original issue you should resolve

<issue_title>In the UI: Display of service version outdated</issue_title>
<issue_description>If the backend /service was started after the /ui, the /ui shows the old version, because it loads in once it starts itself. We should fix this, by reloading this information if it is older than 5 minutes (or so).
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits January 26, 2026 10:51
Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
…ting

Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
Co-authored-by: dkrizic <1181349+dkrizic@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix outdated service version display in UI Auto-refresh backend version in UI and reduce font sizes Jan 26, 2026
@dkrizic dkrizic marked this pull request as ready for review January 26, 2026 11:05
@dkrizic dkrizic merged commit 3171c5f into main Jan 26, 2026
3 checks passed
@dkrizic dkrizic deleted the copilot/fix-ui-service-version-display branch January 26, 2026 11:05
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.

In the UI: Display of service version outdated

2 participants