refactor(web): render architect uniformly on /agents/roster (AR-1) #1207
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/agent-hooks!1207
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "code-lead/1201"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1201.
Summary
Post-dockerize, architect is just another containerised type — the filter that hid it from
/agents/rosterand theisHostbranch inTypeGroupCardare stale scaffolding. Drop both so architect renders as a regularTypeGroupCardalongside the worker pools.agents.roster.tsx: replace.filter(n => n !== "architect")with a stable comparator that sorts architect last (worker pools stay the focal point; insertion order otherwise preserved).type-group-card.tsx: delete theisHostconstant + the "host" pill + the "Singleton — runs in-process" body copy + the special instances-table suppression. Every type now renders the standard Instances header / Add-instance button /InstancesTable.agents.roster.test.tsx: assert the architect card is rendered, expanding it surfaces theclaude-hooks-architect-defaultrow, the ⚙ button opensTypeEditorDrawerwith every section accordion mounted, and no host pill remains on the page.Acceptance criteria (issue #1201)
apps/web/src/routes/agents.roster.tsx: removed.filter((n) => n !== "architect"); architect sorts last via a stable comparator.apps/web/src/features/agents/roster/type-group-card.tsx: deleted theisHostbranch entirely — nohostpill, no "Singleton — runs in-process" body copy, no instances-table suppression.Plusbutton →openCreateInstance("architect")).TypeEditorDrawerwith every section (Identity / Prompt / Routing / Skills / Thresholds / Provider / Container) rendered.Test plan
bun x vitest run src/routes/agents.roster.test.tsx— 5 / 5 pass (the new AR-1 block + the pre-existing primary-heading smoke).just qa— typecheck + lint + format + all 3362 server-side unit tests green./agents/roster: architect card appears last in the list, instances table showsclaude-hooks-architect-default, ⚙ opens the type editor.🤖 Generated with Claude Code
Review — AR-1: render architect uniformly on /agents/roster
CI: ✅ green Mergeable: ✅ Verdict: APPROVE
What the PR does
Post-dockerize, architect is just another containerised agent type. This PR removes the two pieces of stale scaffolding that treated it differently:
agents.roster.tsx— replaces.filter((n) => n !== "architect")with a sort-last comparator so architect appears at the bottom of the card list (worker pools stay focal, insertion order otherwise preserved).type-group-card.tsx— deletesisHostconstant + the "host" pill + the "Singleton — runs in-process" body copy + theisHost ? <p>…</p> : <InstancesTable/>branch. Every type now renders the standard Instances header / Add-instance button /InstancesTable.agents.roster.test.tsx— four new AR-1 tests covering all issue ACs, plus a one-line fix to the existing smoke mock (available_types: []to match the updatedAgentsListResponsetype).Acceptance criteria (issue #1201)
isHostbranch deleted entirely — no host pill, no singleton copy, no instances-table suppression ✅Plusbutton path as every other type ✅TypeEditorDrawer; all seven section accordions (Identity / Prompt / Routing / Skills / Thresholds / Provider / Container) verified in test ✅Code quality
Sort comparator (
agents.roster.tsx):Correct and stable — V8/Bun's
Array.sortis ES2019 stable, soreturn 0for non-architect pairs preserves insertion order. Both cases handled (architect asaand asb).type-group-card.tsx— clean deletion; no orphaned imports, no dead code. The resulting component is pleasingly uniform.Tests —
architectInstancefixture is fully typed.renderRoster()helper avoids repetition. The negative "no host pill" test correctly expands the card body before asserting (the oldisHostbranch rendered content only when uncollapsed), showing good awareness of the conditional mount. UsingquerySelectorAll('[title="..."]')for a negative DOM assertion is unorthodox but sound here.Docs/comments — both the file-level JSDoc and the inline
typeNamescomment are updated. No stale language left.Minor observations (no changes required)
available_types: []added to the existing smoke mock is a silent type-correctness fix; the test was already passing before (mock was probablyas anyor lenient), but the explicit field is correct and harmless.LGTM. Merging inline.