refactor(desktop): remove the sidebar workspace agents chip

Merged
AV
1mo ago
+18-820

Summary

  • Removes the agents chip (agent icon + running count) shown under sidebar workspace rows, along with its Workspace agents toggle in Settings → Experimental. The ports chip on the same line is unchanged.

Why / Context

The chip was the workspace-agents-row experiment, on by default. This concludes the experiment by removing it, following the removal checklist in the store's own doc comment: the store, the settings toggle and its search entry, and the chip branch in DashboardSidebarWorkspaceChips.

How It Works

  • Deletes DashboardSidebarAgentsChip (with DashboardSidebarAgentAvatar and DashboardSidebarAgentHoverRow), useDashboardSidebarWorkspaceRunningAgents, and stores/workspace-agents-row.ts. DashboardSidebarWorkspaceChips now renders only the ports chip.
  • Moves workspace-agents-row from the persisted-key registry to DEAD_KEYS, so the boot sweep clears the stored toggle from existing profiles (persisted-state policy in apps/desktop/AGENTS.md).
  • Drops statuses from SidebarWorkspaceStatusEntry; the chip was its only reader. The map stays a local that derives status and isUnread, which are still compared, so rows only stop re-rendering for per-terminal changes nothing displays.
  • Moves the chips regression fixture from #7833 onto the ports chip, keeping its enabled + portaled and disabled chip cases.
  • Removes the 5 now-unused messages from every locale catalog (bun run check:i18n, deletions only).

Manual QA Checklist

  • Workspace with 2+ running agents (or one agent running subagents): no chip under the row
  • Workspace with a detected port: ports chip still renders, its hover card opens, and dragging from the empty space beside it still reorders
  • Settings → Experimental has no "Workspace agents" toggle, and settings search doesn't surface it
  • Sidebar status indicators and unread marks behave as before
  • Terminal pane header's "N subagents" menu still appears and clears once subagents finish

Testing

  • bun x tsc --noEmit in apps/desktop: pass
  • bun run lint: pass
  • bun test on the chips fixture, lib/persisted-keys, and settings-search: 27/27. The fixture alone is 14/14; with stopChipDragStart turned into a no-op, all 10 drag cases fail, so it still guards #7833.
  • bun test over the DashboardSidebar and settings directories: 263 pass. 2 files fail only in that combined run (useSidebarDnd, DashboardSidebarWorkspaceHoverCardContent) because V2ProjectSettings.test.tsx's partial @tanstack/react-router mock leaks across files; both pass alone.
  • bun test in packages/i18n: 157/157. bun run check:i18n: 0 missing in all 17 locales.
  • Not yet exercised in the running app, so the manual QA above is unchecked.

Design Decisions

  • Kept the status provider's subagent refetchInterval: it reads as chip-only, but it shares the terminal-agent-bindings query key with useTerminalAgentBindings, which has no interval of its own. It is what drops expired subagents from the pane header's "N subagents" menu.

Follow-ups

  • DashboardSidebarChipStrip already had no importers before this PR, and its doc still mentions agents. Left alone to keep this focused.

Summary by cubic

Removes the sidebar workspace agents chip and its "Workspace agents" experiment toggle, so workspace rows now show only the ports chip.

  • Deletes the chip components, running-agents hook, and workspace-agents-row store.
  • Registers workspace-agents-row as a dead key so the boot sweep clears the stored toggle from existing profiles.
  • Drops statuses from the workspace status entry; the chip was its only reader, and rows no longer re-render for per-terminal changes.
  • Keeps the subagent refetchInterval, which shares a query key with useTerminalAgentBindings that the pane header's "N subagents" menu depends on.
  • Moves the chips drag regression fixture onto the ports chip and removes 5 now-unused messages from every locale catalog.

Summary by CodeRabbit

  • Changes
    • Running-agent and subagent indicators, counts, and detail views have been removed from workspace sidebar rows.
    • The “Workspace agents” experimental setting is no longer available.
    • Workspace rows continue to show port information when ports are present.