CL-6469: agents list to spec - #195
Merged
Merged
Conversation
Covers the new agentRosterStatus/runsInLast7Days helpers and the per-row checkbox + header select-all rendering the roster table gains.
…, New agent action Roster table gains Status (folded from a definition's deployed/stopped state and its live instances), Model (lazy per-row fetch), and Runs·7d (counted from top-level runs created in the trailing week) alongside bulk row selection (useListSelection/SelectionCheckbox) and a floating BulkActionBar (Duplicate/Archive/Move/Delete). The top-bar action is now "New agent" per the page-action contract. Duplicate/Archive/Move/ Delete surface as an honest not-yet-wired toast — the hub exposes no bulk mutation endpoint for any of them yet. Adds Archive/Trash to the shared icon re-export surface.
Bulk bar now wires Archive to the real setAgentDefinitionStatus PUT (same route the single-agent Archive button already uses), and drops Duplicate/Move/Delete — none of the three has a real bulk primitive, and a button that can't do what it says is worse than no button. Status tones now adopt react-ui's own run-status convention instead of an invented mapping: Running is the blue "live" tone with a pulsing StatusDot, Idle is the green "healthy" tone — Blocked/Archived were already right.
Covers archiveDefinitions/archiveResultToast: one id failing must not hide or roll back the ids that already succeeded server-side, and the toast copy must report an honest count for partial/full success/failure.
onArchiveSelected used Promise.all, which rejects on the first rejection even though the other archive calls already succeeded server-side — the roster kept showing stale state and the toast implied nothing happened. Switch to Promise.allSettled (archiveDefinitions), always invalidate the definitions/runs queries regardless of outcome, and toast a real count via archiveResultToast. Also runs prettier on the touched files and drops packages/icons' Trash export, unused since Delete was removed from the bulk bar.
TheGreatAxios
force-pushed
the
cl-6469-agents-list
branch
from
August 21, 2026 05:54
a8326ec to
8362b51
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
Brings
apps/web/src/pages/agents-page.tsx(Agents list only) up to the mock spec's §5.1:.opt→hidden lg:table-cell) · Status · Model (.opt) · Runs · 7d (.opt, numeric)@corbits/react-ui'suseListSelection/SelectionCheckbox/BulkActionBar(PR CL-5849: Return 409 not 500 when an agent can't resolve an inference source #33) — shift/cmd range select, header select-all/indeterminate, floating bulk bar with Archive only#Plus), per §2.3's page-action inventory (was "Create")Update after 2nd peer review (both blocking items fixed)
onArchiveSelectedusedPromise.all, which rejects on the first failure even though the other archive calls already succeeded server-side — a mid-batch failure left the roster showing stale state and the toast implied nothing happened. Replaced witharchiveDefinitions(Promise.allSettled) +archiveResultToast, both exported and unit-tested: the definitions/runs queries are now invalidated regardless of outcome, and the toast reports an honest count ("Archived 4 of 5 — the rest failed" / all-succeeded / all-failed).prettier --checknow passes on the touched files (bunx prettier --writerun onagents-page.tsxandagents-page.test.tsx).Trashexport frompackages/icons(was left over from before Delete was removed from the bulk bar).Update after 1st peer review
onArchiveSelectedcalls the realsetAgentDefinitionStatus(tenantId, id, "stopped")— the same PUT route the single-agent Archive button onagent-detail-page.tsxalready uses. Duplicate/Move/Delete are dropped from the bulk bar entirely: batch duplication would need slug-collision handling the detail page's single-agent duplicate never had to solve, and Move/Delete have no backend primitive at all.@corbits/react-ui's ownRUN_STATUS_TONEconvention: Running →info(blue) with a pulsingStatusDot(liveprop), Idle →success(green). Blocked (danger)/Archived (neutral) were already correct.Real-data notes
stoppeddefinition always reads Archived; adeployedone reads Running if any of its top-level runs (listTopLevelRuns) isrunning, Blocked if any iserror, else Idle — grounded inWorkflowDefinitionResponse.status+WorkflowRunResponse.status, not invented states.getAgentCapabilities, the same plain fetch-effect pattern (not react-query) the existing detail rail already uses — a load/fetch failure degrades that row's cell to—instead of blocking the table.createdAtinside the trailing 7 days.Known follow-up (not blocking, flagged for a ticket)
AgentModelCellfires one uncachedgetAgentCapabilitiesfetch per row on mount via a plainuseEffect— on a real-size roster every render refires every row's request (no batching, no cache). Needs either a batch capabilities endpoint or a react-query cache keyed by(tenantId, definitionId)before this scales past a handful of agents.Test plan
bunx prettier --checkon touched files — cleanbunx eslinton touched files — cleanbun run typecheck(apps/web) — cleanbun run build(apps/web) — cleanbun test ./src ./test(apps/web) — 786 pass, 0 fail (full existing suite, no regressions)bun test(packages/icons) — 3 pass, 0 failarchiveDefinitions/archiveResultToastunit tests covering partial/full success/failure, plus the earlieragentRosterStatus/runsInLast7Daysunit tests, populated/empty render, Running's live-dot rendering, selection checkboxes + header select-all, no bulk-bar leakage at zero selection, "New agent" top-bar action, workbench-link side panel still worksagent-detail-page.tsx) — out of scope, untouched, owned by another unit.Do not merge — flagging for peer review per task instructions.