How far back the fleet list (COMMAND_LIST_BACKGROUND_TASKS with an empty
blockid) reaches for tasks that already ended. Comfortably longer than the
longest finished-row retention the renderer applies (15 s for an error), so
a finished row is still in the list for as long as it is shown.
Sentinel key for every priority-lane event that is NOT a blockfile
(terminal/PTY output) event. Not a valid block:<id> scope string, so it
can never collide with a real pane key.
Extract a coalescing key from a background-lane event.
Background events are RPC-wrapped MPS events:
{ “eventtype”: “rpc”, “data”: { “command”: “eventrecv”, “data”: { “event”: “sysinfo”, “scopes”: [“local”] } } }
Key = “:”, e.g. “sysinfo:local” or “blockstats:block:abc123”.
Falls back to “:” for events that don’t match the expected shape (safe: they coalesce
to one slot, which is acceptable because non-sysinfo/blockstats never reach this lane).
Drain all immediately-available events from rx (including first) and
coalesce them to the latest reading per (event-name:scope) key. Iteration
order in the returned Vec is first-seen (stable across coalescing rounds).
Route a decoded blockinput payload — the actual human-keystroke path
(termViewModel.ts’s blockinput WS command, used by both the
standalone Terminal widget and an agent pane’s composer-drawer shell) —
to its block’s controller.
Drain all immediately-available events from rx (including first) and
interleave them round-robin by pane (priority_pane_key), instead of
forwarding in raw arrival order. Without this, a pane producing output
faster than the socket can flush it fills this same lane with its own
frames, and a different pane’s keystroke-echo frame — queued in the same
FIFO — waits behind the entire backlog. Round-robining bounds that wait to
one slot per OTHER distinct pane with events currently queued, regardless
of how deep any single pane’s backlog is.
Extract a fairness key so a flood of PTY output from one pane can’t queue
an unbounded number of frames ahead of a different pane’s own keystroke
echo sitting in the same lane.
The srvinfo event sent once on every WebSocket connect, right after
config: srv’s version, which the UI compares with its own, and the
machine srv runs on (crate::srv_info).
Run f on block_id’s persistent controller for agent.answer /
agent.cancel. The error strings are matched by the frontend’s
SAFE_TO_RETRY_VIA_FOLLOWUP allowlist (useAgentQuestions.ts).