Skip to content

feat(ui): notify open tabs when a new server version is deployed (reload prompt) #614

Closed

Description

@dborup

Problem

After a deploy, a tab that was already open keeps running the old JavaScript until the user reloads. New features look missing (seen after v0.2.6: the RX 1h column on Observers only appeared after a manual refresh), and an old client can disagree with the new API shape.

Proposal

Show a small, non-blocking "New version available – reload" notice when the server's build changes while a tab is open.

  • Signal. /api/health already reports {version, commit, buildTime} (used in public/nav-drawer.js). Remember the commit seen at page load. The __BUST__ value in index.html is another option.
  • When to check (no extra polling load). Piggyback on what already happens:
    • when the tab becomes visible (visibilitychange);
    • when the WebSocket reconnects, since a deploy restarts the server;
    • at most once every few minutes otherwise.
      No per-packet or per-render calls.
  • UI. A dismissible banner or toast with a Reload button, styled with CSS variables (theme-aware) and accessible (role="status", keyboard reachable). It must never auto-reload, so nobody loses filters or an open detail pane.
  • Edge cases.
    • Ignore failed or 5xx health responses during the restart window.
    • Show the notice only once per new commit.
    • Do not show it on first load.

Tests

  • Unit tests (vm.createContext):
    • the compare/notify logic, including that a missing or failed health response does not notify;
    • the same commit does not notify;
    • a new commit notifies once;
    • dismiss is respected.
  • Playwright: stub /api/health to change the commit, fire visibilitychange, assert the banner appears, and assert that Reload reloads.

Config / customizer

The check interval can be hardcoded at first. Note it for the customizer later (AGENTS rule 8).

Activity

  1. dborup commented on Oct 26, 2026

    @dborup
    OwnerAuthor

    Fixed by #615 (merged as 400d36454c29e3f430d8256409659c90d4f79b44).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions