Replace idle toasts with pane border + titlebar badge

Old behaviour: every pane fired orch.notify("X is idle") after 5s of
silence, stacking up to N toasts that took ages to dismiss.

New behaviour:
- LeafPane tracks its own isIdle state locally and reports up via
  orch.reportLeafIdle(leafId, idle).
- App aggregates into a Set<NodeId> and renders "N idle" in red after
  the "N panes" count in the titlebar (hidden when zero).
- The pane itself gets a red border (.leaf.idle) — but active and
  broadcasting borders still take precedence, so the focus indicator
  isn't masked by idle status.
- The pane's "alive" status text in the toolbar swaps to red "idle"
  while it's quiet (reverts to "alive" the moment output arrives).
- Idle clears immediately on the next byte of output (no 1-second lag)
  AND when the pane unmounts (cleanup effect).

No more flood of toasts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
megaproxy 2026-05-22 19:54:20 +01:00
parent c93ebddfa5
commit d9ddf52699
5 changed files with 71 additions and 15 deletions

View file

@ -17,6 +17,20 @@
.leaf.active.broadcasting {
border-color: #ffb840;
}
.leaf.idle {
border-color: #c84040;
}
/* active / broadcasting beats idle visually when you're focused on a
pane (active), the blue tells you "you're here"; idle is implied. */
.leaf.active.idle {
border-color: #5a8cd8;
}
.leaf.broadcasting.idle {
border-color: #e09838;
}
.leaf.active.broadcasting.idle {
border-color: #ffb840;
}
.leaf.drag-source {
opacity: 0.4;
}
@ -154,6 +168,7 @@
}
.pane-status.ok { color: #6c6; }
.pane-status.err { color: #d66; }
.pane-status.idle { color: #d96060; }
.pane-actions {
display: flex;