refactor(web): drop the team agent tab and team memory scopes (P1.1)

Team mode is out of the community edition, but Agents still offered a Team
tab, a team agent type and team / organization memory scopes.
This commit is contained in:
shumeiko.it
2026-10-27 14:17:25 +01:00
parent f3c48e6f19
commit 97b2c984d8
4 changed files with 10 additions and 8 deletions

View File

@@ -30,7 +30,7 @@ import type { BackendPersona } from './agents/types';
/** /**
* Agent Center (UX-Refactor Phase 3B, S09). Agents as explicit, governed work * Agent Center (UX-Refactor Phase 3B, S09). Agents as explicit, governed work
* actors over the B3 agents.json store (/api/agents). C22: category tabs = * actors over the B3 agents.json store (/api/agents). C22: category tabs =
* All / Personal / Workspace / Team / Autonomous / Archive; Templates (the * All / Personal / Workspace / Autonomous / Archive; Templates (the
* legacy persona catalog + groups) is a SIDE AFFORDANCE, not a tab. C23: Run * legacy persona catalog + groups) is a SIDE AFFORDANCE, not a tab. C23: Run
* is a one-shot fleet-spawn — on `workspace_ambiguous` a picker opens and the * is a one-shot fleet-spawn — on `workspace_ambiguous` a picker opens and the
* run retries with the chosen workspace. Acceptance (§12.9): a user can * run retries with the chosen workspace. Acceptance (§12.9): a user can

View File

@@ -50,14 +50,16 @@ interface AgentBuilderProps {
onCancel: () => void; onCancel: () => void;
} }
const AGENT_TYPES: AgentType[] = ['personal', 'workspace', 'team', 'autonomous']; // Team agents and team / organization memory belong to team mode, which the
// community edition does not ship.
const AGENT_TYPES: AgentType[] = ['personal', 'workspace', 'autonomous'];
const AUTONOMY_LEVELS: Array<{ id: AutonomyLevel; hint: string }> = [ const AUTONOMY_LEVELS: Array<{ id: AutonomyLevel; hint: string }> = [
{ id: 'manual', hint: 'every action waits for you' }, { id: 'manual', hint: 'every action waits for you' },
{ id: 'guided', hint: 'asks before anything consequential' }, { id: 'guided', hint: 'asks before anything consequential' },
{ id: 'medium', hint: 'acts, asks on elevated access' }, { id: 'medium', hint: 'acts, asks on elevated access' },
{ id: 'high', hint: 'acts autonomously within its declared scope' }, { id: 'high', hint: 'acts autonomously within its declared scope' },
]; ];
const SCOPES: Scope[] = ['personal', 'workspace', 'team', 'organization']; const SCOPES: Scope[] = ['personal', 'workspace'];
function TogglePill({ active, label, onToggle }: { active: boolean; label: string; onToggle: () => void }) { function TogglePill({ active, label, onToggle }: { active: boolean; label: string; onToggle: () => void }) {
return ( return (

View File

@@ -59,7 +59,7 @@ describe('filterAgentsByTab — C22', () => {
]; ];
it('declares exactly the six C22 tabs (Templates is NOT a tab)', () => { it('declares exactly the six C22 tabs (Templates is NOT a tab)', () => {
expect(AGENT_CENTER_TABS.map(t => t.id)).toEqual(['all', 'personal', 'workspace', 'team', 'autonomous', 'archive']); expect(AGENT_CENTER_TABS.map(t => t.id)).toEqual(['all', 'personal', 'workspace', 'autonomous', 'archive']);
expect(AGENT_CENTER_TABS.some(t => t.label.toLowerCase() === 'templates')).toBe(false); expect(AGENT_CENTER_TABS.some(t => t.label.toLowerCase() === 'templates')).toBe(false);
}); });

View File

@@ -5,8 +5,9 @@
* - PRD §14.5: ALL eight AgentRunState values map to a StatusBadge tone + * - PRD §14.5: ALL eight AgentRunState values map to a StatusBadge tone +
* human label (exhaustive Record — adding a state without a badge entry * human label (exhaustive Record — adding a state without a badge entry
* is a compile error). * is a compile error).
* - C22: category tabs = All / Personal / Workspace / Team / Autonomous / * - C22: category tabs = All / Personal / Workspace / Autonomous / Archive
* Archive (Templates is a side affordance, NOT a tab). * (Templates is a side affordance, NOT a tab). The community edition has no
* team mode, so there is no Team tab.
* - C27: KPI row keeps the success-rate tile and total/running counts; * - C27: KPI row keeps the success-rate tile and total/running counts;
* "hours saved" is deliberately absent (no data source). * "hours saved" is deliberately absent (no data source).
*/ */
@@ -26,14 +27,13 @@ export const AGENT_STATE_META: Record<AgentRunState, { label: string; tone: Stat
archived: { label: 'Archived', tone: 'neutral' }, archived: { label: 'Archived', tone: 'neutral' },
}; };
/** C22 tab vocabulary: 'all' + the four AgentType categories + 'archive'. */ /** C22 tab vocabulary: 'all' + the AgentType categories in use + 'archive'. */
export type AgentCenterTab = 'all' | AgentType | 'archive'; export type AgentCenterTab = 'all' | AgentType | 'archive';
export const AGENT_CENTER_TABS: ReadonlyArray<{ id: AgentCenterTab; label: string }> = [ export const AGENT_CENTER_TABS: ReadonlyArray<{ id: AgentCenterTab; label: string }> = [
{ id: 'all', label: 'All' }, { id: 'all', label: 'All' },
{ id: 'personal', label: 'Personal' }, { id: 'personal', label: 'Personal' },
{ id: 'workspace', label: 'Workspace' }, { id: 'workspace', label: 'Workspace' },
{ id: 'team', label: 'Team' },
{ id: 'autonomous', label: 'Autonomous' }, { id: 'autonomous', label: 'Autonomous' },
{ id: 'archive', label: 'Archive' }, { id: 'archive', label: 'Archive' },
]; ];