fix(board): show runner container count in NowRail capacity meter#101
Merged
mhersson merged 3 commits intoMay 18, 2026
Merged
Conversation
- replace agents.length with running_containers in the capacity numerator - poll /api/runner/health every 30s so container count stays current - thread runningContainers through ProjectShell -> Board -> NowRail - update NowRail copy to say "containers" not "agents" in Capacity section - update NowRail tests + JSDoc
- Gate cap meter on both maxAgents and runningContainers; pre-poll falls back to "no cap set" instead of flashing 0/N at 0%. - Drop the runner-cap denominator from the Now·agents head-row (the cap is a container-capacity number, not an agent-capacity one). - Clamp negative/NaN runningContainers so they cannot leak into invalid CSS widths. - Pause polling on hidden tabs, refetch on visibility regain, and abort in-flight requests so stale responses cannot overwrite fresh data. - Log poll failures via console.warn; previous values are preserved on transient failures. - Extract REFRESH_INTERVAL constant to match sibling pollers. - Add tests for undefined / negative / NaN runningContainers.
…n-the-capacity-section-of-the-right-rail # Conflicts: # web/src/components/Board/Board.tsx # web/src/components/ProjectShell/ProjectShell.tsx
eba1681 to
0861d03
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the Capacity section of the right rail (
NowRail) so it readsrunning_containers / max_concurrentfrom/api/runner/healthinstead of comparing the active-agent count to the runner's container cap. The "Now · agents" section is unchanged and remains the canonical place for agent counts.Changes
web/src/components/Board/NowRail.tsx— newrunningContainers?: numberprop; Capacity numerator, percentage, head-row "running" text, and meta strip all userunningContainers ?? 0; copy reads "containers" not "agents"; JSDoc updated.web/src/components/Board/Board.tsx— threadsrunningContainerstoNowRail.web/src/components/ProjectShell/ProjectShell.tsx— replaces the one-shotgetRunnerHealth()fetch with a 30 s poll (matches dashboard cadence); preserves previous values on transient failure.web/src/components/Board/NowRail.test.tsx— assertions disambiguate container count from agent count and cover the degraded fallback.Review notes (approve_with_notes)
The reviewer flagged one Important note worth following up in a follow-up PR: the
NowRailprop is still namedmaxAgentswhile it carries the runner-container cap — consider renamingmaxAgents → maxContainersto match the rendered semantics. Several minor optional improvements were also recorded on the card (fake-timers test for the 30 s cadence, zero-case test, gating the poll onremote_execution.enabled).Test plan
npm run lintcleannpx tsc -bcleannpm test— 591 / 591 passrunning_containers / max_concurrentand updates within 30 s after container start/stop.