@feigi/fleet-ctl 3.45.0 → 3.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/scripts/board.html +18 -18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feigi/fleet-ctl",
3
- "version": "3.45.0",
3
+ "version": "3.45.1",
4
4
  "description": "Agent fleet: run-team controller, merge bot, PR reviewer, and the ticket pipeline they share",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -360,26 +360,19 @@ function render(m) {
360
360
  // only says it may be short at one edge. The footer append above is what
361
361
  // actually guarantees this notice reaches the operator on a tick where a
362
362
  // higher-priority arm wins the slot instead.
363
- // className reset on EVERY arm, never only on the arm that sets it: this
364
- // element is reused across ticks, so a `dead` class left behind by an
365
- // earlier render paints the next tick's ledger or stale message red. One
366
- // assignment per arm is what makes that unreachable rather than unlikely.
363
+ // Every banner writer goes through showBanner, which assigns the class as
364
+ // well as the text: this element is reused across ticks, so a `dead` class
365
+ // left behind by an earlier write would paint the next message red. Routing
366
+ // every writer through the one setter, rather than one assignment per arm,
367
+ // is what makes that unreachable rather than unlikely.
367
368
  if (built && Date.now() - m.generatedAt > interval * 1000 * 2) {
368
- banner.style.display = "block";
369
- banner.className = "";
370
- banner.textContent = "⚠ data stale — server/controller stopped?";
369
+ showBanner("⚠ data stale — server/controller stopped?");
371
370
  } else if (stallMsg) {
372
- banner.style.display = "block";
373
- banner.className = "dead";
374
- banner.textContent = stallMsg;
371
+ showBanner(stallMsg, "dead");
375
372
  } else if (ledgerMsg) {
376
- banner.style.display = "block";
377
- banner.className = "";
378
- banner.textContent = ledgerMsg;
373
+ showBanner(ledgerMsg);
379
374
  } else if (capMsg) {
380
- banner.style.display = "block";
381
- banner.className = "";
382
- banner.textContent = capMsg;
375
+ showBanner(capMsg);
383
376
  } else { banner.style.display = "none"; banner.className = ""; }
384
377
  }
385
378
 
@@ -448,10 +441,17 @@ function card(t) {
448
441
  return c;
449
442
  }
450
443
 
451
- function warn(msg) {
444
+ // The one writer of a shown banner: display, class and text move together, so
445
+ // no caller can show a message while a previous caller's class is still set.
446
+ function showBanner(text, cls = "") {
452
447
  const banner = document.getElementById("stale-banner");
453
448
  banner.style.display = "block";
454
- banner.textContent = msg;
449
+ banner.className = cls;
450
+ banner.textContent = text;
451
+ }
452
+
453
+ function warn(msg) {
454
+ showBanner(msg);
455
455
  }
456
456
 
457
457
  async function poll() {