Files
werkator/docs/prs/2026-09-16-PR#75-restart-status-indicator.md
miandmhoennig c45ee1e3df
werkator build succeeded after 01:59
werkator/deploy build succeeded after 00:08
Show restarting during self-deployment (#75)
During self-deployment, the navigation indicator shows `restarting` across temporary connection failures and returns to `live` after recovery. It recognizes watcher announcements and the existing Werkator proxy maintenance page. Unrelated failures remain errors; an interruption lasting two minutes becomes an error even if the maintenance page persists.

Pages without live data also poll watcher health, so their header recovers automatically. No proxy configuration update is required.

Validation: `./gradlew build` passed (757 tests); `node --test src/test/js/*.test.cjs` passed (6 tests covering restart, recovery, unrelated outages, deadline and response ordering). JavaScript tests are included in the CI command. Version: 1.19.1.

PR documentation: `docs/prs/2026-09-16-PR#75-restart-status-indicator.md`.
Co-authored-by: mhoennig <michael@hoennig.de>
Reviewed-on: #75
2026-09-16 13:04:35 +02:00

2.7 KiB

WARNING: This document describes only the change applied in this PR. It may already be outdated once the next PR is merged. Historic PR-documentation is not maintained along with new PRs — treat it as a snapshot, not as current documentation.

The Problem

Self-deployment briefly disconnects the browser and the navigation indicator shows error. The watcher already reports the draining state, but the connection indicator did not use it. A fast restart may also happen entirely between watcher polls.

Non-Goals

This change does not delay shutdown or change deployment behavior. It does not classify every proxy error or network failure as a restart.

The Scenarios

Feature: Explain planned connection interruptions

Scenario#75.01: A declared restart survives the interruption

  • Given the watcher announces a restart
  • When subsequent refreshes fail
  • Then the header keeps showing restarting and marks table data stale
  • And successful refreshes and a healthy watcher restore live
Verified by

Scenario#75.02: Recognize a fast restart through the proxy

  • Given the restart happened between watcher polls
  • When an HTTP 502, 503 or 504 carries Werkator's existing maintenance page
  • Then the indicator shows restarting
  • And unrelated error pages and network failures still show error
Verified by

Scenario#75.03: Do not hide a failed restart

  • Given the server has been unavailable for two minutes after a restart notice
  • When the maintenance page is still being served
  • Then the indicator shows error
  • And repeated maintenance responses do not extend that deadline
  • And a late response from before the notice cannot erase it
Verified by

The Solution

Remember restart announcements independently of individual polling requests. Recognize the existing Werkator maintenance heading only on proxy-unavailable responses. Keep polling and use the existing pulsing status style during restart. Pages without live data also poll watcher health so their header can recover automatically. Bound the interruption grace period to two minutes and clear it when the watcher confirms recovery. No reverse-proxy configuration update is required.

Additional Changes

Version 1.19.1 includes the release note. The dependency-free JavaScript regression tests run with node --test src/test/js/*.test.cjs and are included in Werkator's own CI command.