eleven / messenger Public

web: replication tile says what the number means (#700)

'0s ago' read as a live clock; it's frozen per snapshot. Now: 'syncing ·
current at snapshot' when 0, 'up · Ns behind at snapshot' otherwise.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Paul Campbell d3f8e3457ef5a7f319726f415a2e652770d8dd42 parent 956bf87
1 file changed, +6 −1
  • web/status/index.html +6 −1
diff --git a/web/status/index.html b/web/status/index.html
index 35bcd09..8dc1ca2 100644
--- a/web/status/index.html
+++ b/web/status/index.html
@@ -266,7 +266,12 @@ function render(d) {
// The word is the state; the glyph + color are supplementary.
s.textContent = (up ? "✓ up" : "✕ down");
if (name === "Replication" && up && d.replication.lag_seconds !== null) {
- s.textContent += " · " + d.replication.lag_seconds + "s ago";
+ // The lag is frozen into each snapshot, not live — "0s ago" read like a
+ // ticking clock. 0 means the replicator was mid-sync at snapshot time
+ // (its normal state); anything else is how far behind it had fallen.
+ const lag = d.replication.lag_seconds;
+ s.textContent = lag === 0 ? "✓ syncing · current at snapshot"
+ : "✓ up · " + lag + "s behind at snapshot";
}
li.append(n, s);
svc.append(li);