Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

Let sidebar card properties hide agent model badges (#36026)

Brennan Benson5cf3a8256ee0
diff --git a/src/main/persistence/applying-settings/ui-state-read.ts b/src/main/persistence/applying-settings/ui-state-read.ts
index ba01996be4b..d95f8ee4559 100644
--- a/src/main/persistence/applying-settings/ui-state-read.ts
+++ b/src/main/persistence/applying-settings/ui-state-read.ts
@@ -50,6 +50,7 @@ export function getPersistedUI(
state.ui?.rightSidebarTab
),
worktreeCardProperties: normalizeWorktreeCardProperties(state.ui?.worktreeCardProperties),
+ showAgentModels: state.ui?.showAgentModels !== false,
agentActivityDisplayMode: normalizeAgentActivityDisplayMode(state.ui?.agentActivityDisplayMode),
workspaceStatuses: normalizeWorkspaceStatuses(state.ui?.workspaceStatuses),
workspaceBoardOpacity: clampWorkspaceBoardOpacity(state.ui?.workspaceBoardOpacity),
diff --git a/src/main/persistence/moving-wsl-projects/wsl-move-ui-routing-rewrite.test.ts b/src/main/persistence/moving-wsl-projects/wsl-move-ui-routing-rewrite.test.ts
index 6e603ced902..294f18f0d03 100644
--- a/src/main/persistence/moving-wsl-projects/wsl-move-ui-routing-rewrite.test.ts
+++ b/src/main/persistence/moving-wsl-projects/wsl-move-ui-routing-rewrite.test.ts
@@ -1,4 +1,6 @@
import { describe, expect, it } from 'vitest'
+import wslMoveAgentModelUI from '../../../shared/__fixtures__/wsl-move-agent-model-ui.json'
+import { projectWslMoveUi } from './wsl-move-session-projection'
import { toRuntimeExecutionHostId, type ExecutionHostId } from '../../../shared/execution-host'
import type { WorkspaceCleanupDismissal } from '../../../shared/workspace-cleanup'
import { wslMoveCutoverFixture } from '../__fixtures__/wsl-mover/wsl-move-cutover-fixture'
@@ -86,6 +88,22 @@ function dismissal(
}
describe('WSL move UI routing rewrite', () => {
+ it('preserves global model visibility in the desktop snapshot consumed by the renderer', () => {
+ const desktop = wslMoveAgentModelUI.desktopBeforeMove
+ const projected = projectWslMoveUi(
+ desktop,
+ {},
+ (owner) => !!owner && scope.inScope(owner),
+ () => true
+ )
+ expect(projected).not.toHaveProperty('showAgentModels')
+ expect(projected).toEqual(wslMoveAgentModelUI.projectedProjectUI)
+ const updates = rewriteWslMoveUiRouting(desktop, scope)
+ expect(updates).not.toHaveProperty('showAgentModels')
+ // The renderer consumes this exact snapshot; changes to production output must update the contract.
+ expect({ ...desktop, ...updates }).toEqual(wslMoveAgentModelUI.desktopAfterMove)
+ })
+
it("copies only the moved project's rows to the host's form, keeping the local ones", () => {
const ui = profileUi()
const updates = rewriteWslMoveUiRouting(ui, scope)
diff --git a/src/main/persistence/tracking-repos/persistence-worktree-card-properties.test.ts b/src/main/persistence/tracking-repos/persistence-worktree-card-properties.test.ts
index b433dd8213a..1f847e459b3 100644
--- a/src/main/persistence/tracking-repos/persistence-worktree-card-properties.test.ts
+++ b/src/main/persistence/tracking-repos/persistence-worktree-card-properties.test.ts
@@ -51,6 +51,17 @@ vi.mock('../../telemetry/cohort-classifier', () => ({
}))
describe('Store', () => {
+ it('defaults absent model visibility on and preserves an explicit choice across reload', async () => {
+ writeDataFile({ schemaVersion: 1, repos: [], worktreeMeta: {}, ui: {} })
+ const store = await createStore()
+ expect(store.getUI().showAgentModels).toBe(true)
+ store.updateUI({ showAgentModels: false })
+ store.flush()
+ await closeTestStores()
+ const reloaded = await createStore()
+ expect(reloaded.getUI().showAgentModels).toBe(false)
+ })
+
beforeEach(() => {
testState.dir = mkdtempSync(join(tmpdir(), 'orca-test-'))
trackMock.mockReset()
diff --git a/src/main/runtime/rpc/methods/client-ui-pairing-local-fields.test.ts b/src/main/runtime/rpc/methods/client-ui-pairing-local-fields.test.ts
index 748be79390e..72fa47be5cb 100644
--- a/src/main/runtime/rpc/methods/client-ui-pairing-local-fields.test.ts
+++ b/src/main/runtime/rpc/methods/client-ui-pairing-local-fields.test.ts
@@ -45,6 +45,7 @@ describe('client UI RPC pairing-local field seams', () => {
],
workspaceHostOrder: ['runtime:web-11111111-2222-3333-4444-555555555555', 'local'],
sidebarOpen: false,
+ showAgentModels: false,
agentsVisibleHostIds: ['runtime:web-11111111-2222-3333-4444-555555555555'],
agentsFilterRepoIds: ['repo-a'],
agentsHideWorkspacesFromOtherDevices: true,
diff --git a/src/renderer/src/components/dashboard/DashboardAgentRow.tsx b/src/renderer/src/components/dashboard/DashboardAgentRow.tsx
index 562bdcb0194..597bfd14edf 100644
--- a/src/renderer/src/components/dashboard/DashboardAgentRow.tsx
+++ b/src/renderer/src/components/dashboard/DashboardAgentRow.tsx
@@ -66,6 +66,7 @@ function stateDotTooltipLabel(
}
type Props = {
+ showModel?: boolean
agent: DashboardAgentRowData
onDismiss: (paneKey: string) => void
/** Navigate to this agent's tab; paneKey lets the caller mark-visit the exact clicked row. */
@@ -95,6 +96,7 @@ type Props = {
const DashboardAgentRow = React.memo(function DashboardAgentRow({
agent,
+ showModel = true,
onDismiss,
onActivate,
now,
@@ -324,7 +326,7 @@ const DashboardAgentRow = React.memo(function DashboardAgentRow({
>
{displayLabel}
</span>
- {model && (
+ {showModel && model && (
<span
className={cn(
'max-w-24',
@@ -332,7 +334,7 @@ const DashboardAgentRow = React.memo(function DashboardAgentRow({
sendTargetStatus === 'eligible' || sendTargetStatus === 'sending'
? 'min-w-0'
: 'shrink-0',
- 'truncate font-mono text-[10px] text-muted-foreground/70'
+ 'truncate font-mono text-3xs text-muted-foreground/70'
)}
title={model}
>
diff --git a/src/renderer/src/components/sidebar/WorktreeCardAgents.tsx b/src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
index eed0c3a316a..9e07f5c23a9 100644
--- a/src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
+++ b/src/renderer/src/components/sidebar/WorktreeCardAgents.tsx
@@ -10,6 +10,7 @@ import {
selectSendTargetInputs
} from './worktree-card-send-target-inputs'
import { useWorktreeAgentRows } from './useWorktreeAgentRows'
+import { useWorktreeAgentDisplay } from './use-worktree-agent-display'
import { cn } from '@/lib/utils'
import type { DashboardAgentRow as DashboardAgentRowData } from '@/components/dashboard/useDashboardData'
import { useFocusedAgentPaneKey } from './focused-agent-row-highlight'
@@ -19,7 +20,6 @@ import {
CompactAgentSummaryButton
} from './worktree-card-compact-agents'
import { buildAgentRowLineageTree } from '@/components/dashboard/agent-row-lineage-model'
-import { DEFAULT_AGENT_ACTIVITY_DISPLAY_MODE } from '../../../../shared/constants'
import { revealCompactAgentCard } from './worktree-sidebar-reveal'
import { useWorktreeAgentExpansionState } from './worktree-card-agents-expansion-state'
import { translate } from '@/i18n/i18n'
@@ -69,8 +69,7 @@ const WorktreeCardAgentsBody = React.memo(function WorktreeCardAgentsBody({
className
}: BodyProps) {
const languageRevision = useUiLanguageRevision()
- const agentActivityDisplayMode =
- useAppStore((s) => s.agentActivityDisplayMode) ?? DEFAULT_AGENT_ACTIVITY_DISPLAY_MODE
+ const { agentActivityDisplayMode, showAgentModels } = useWorktreeAgentDisplay()
const dropAgentStatus = useAppStore((s) => s.dropAgentStatus)
const dismissRetainedAgent = useAppStore((s) => s.dismissRetainedAgent)
const { targetMode: agentSendPopoverTargetMode, agentStatusEpoch } = useAppStore(
@@ -221,6 +220,7 @@ const WorktreeCardAgentsBody = React.memo(function WorktreeCardAgentsBody({
<React.Fragment key={agent.paneKey}>
<DashboardAgentRow
agent={agent}
+ showModel={showAgentModels}
onDismiss={handleDismissAgent}
onActivate={
agent.rowSource === 'retained' ? handleActivateRetainedAgent : handleActivateAgentTab
@@ -281,6 +281,7 @@ const WorktreeCardAgentsBody = React.memo(function WorktreeCardAgentsBody({
<div key={agent.paneKey} className="min-w-0">
<CompactAgentRow
agent={agent}
+ showModel={showAgentModels}
now={now}
parentConversationDescription={
opensClaudeParentConversation(agent)
diff --git a/src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap b/src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap
index 8dab43265c0..189f5f0cf82 100644
--- a/src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap
+++ b/src/renderer/src/components/sidebar/__snapshots__/subagent-child-row-fallback-pixels.test.tsx.snap
@@ -6,17 +6,17 @@ exports[`chat strip rows from a legacy background-task roster > render exactly a
exports[`sidebar child rows from a legacy subagents snapshot > render a stale parent and a lost transport exactly as before 1`] = `
[
- "<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update" data-state="closed" data-slot="tooltip-trigger"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span><span class="min-w-0 flex-1 truncate" title="Review the parser - No update in 5m"><span class="font-normal text-muted-foreground/90">Review the parser</span><span class="text-muted-foreground/65"> - No update in 5m</span></span><span class="min-w-0 max-w-24 truncate font-mono text-[10px] text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">10m</span></div>",
+ "<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update" data-state="closed" data-slot="tooltip-trigger"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span><span class="min-w-0 flex-1 truncate" title="Review the parser - No update in 5m"><span class="font-normal text-muted-foreground/90">Review the parser</span><span class="text-muted-foreground/65"> - No update in 5m</span></span><span class="min-w-0 max-w-24 truncate font-mono text-3xs text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">10m</span></div>",
"<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update" data-state="closed" data-slot="tooltip-trigger"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span><span class="min-w-0 flex-1 truncate" title="Explore - No update in 5m"><span class="font-normal text-muted-foreground/90">Explore</span><span class="text-muted-foreground/65"> - No update in 5m</span></span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">8m</span></div>",
"<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update" data-state="closed" data-slot="tooltip-trigger"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span><span class="min-w-0 flex-1 truncate" title="No recent update - No update in 5m"><span class="font-normal text-muted-foreground/90">No recent update</span><span class="text-muted-foreground/65"> - No update in 5m</span></span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">16m</span></div>",
"<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update" data-state="closed" data-slot="tooltip-trigger"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span><span class="min-w-0 flex-1 truncate" title="Approve edits - No update in 5m"><span class="font-normal text-muted-foreground/90">Approve edits</span><span class="text-muted-foreground/65"> - No update in 5m</span></span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">6m</span></div>",
- "<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update" data-state="closed" data-slot="tooltip-trigger"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span><span class="min-w-0 flex-1 truncate" title="Review the parser - No update in 5m"><span class="font-normal text-muted-foreground/90">Review the parser</span><span class="text-muted-foreground/65"> - No update in 5m</span></span><span class="min-w-0 max-w-24 truncate font-mono text-[10px] text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">10m</span></div>",
+ "<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update" data-state="closed" data-slot="tooltip-trigger"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span><span class="min-w-0 flex-1 truncate" title="Review the parser - No update in 5m"><span class="font-normal text-muted-foreground/90">Review the parser</span><span class="text-muted-foreground/65"> - No update in 5m</span></span><span class="min-w-0 max-w-24 truncate font-mono text-3xs text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">10m</span></div>",
]
`;
exports[`sidebar child rows from a legacy subagents snapshot > render the compact rows exactly as before 1`] = `
[
- "<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Working" data-state="closed" data-slot="tooltip-trigger"><span data-agent-spinner="" class="agent-working-spinner block rounded-full border-2 border-agent-working border-t-transparent motion-reduce:border-t-agent-working size-1.5"></span></span><span class="min-w-0 flex-1 truncate" title="Review the parser - general-purpose"><span class="font-normal text-muted-foreground/90">Review the parser</span><span class="text-muted-foreground/65"> - general-purpose</span></span><span class="min-w-0 max-w-24 truncate font-mono text-[10px] text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">10m</span></div>",
+ "<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Working" data-state="closed" data-slot="tooltip-trigger"><span data-agent-spinner="" class="agent-working-spinner block rounded-full border-2 border-agent-working border-t-transparent motion-reduce:border-t-agent-working size-1.5"></span></span><span class="min-w-0 flex-1 truncate" title="Review the parser - general-purpose"><span class="font-normal text-muted-foreground/90">Review the parser</span><span class="text-muted-foreground/65"> - general-purpose</span></span><span class="min-w-0 max-w-24 truncate font-mono text-3xs text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">10m</span></div>",
"<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Working" data-state="closed" data-slot="tooltip-trigger"><span data-agent-spinner="" class="agent-working-spinner block rounded-full border-2 border-agent-working border-t-transparent motion-reduce:border-t-agent-working size-1.5"></span></span><span class="min-w-0 flex-1 truncate" title="Explore"><span class="font-normal text-muted-foreground/90">Explore</span></span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">8m</span></div>",
"<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Working" data-state="closed" data-slot="tooltip-trigger"><span data-agent-spinner="" class="agent-working-spinner block rounded-full border-2 border-agent-working border-t-transparent motion-reduce:border-t-agent-working size-1.5"></span></span><span class="min-w-0 flex-1 truncate" title="Working - Agent"><span class="font-normal text-muted-foreground/90">Working</span><span class="text-muted-foreground/65"> - Agent</span></span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">16m</span></div>",
"<div draggable="false" class="compact-agent-row agent-disclosure-row group/compact-agent-row min-w-0 cursor-pointer rounded-sm px-1 text-[11px] leading-none text-muted-foreground worktree-agent-row-hover flex h-6 items-center gap-1"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Waiting for input" data-state="closed" data-slot="tooltip-trigger"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-circle-question-mark text-agent-question size-2.5" aria-hidden="true"><path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"></path><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><path d="M12 17h.01"></path></svg></span><span class="min-w-0 flex-1 truncate" title="Approve edits - Agent"><span class="font-normal text-muted-foreground/90">Approve edits</span><span class="text-muted-foreground/65"> - Agent</span></span><span class="shrink-0 text-[10px] tabular-nums text-muted-foreground/60">6m</span></div>",
@@ -28,7 +28,7 @@ exports[`sidebar child rows from a legacy subagents snapshot > render the compac
exports[`sidebar child rows from a legacy subagents snapshot > render the full rows exactly as before 1`] = `
[
- "<div class="agent-disclosure-row group/agent-row relative -ml-2 flex flex-col py-1 px-2 cursor-pointer rounded-sm worktree-agent-row-hover" title="started 10m ago"><div class="flex items-center gap-1.5"><span class="inline-flex shrink-0 items-center justify-center" aria-label="Working" data-state="closed" data-slot="tooltip-trigger"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Working"><span data-agent-spinner="" class="agent-working-spinner block rounded-full border-2 border-agent-working border-t-transparent motion-reduce:border-t-agent-working size-1.5"></span></span></span><span class="block min-w-0 flex-1 overflow-hidden text-[11px] leading-snug transition-[height] duration-200 ease-out [interpolate-size:allow-keywords] h-[1lh] truncate font-normal text-muted-foreground" title="Review the parser">Review the parser</span><span class="max-w-24 shrink-0 truncate font-mono text-[10px] text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="relative ml-auto flex h-5 shrink-0 items-center justify-end w-12"><span class="pointer-events-none shrink-0 text-[10px] leading-none text-muted-foreground/60" aria-hidden="true">10m ago</span></span></div><div data-agent-row-tool-slot="" class="mt-0.5 min-w-0 pl-5 text-[10px] leading-snug text-muted-foreground/70"><span data-agent-row-tool-placeholder="true" aria-hidden="true" class="block h-[1lh]"></span></div><div class="mt-0.5 pl-5 text-[10px] leading-snug text-muted-foreground/70"> </div></div>",
+ "<div class="agent-disclosure-row group/agent-row relative -ml-2 flex flex-col py-1 px-2 cursor-pointer rounded-sm worktree-agent-row-hover" title="started 10m ago"><div class="flex items-center gap-1.5"><span class="inline-flex shrink-0 items-center justify-center" aria-label="Working" data-state="closed" data-slot="tooltip-trigger"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Working"><span data-agent-spinner="" class="agent-working-spinner block rounded-full border-2 border-agent-working border-t-transparent motion-reduce:border-t-agent-working size-1.5"></span></span></span><span class="block min-w-0 flex-1 overflow-hidden text-[11px] leading-snug transition-[height] duration-200 ease-out [interpolate-size:allow-keywords] h-[1lh] truncate font-normal text-muted-foreground" title="Review the parser">Review the parser</span><span class="max-w-24 shrink-0 truncate font-mono text-3xs text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="relative ml-auto flex h-5 shrink-0 items-center justify-end w-12"><span class="pointer-events-none shrink-0 text-[10px] leading-none text-muted-foreground/60" aria-hidden="true">10m ago</span></span></div><div data-agent-row-tool-slot="" class="mt-0.5 min-w-0 pl-5 text-[10px] leading-snug text-muted-foreground/70"><span data-agent-row-tool-placeholder="true" aria-hidden="true" class="block h-[1lh]"></span></div><div class="mt-0.5 pl-5 text-[10px] leading-snug text-muted-foreground/70"> </div></div>",
"<div class="agent-disclosure-row group/agent-row relative -ml-2 flex flex-col py-1 px-2 cursor-pointer rounded-sm worktree-agent-row-hover" title="started 8m ago"><div class="flex items-center gap-1.5"><span class="inline-flex shrink-0 items-center justify-center" aria-label="Working" data-state="closed" data-slot="tooltip-trigger"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Working"><span data-agent-spinner="" class="agent-working-spinner block rounded-full border-2 border-agent-working border-t-transparent motion-reduce:border-t-agent-working size-1.5"></span></span></span><span class="block min-w-0 flex-1 overflow-hidden text-[11px] leading-snug transition-[height] duration-200 ease-out [interpolate-size:allow-keywords] h-[1lh] truncate font-normal text-muted-foreground" title="Explore">Explore</span><span class="relative ml-auto flex h-5 shrink-0 items-center justify-end w-12"><span class="pointer-events-none shrink-0 text-[10px] leading-none text-muted-foreground/60" aria-hidden="true">8m ago</span></span></div><div data-agent-row-tool-slot="" class="mt-0.5 min-w-0 pl-5 text-[10px] leading-snug text-muted-foreground/70"><span data-agent-row-tool-placeholder="true" aria-hidden="true" class="block h-[1lh]"></span></div><div class="mt-0.5 pl-5 text-[10px] leading-snug text-muted-foreground/70"> </div></div>",
"<div class="agent-disclosure-row group/agent-row relative -ml-2 flex flex-col py-1 px-2 cursor-pointer rounded-sm worktree-agent-row-hover" title="started 16m ago"><div class="flex items-center gap-1.5"><span class="inline-flex shrink-0 items-center justify-center" aria-label="Working" data-state="closed" data-slot="tooltip-trigger"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Working"><span data-agent-spinner="" class="agent-working-spinner block rounded-full border-2 border-agent-working border-t-transparent motion-reduce:border-t-agent-working size-1.5"></span></span></span><span class="block min-w-0 flex-1 overflow-hidden text-[11px] leading-snug transition-[height] duration-200 ease-out [interpolate-size:allow-keywords] h-[1lh] truncate font-normal text-muted-foreground" title="Working">Working</span><span class="relative ml-auto flex h-5 shrink-0 items-center justify-end w-12"><span class="pointer-events-none shrink-0 text-[10px] leading-none text-muted-foreground/60" aria-hidden="true">16m ago</span></span></div><div data-agent-row-tool-slot="" class="mt-0.5 min-w-0 pl-5 text-[10px] leading-snug text-muted-foreground/70"><span data-agent-row-tool-placeholder="true" aria-hidden="true" class="block h-[1lh]"></span></div><div class="mt-0.5 pl-5 text-[10px] leading-snug text-muted-foreground/70"> </div></div>",
"<div class="agent-disclosure-row group/agent-row relative -ml-2 flex flex-col py-1 px-2 cursor-pointer rounded-sm worktree-agent-row-hover" title="started 6m ago"><div class="flex items-center gap-1.5"><span class="inline-flex shrink-0 items-center justify-center" aria-label="Waiting for input" data-state="closed" data-slot="tooltip-trigger"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="Waiting for input"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-message-circle-question-mark text-agent-question size-2.5" aria-hidden="true"><path d="M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719"></path><path d="M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"></path><path d="M12 17h.01"></path></svg></span></span><span class="block min-w-0 flex-1 overflow-hidden text-[11px] leading-snug transition-[height] duration-200 ease-out [interpolate-size:allow-keywords] h-[1lh] truncate font-normal text-muted-foreground" title="Approve edits">Approve edits</span><span class="relative ml-auto flex h-5 shrink-0 items-center justify-end w-12"><span class="pointer-events-none shrink-0 text-[10px] leading-none text-muted-foreground/60" aria-hidden="true">6m ago</span></span></div><div class="mt-0.5 pl-5 text-[10px] leading-snug text-muted-foreground/70"> </div></div>",
@@ -40,7 +40,7 @@ exports[`sidebar child rows from a legacy subagents snapshot > render the full r
exports[`sidebar child rows from a legacy subagents snapshot > render the full rows exactly as before 2`] = `
[
- "<div class="agent-disclosure-row group/agent-row relative -ml-2 flex flex-col py-1 px-2 cursor-pointer rounded-sm worktree-agent-row-hover" title="No update in 5m • started 10m ago"><div class="flex items-center gap-1.5"><span class="inline-flex shrink-0 items-center justify-center" aria-label="No update in 5m" data-state="closed" data-slot="tooltip-trigger"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span></span><span class="block min-w-0 flex-1 overflow-hidden text-[11px] leading-snug transition-[height] duration-200 ease-out [interpolate-size:allow-keywords] h-[1lh] truncate font-normal text-muted-foreground" title="Review the parser">Review the parser</span><span class="max-w-24 shrink-0 truncate font-mono text-[10px] text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="relative ml-auto flex h-5 shrink-0 items-center justify-end w-12"><span class="pointer-events-none shrink-0 text-[10px] leading-none text-muted-foreground/60" aria-hidden="true">No update in 5m</span></span></div><div class="mt-0.5 pl-5 text-[10px] leading-snug text-muted-foreground/70"> </div></div>",
+ "<div class="agent-disclosure-row group/agent-row relative -ml-2 flex flex-col py-1 px-2 cursor-pointer rounded-sm worktree-agent-row-hover" title="No update in 5m • started 10m ago"><div class="flex items-center gap-1.5"><span class="inline-flex shrink-0 items-center justify-center" aria-label="No update in 5m" data-state="closed" data-slot="tooltip-trigger"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span></span><span class="block min-w-0 flex-1 overflow-hidden text-[11px] leading-snug transition-[height] duration-200 ease-out [interpolate-size:allow-keywords] h-[1lh] truncate font-normal text-muted-foreground" title="Review the parser">Review the parser</span><span class="max-w-24 shrink-0 truncate font-mono text-3xs text-muted-foreground/70" title="claude-sonnet">claude-sonnet</span><span class="relative ml-auto flex h-5 shrink-0 items-center justify-end w-12"><span class="pointer-events-none shrink-0 text-[10px] leading-none text-muted-foreground/60" aria-hidden="true">No update in 5m</span></span></div><div class="mt-0.5 pl-5 text-[10px] leading-snug text-muted-foreground/70"> </div></div>",
"<div class="agent-disclosure-row group/agent-row relative -ml-2 flex flex-col py-1 px-2 cursor-pointer rounded-sm worktree-agent-row-hover" title="No update in 5m • started 8m ago"><div class="flex items-center gap-1.5"><span class="inline-flex shrink-0 items-center justify-center" aria-label="No update in 5m" data-state="closed" data-slot="tooltip-trigger"><span class="inline-flex shrink-0 items-center justify-center h-2.5 w-2.5" aria-label="No recent update"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-circle-dashed text-amber-500 size-2.5" aria-hidden="true"><path d="M10.1 2.182a10 10 0 0 1 3.8 0"></path><path d="M13.9 21.818a10 10 0 0 1-3.8 0"></path><path d="M17.609 3.721a10 10 0 0 1 2.69 2.7"></path><path d="M2.182 13.9a10 10 0 0 1 0-3.8"></path><path d="M20.279 17.609a10 10 0 0 1-2.7 2.69"></path><path d="M21.818 10.1a10 10 0 0 1 0 3.8"></path><path d="M3.721 6.391a10 10 0 0 1 2.7-2.69"></path><path d="M6.391 20.279a10 10 0 0 1-2.69-2.7"></path></svg></span></span><span class="block min-w-0 flex-1 overflow-hidden text-[11px] leading-snug transition-[height] duration-200 ease-out [interpolate-size:allow-keywords] h-[1lh] truncate font-normal text-muted-foreground" title="Explore">Explore</span><span class="relative ml-auto flex h-5 shrink-0 items-center justify-end w-12"><span class="pointer-events-none shrink-0 text-[10px] leading-none text-muted-foreground/60" aria-hidden="true">No update in 5m</span></span></div><div class="mt-0.5 pl-5 text-[10px] leading-snug text-muted-foreground/70"> </div></div>",
]
`;
diff --git a/src/renderer/src/components/sidebar/use-worktree-agent-display.ts b/src/renderer/src/components/sidebar/use-worktree-agent-display.ts
new file mode 100644
index 00000000000..8bd2e9bdb0f
--- /dev/null
+++ b/src/renderer/src/components/sidebar/use-worktree-agent-display.ts
@@ -0,0 +1,12 @@
+import { useShallow } from 'zustand/react/shallow'
+import { useAppStore } from '@/store'
+import { DEFAULT_AGENT_ACTIVITY_DISPLAY_MODE } from '../../../../shared/constants'
+
+export function useWorktreeAgentDisplay() {
+ return useAppStore(
+ useShallow((s) => ({
+ agentActivityDisplayMode: s.agentActivityDisplayMode ?? DEFAULT_AGENT_ACTIVITY_DISPLAY_MODE,
+ showAgentModels: s.showAgentModels !== false
+ }))
+ )
+}
diff --git a/src/renderer/src/components/sidebar/worktree-agent-display-subscription.test.tsx b/src/renderer/src/components/sidebar/worktree-agent-display-subscription.test.tsx
new file mode 100644
index 00000000000..b0c62e5f502
--- /dev/null
+++ b/src/renderer/src/components/sidebar/worktree-agent-display-subscription.test.tsx
@@ -0,0 +1,70 @@
+// @vitest-environment happy-dom
+import { act } from 'react'
+import { createRoot } from 'react-dom/client'
+import { describe, expect, it } from 'vitest'
+import { useAppStore } from '@/store'
+import { useWorktreeAgentDisplay } from './use-worktree-agent-display'
+
+Reflect.set(globalThis, 'IS_REACT_ACT_ENVIRONMENT', true)
+
+describe('worktree agent display subscription', () => {
+ it('ignores unrelated writes and bounds selection work to the mounted cards', () => {
+ const original = useAppStore.getState()
+ const operations: number[] = []
+ try {
+ for (const count of [10, 100]) {
+ let reads = 0
+ let renders = 0
+ useAppStore.setState(
+ {
+ ...original,
+ agentActivityDisplayMode: 'compact',
+ get showAgentModels() {
+ reads += 1
+ return true
+ }
+ },
+ true
+ )
+ function Card() {
+ const display = useWorktreeAgentDisplay()
+ renders += 1
+ return <span>{String(display.showAgentModels)}</span>
+ }
+ const container = document.createElement('div')
+ const root = createRoot(container)
+ try {
+ act(() => root.render(Array.from({ length: count }, (_, index) => <Card key={index} />)))
+ renders = 0
+ reads = 0
+ act(() =>
+ useAppStore.setState(
+ {
+ ...useAppStore.getState(),
+ uiZoomLevel: original.uiZoomLevel + 1,
+ get showAgentModels() {
+ reads += 1
+ return true
+ }
+ },
+ true
+ )
+ )
+ expect(renders).toBe(0)
+ expect(reads).toBeLessThanOrEqual(count * 2)
+ operations.push(reads)
+ act(() => useAppStore.setState({ showAgentModels: false }))
+ expect(renders).toBe(count)
+ expect(container.textContent).toBe('false'.repeat(count))
+ act(() => useAppStore.setState({ agentActivityDisplayMode: 'full' }))
+ expect(renders).toBe(count * 2)
+ } finally {
+ act(() => root.unmount())
+ }
+ }
+ expect(operations[1]).toBeLessThanOrEqual(operations[0] * 10)
+ } finally {
+ useAppStore.setState(original, true)
+ }
+ })
+})
diff --git a/src/renderer/src/components/sidebar/worktree-agent-models.test.tsx b/src/renderer/src/components/sidebar/worktree-agent-models.test.tsx
new file mode 100644
index 00000000000..c90bd15a9d6
--- /dev/null
+++ b/src/renderer/src/components/sidebar/worktree-agent-models.test.tsx
@@ -0,0 +1,324 @@
+// @vitest-environment happy-dom
+import { act, type ReactNode } from 'react'
+import { createRoot, type Root } from 'react-dom/client'
+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
+import { useAppStore } from '@/store'
+import { hydratePersistedUIAfterStartupRead } from '@/lib/startup-ui-hydration'
+import { registerSettingsAndSidebarIpcBridge } from '@/hooks/ipc-events/settings-sidebar-ipc-bridge'
+import { createWebUiApi } from '@/web/preload-api/web-ui-api'
+import { writeStoredRuntimeEnvironment } from '@/web/web-preload-api-test-harness'
+import { FEATURE_INTERACTION_IDS } from '../../../../shared/feature-interactions'
+import type { PersistedUIState } from '../../../../shared/persisted-ui-state-types'
+import { makePersistedUI } from '@/store/slices/ui-slice-test-harness'
+import wslMoveAgentModelUI from '../../../../shared/__fixtures__/wsl-move-agent-model-ui.json'
+import WorktreeCardAgents from './WorktreeCardAgents'
+import {
+ WorktreeCardDisplayMenuItem,
+ WorktreeCardPropertiesMenuItem
+} from './worktree-card-option-items'
+import { clearWorktreeAgentExpansionStateForTests } from './worktree-card-agents-expansion-state'
+import type { AgentStatusEntry } from '../../../../shared/agent-status-types'
+import type { TerminalTab } from '../../../../shared/terminal-tab-types'
+import { TooltipProvider } from '@/components/ui/tooltip'
+import { buildWorktreeAgentRows } from './worktree-agent-rows'
+
+vi.mock('@/components/dashboard/use-agent-row-conversation-name', () => ({
+ useAgentRowConversationName: () => null
+}))
+vi.mock('./CacheTimer', () => ({
+ default: () => null,
+ usePromptCacheCountdownForPane: () => null
+}))
+
+const NOW = 2000
+const LEAF = '11111111-1111-4111-8111-111111111111'
+function tab(id: string): TerminalTab {
+ return {
+ id,
+ ptyId: null,
+ worktreeId: 'folder-1',
+ title: 'Claude',
+ customTitle: null,
+ color: null,
+ sortOrder: 0,
+ createdAt: 1
+ }
+}
+function entry(id: string): AgentStatusEntry {
+ return {
+ paneKey: `${id}:${LEAF}`,
+ state: 'working',
+ agentType: 'claude',
+ prompt: 'Review',
+ updatedAt: NOW,
+ stateStartedAt: 1000,
+ stateHistory: [],
+ model: ' reported-model '
+ }
+}
+
+function sourceRows() {
+ const parent = entry('hook')
+ parent.subagents = [
+ {
+ id: 'child',
+ state: 'working',
+ startedAt: 1500,
+ model: 'child-model',
+ description: 'Child review'
+ }
+ ]
+ return buildWorktreeAgentRows({
+ tabs: [tab('hook'), tab('title')],
+ entries: [parent, { ...entry('orphan'), worktreeId: 'folder-1', tabId: 'orphan' }],
+ retained: [
+ {
+ entry: entry('retained'),
+ tab: tab('retained'),
+ worktreeId: 'folder-1',
+ agentType: 'claude',
+ startedAt: 1000
+ }
+ ],
+ ptyIdsByTabId: { hook: ['hook-pty'], title: ['title-pty'] },
+ runtimePaneTitlesByTabId: { title: { 1: '✳ Claude Code' } },
+ terminalLayoutsByTabId: {
+ title: { root: { type: 'leaf', leafId: LEAF }, activeLeafId: LEAF, expandedLeafId: null }
+ },
+ now: NOW
+ })
+}
+
+Reflect.set(globalThis, 'IS_REACT_ACT_ENVIRONMENT', true)
+
+// Keep portal/disclosure mechanics out of this fixture; production menus, store and rows stay mounted.
+vi.mock('@/components/ui/dropdown-menu', () => {
+ const content = ({ children }: { children?: ReactNode }) => <div>{children}</div>
+ return {
+ DropdownMenuCheckboxItem: ({
+ children,
+ checked,
+ disabled,
+ onCheckedChange
+ }: {
+ children?: ReactNode
+ checked?: boolean
+ disabled?: boolean
+ onCheckedChange?: (checked: boolean) => void
+ }) => (
+ <button
+ disabled={disabled}
+ role="menuitemcheckbox"
+ aria-checked={checked}
+ onClick={() => onCheckedChange?.(!checked)}
+ >
+ {children}
+ </button>
+ ),
+ DropdownMenuLabel: content,
+ DropdownMenuRadioGroup: content,
+ DropdownMenuRadioItem: content,
+ DropdownMenuSeparator: () => <hr />,
+ DropdownMenuSub: content,
+ DropdownMenuSubContent: content,
+ DropdownMenuSubTrigger: content
+ }
+})
+const transport = vi.hoisted(() => ({ call: vi.fn() }))
+vi.mock('@/web/preload-api/web-runtime-calls', () => ({ callRuntimeResult: transport.call }))
+vi.mock('@/hooks/use-now', () => ({ useNow: () => NOW }))
+
+const originalState = useAppStore.getState()
+let root: Root
+let container: HTMLDivElement
+let stateChanged: ((ui: PersistedUIState) => void) | undefined
+let unsubs: (() => void)[]
+const setUI = vi.fn().mockResolvedValue(undefined)
+
+function controls(): HTMLButtonElement[] {
+ return [
+ ...container.querySelectorAll<HTMLButtonElement>('button[role="menuitemcheckbox"]')
+ ].filter((button) => button.textContent === 'Agent model')
+}
+
+function mount(): void {
+ const rows = sourceRows()
+ expect(rows).toHaveLength(5)
+ expect(rows.find((row) => row.tab.id === 'title')?.entry.model).toBeUndefined()
+ expect(
+ rows
+ .filter((row) => row.entry.model)
+ .map((row) => row.rowSource)
+ .sort()
+ ).toEqual(['live', 'live', 'retained', 'subagent'])
+ act(() =>
+ root.render(
+ <TooltipProvider>
+ <WorktreeCardPropertiesMenuItem preserveWorkspaceBoardOpen={false} />
+ <WorktreeCardDisplayMenuItem preserveWorkspaceBoardOpen={false} />
+ <WorktreeCardAgents worktreeId="folder-1" agents={rows} />
+ </TooltipProvider>
+ )
+ )
+ expect(controls()).toHaveLength(2)
+}
+
+function expectVisibleModels(visible: boolean): void {
+ for (const mode of ['compact', 'full'] as const) {
+ act(() => useAppStore.setState({ agentActivityDisplayMode: mode }))
+ if (mode === 'compact') {
+ const expand = container.querySelector<HTMLButtonElement>('button[aria-label^="Expand "]')
+ if (expand) {
+ act(() => expand.click())
+ }
+ expect(container.querySelector('.compact-agent-summary-panel-expanded')).not.toBeNull()
+ }
+ const tree = container.querySelector('[role="tree"]')
+ expect(tree).not.toBeNull()
+ expect(tree?.querySelectorAll('span.font-mono[title]')).toHaveLength(visible ? 4 : 0)
+ expect(tree?.querySelectorAll('[title="reported-model"]')).toHaveLength(visible ? 3 : 0)
+ expect(
+ tree?.querySelectorAll('.worktree-agent-lineage-children [title="child-model"]')
+ ).toHaveLength(visible ? 1 : 0)
+ for (const control of controls()) {
+ expect(control.getAttribute('aria-checked')).toBe(String(visible))
+ }
+ }
+}
+
+beforeEach(() => {
+ useAppStore.setState({ ...originalState, persistedUIReady: false, showAgentModels: true }, true)
+ window.localStorage.clear()
+ transport.call.mockReset()
+ setUI.mockClear()
+ unsubs = []
+ stateChanged = undefined
+ clearWorktreeAgentExpansionStateForTests()
+ Object.defineProperty(window, 'api', {
+ configurable: true,
+ value: {
+ ui: {
+ ...createWebUiApi(),
+ set: setUI,
+ onStateChanged: (callback: (ui: PersistedUIState) => void) => {
+ stateChanged = callback
+ return () => {
+ stateChanged = undefined
+ }
+ }
+ },
+ settings: { onChanged: () => () => {} }
+ }
+ })
+ container = document.createElement('div')
+ document.body.appendChild(container)
+ root = createRoot(container)
+})
+
+afterEach(() => {
+ act(() => root.unmount())
+ unsubs.forEach((unsub) => unsub())
+ container.remove()
+ useAppStore.setState(originalState, true)
+ window.localStorage.clear()
+ clearWorktreeAgentExpansionStateForTests()
+})
+
+describe('agent model visibility across persisted UI consumers', () => {
+ it.each([undefined, false])(
+ 'hydrates a delayed profile (%s), toggles both menus and consumes live snapshots',
+ async (saved) => {
+ let finishRead: (ui: PersistedUIState) => void = () => {
+ throw new Error('Read not started')
+ }
+ const read = new Promise<PersistedUIState>((resolve) => {
+ finishRead = resolve
+ })
+ window.api.ui.get = () => read
+ registerSettingsAndSidebarIpcBridge(unsubs)
+ mount()
+ for (const control of controls()) {
+ expect(control.disabled).toBe(true)
+ act(() => control.click())
+ }
+ expect(setUI).not.toHaveBeenCalled()
+ expect(useAppStore.getState().persistedUIReady).toBe(false)
+ const loaded = window.api.ui.get().then((persistedUI) =>
+ hydratePersistedUIAfterStartupRead({
+ persistedUI,
+ cancelled: false,
+ hydratePersistedUI: useAppStore.getState().hydratePersistedUI
+ })
+ )
+ await act(async () => {
+ const persisted = makePersistedUI({ showAgentModels: saved })
+ if (saved === undefined) {
+ delete persisted.showAgentModels
+ }
+ finishRead(persisted)
+ await loaded
+ })
+ for (const control of controls()) {
+ expect(control.disabled).toBe(false)
+ }
+ expectVisibleModels(saved !== false)
+ for (const index of [0, 1]) {
+ act(() => controls()[index].click())
+ expect(setUI).toHaveBeenLastCalledWith({ showAgentModels: saved === false })
+ expectVisibleModels(saved === false)
+ act(() => controls()[index].click())
+ expectVisibleModels(saved !== false)
+ }
+ // Exercise the registered production desktop broadcast callback, in both directions.
+ expect(stateChanged).toBeTypeOf('function')
+ act(() => stateChanged?.(makePersistedUI({ showAgentModels: false })))
+ expectVisibleModels(false)
+ act(() => stateChanged?.(makePersistedUI({})))
+ expectVisibleModels(true)
+ }
+ )
+
+ it('consumes browser get and feature results without letting host snapshots choose local visibility', async () => {
+ writeStoredRuntimeEnvironment(window.localStorage)
+ const ui = createWebUiApi()
+ mount()
+ for (const local of [undefined, false]) {
+ for (const host of [true, undefined]) {
+ const hostUI = makePersistedUI({ showAgentModels: host, sidebarWidth: 365 })
+ if (host === undefined) {
+ delete hostUI.showAgentModels
+ }
+ transport.call.mockResolvedValue({ ui: hostUI })
+ for (const read of [
+ () => ui.get(),
+ () => ui.recordFeatureInteraction(FEATURE_INTERACTION_IDS[0])
+ ]) {
+ window.localStorage.setItem('orca.web.ui.v1', JSON.stringify({ showAgentModels: local }))
+ const snapshot = await read()
+ expect(snapshot.sidebarWidth).toBe(365)
+ act(() => useAppStore.getState().hydratePersistedUI(snapshot))
+ expectVisibleModels(local !== false)
+ expect(
+ JSON.parse(window.localStorage.getItem('orca.web.ui.v1') ?? '{}').showAgentModels
+ ).toBe(local !== false)
+ }
+ }
+ }
+ expect(transport.call).toHaveBeenCalledWith('ui.get', undefined, 15_000)
+ expect(transport.call).toHaveBeenCalledWith(
+ 'ui.recordFeatureInteraction',
+ FEATURE_INTERACTION_IDS[0],
+ 15_000
+ )
+ })
+
+ it('preserves hidden desktop models after scoped WSL projection and routing rewrite', () => {
+ mount()
+ act(() =>
+ useAppStore
+ .getState()
+ .hydratePersistedUI(makePersistedUI(wslMoveAgentModelUI.desktopAfterMove))
+ )
+ expectVisibleModels(false)
+ })
+})
diff --git a/src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx b/src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
index 2d2528a80b6..634171435cb 100644
--- a/src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
+++ b/src/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsx
@@ -88,6 +88,7 @@ function getCompactAgentTime(agent: DashboardAgentRowData, now: number): string
}
type CompactAgentRowProps = {
+ showModel?: boolean
agent: DashboardAgentRowData
now: number
parentConversationDescription?: string
@@ -107,6 +108,7 @@ type CompactAgentRowProps = {
export const CompactAgentRow = React.memo(function CompactAgentRow({
agent,
+ showModel = true,
now,
parentConversationDescription,
onActivate,
@@ -250,10 +252,10 @@ export const CompactAgentRow = React.memo(function CompactAgentRow({
</span>
</>
)}
- {model && (
+ {showModel && model && (
<span
className={cn(
- 'min-w-0 max-w-24 truncate font-mono text-[10px]',
+ 'min-w-0 max-w-24 truncate font-mono text-3xs',
highlighted ? 'text-foreground/70' : 'text-muted-foreground/70'
)}
title={model}
diff --git a/src/renderer/src/components/sidebar/worktree-card-option-items.test.tsx b/src/renderer/src/components/sidebar/worktree-card-option-items.test.tsx
index ae19209767d..91612243765 100644
--- a/src/renderer/src/components/sidebar/worktree-card-option-items.test.tsx
+++ b/src/renderer/src/components/sidebar/worktree-card-option-items.test.tsx
@@ -13,6 +13,8 @@ import {
const setWorktreeCardMode = vi.fn()
const setWorktreeCardProperties = vi.fn()
const setAgentActivityDisplayMode = vi.fn()
+const setShowAgentModels = vi.fn()
+let showAgentModels: boolean | undefined
let settings = { compactWorktreeCards: false, experimentalNewWorktreeCardStyle: false }
let projectGroups: unknown[] = []
@@ -33,6 +35,9 @@ vi.mock('@/store', () => ({
useAppStore: (selector: (state: unknown) => unknown) =>
selector({
agentActivityDisplayMode: 'compact',
+ persistedUIReady: true,
+ showAgentModels,
+ setShowAgentModels,
projectGroups,
setAgentActivityDisplayMode,
setWorktreeCardMode,
@@ -141,6 +146,8 @@ beforeEach(() => {
'ports',
'inline-agents'
]
+ showAgentModels = undefined
+ setShowAgentModels.mockReset()
setAgentActivityDisplayMode.mockReset()
setWorktreeCardMode.mockReset()
setWorktreeCardProperties.mockReset()
@@ -157,6 +164,30 @@ afterEach(() => {
})
describe('worktree card menu items', () => {
+ it.each([false, true])(
+ 'toggles model badges in the existing property menu (new style: %s)',
+ (newStyle) => {
+ settings.experimentalNewWorktreeCardStyle = newStyle
+ renderMenu()
+ const button = [...document.querySelectorAll('button')].find(
+ (candidate) => candidate.textContent === 'Agent model'
+ )
+ expect(button?.dataset.checked).toBe('true')
+ act(() => button?.click())
+ expect(setShowAgentModels).toHaveBeenCalledWith(false)
+ showAgentModels = false
+ act(() => root?.unmount())
+ root = null
+ renderMenu()
+ const hiddenButton = [...document.querySelectorAll('button')].find(
+ (candidate) =>
+ candidate.textContent === 'Agent model' && candidate.dataset.checked === 'false'
+ )
+ act(() => hiddenButton?.click())
+ expect(setShowAgentModels).toHaveBeenLastCalledWith(true)
+ }
+ )
+
it('applies the compact card mode preset from the visible card layout menu', () => {
renderMenu()
diff --git a/src/renderer/src/components/sidebar/worktree-card-option-items.tsx b/src/renderer/src/components/sidebar/worktree-card-option-items.tsx
index 84dcb847f7f..e91a882abd0 100644
--- a/src/renderer/src/components/sidebar/worktree-card-option-items.tsx
+++ b/src/renderer/src/components/sidebar/worktree-card-option-items.tsx
@@ -42,6 +42,22 @@ function useToggleCardProperty(): (property: WorktreeCardProperty, checked: bool
)
}
+function AgentModelProperty(): React.JSX.Element {
+ const showAgentModels = useAppStore((s) => s.showAgentModels !== false)
+ const persistedUIReady = useAppStore((s) => s.persistedUIReady)
+ const setShowAgentModels = useAppStore((s) => s.setShowAgentModels)
+ return (
+ <DropdownMenuCheckboxItem
+ checked={showAgentModels}
+ disabled={!persistedUIReady}
+ onCheckedChange={(checked) => setShowAgentModels(checked === true)}
+ onSelect={(e) => e.preventDefault()}
+ >
+ {translate('sidebar.cardProperties.agentModel', 'Agent model')}
+ </DropdownMenuCheckboxItem>
+ )
+}
+
/** "Card display": the experimental card style's property rows. */
export function WorktreeCardDisplayMenuItem({
preserveWorkspaceBoardOpen
@@ -74,6 +90,7 @@ export function WorktreeCardDisplayMenuItem({
{opt.label}
</DropdownMenuCheckboxItem>
))}
+ <AgentModelProperty />
</DropdownMenuSubContent>
</DropdownMenuSub>
)
@@ -168,6 +185,7 @@ export function WorktreeCardPropertiesMenuItem({
{opt.label}
</DropdownMenuCheckboxItem>
))}
+ <AgentModelProperty />
<DropdownMenuSeparator />
<DropdownMenuLabel>
{translate(
diff --git a/src/renderer/src/i18n/locales/en.json b/src/renderer/src/i18n/locales/en.json
index 5981443df3d..e46ac0176a9 100644
--- a/src/renderer/src/i18n/locales/en.json
+++ b/src/renderer/src/i18n/locales/en.json
@@ -205,6 +205,9 @@
"needsAttention_one": "{{count}} agent needs attention",
"needsAttention_other": "All {{count}} agents needs attention"
}
+ },
+ "cardProperties": {
+ "agentModel": "Agent model"
}
},
"app": {
diff --git a/src/renderer/src/store/slices/ui/ui-slice-contract-preferences.ts b/src/renderer/src/store/slices/ui/ui-slice-contract-preferences.ts
index 9520aab8b44..fb438c82ab1 100644
--- a/src/renderer/src/store/slices/ui/ui-slice-contract-preferences.ts
+++ b/src/renderer/src/store/slices/ui/ui-slice-contract-preferences.ts
@@ -94,6 +94,8 @@ export type UISlicePreferences = {
_worktreeCardModeDefaulted: boolean
setWorktreeCardMode: (mode: WorktreeCardMode) => void
setWorktreeCardProperties: (properties: readonly WorktreeCardProperty[]) => void
+ showAgentModels: boolean
+ setShowAgentModels: (show: boolean) => void
agentActivityDisplayMode: AgentActivityDisplayMode
setAgentActivityDisplayMode: (mode: AgentActivityDisplayMode) => void
workspaceStatuses: WorkspaceStatusDefinition[]
diff --git a/src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts b/src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts
index 41ec9955024..8abb346a7a8 100644
--- a/src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts
+++ b/src/renderer/src/store/slices/ui/ui-slice-hydration-actions.ts
@@ -177,6 +177,7 @@ export function createUiHydrationActions(set: UISliceSet, _get: UISliceGet): Par
editorFontZoomLevel: ui.editorFontZoomLevel ?? 0,
worktreeCardProperties: normalizeWorktreeCardProperties(ui.worktreeCardProperties),
_worktreeCardModeDefaulted: ui._worktreeCardModeDefaulted === true,
+ showAgentModels: ui.showAgentModels !== false,
agentActivityDisplayMode: normalizeAgentActivityDisplayMode(ui.agentActivityDisplayMode),
workspaceStatuses: normalizeWorkspaceStatuses(ui.workspaceStatuses),
workspaceBoardOpacity: clampWorkspaceBoardOpacity(ui.workspaceBoardOpacity),
diff --git a/src/renderer/src/store/slices/ui/ui-slice-preference-actions.ts b/src/renderer/src/store/slices/ui/ui-slice-preference-actions.ts
index 4bed57a7acb..ef5cfaf8f2f 100644
--- a/src/renderer/src/store/slices/ui/ui-slice-preference-actions.ts
+++ b/src/renderer/src/store/slices/ui/ui-slice-preference-actions.ts
@@ -195,6 +195,11 @@ export function createUiPreferenceActions(set: UISliceSet, get: UISliceGet): Par
.set({ worktreeCardProperties: normalized, _worktreeCardModeDefaulted: false })
.catch(console.error)
},
+ showAgentModels: true,
+ setShowAgentModels: (show) => {
+ set({ showAgentModels: show })
+ window.api.ui.set({ showAgentModels: show }).catch(console.error)
+ },
agentActivityDisplayMode: DEFAULT_AGENT_ACTIVITY_DISPLAY_MODE,
setAgentActivityDisplayMode: (mode) => {
const normalized = normalizeAgentActivityDisplayMode(mode)
diff --git a/src/renderer/src/web/preload-api/web-preference-normalization.ts b/src/renderer/src/web/preload-api/web-preference-normalization.ts
index 24707b0fb82..b3d0875bfbc 100644
--- a/src/renderer/src/web/preload-api/web-preference-normalization.ts
+++ b/src/renderer/src/web/preload-api/web-preference-normalization.ts
@@ -78,6 +78,7 @@ export function mergeHostWebUIState(
manualRepoOrder: local.manualRepoOrder,
workspaceHostOrder: local.workspaceHostOrder,
sidebarOpen: local.sidebarOpen,
+ showAgentModels: local.showAgentModels !== false,
agentsVisibleHostIds: local.agentsVisibleHostIds,
agentsFilterRepoIds: local.agentsFilterRepoIds,
agentsHideWorkspacesFromOtherDevices: local.agentsHideWorkspacesFromOtherDevices === true,
diff --git a/src/renderer/src/web/web-preload-api-ui-pairing-local-fields.test.ts b/src/renderer/src/web/web-preload-api-ui-pairing-local-fields.test.ts
index 94e1329d980..c4b9eeccaa6 100644
--- a/src/renderer/src/web/web-preload-api-ui-pairing-local-fields.test.ts
+++ b/src/renderer/src/web/web-preload-api-ui-pairing-local-fields.test.ts
@@ -41,6 +41,7 @@ describe('web UI preload API pairing-local fields', () => {
manualRepoOrder: [{ hostId: 'runtime:web-env-1', repoId: 'repo-b' }],
workspaceHostOrder: ['runtime:web-env-1', 'local'],
sidebarOpen: false,
+ showAgentModels: false,
agentsVisibleHostIds: ['runtime:web-env-1'],
agentsFilterRepoIds: ['repo-b'],
agentsHideWorkspacesFromOtherDevices: true,
@@ -60,6 +61,7 @@ describe('web UI preload API pairing-local fields', () => {
manualRepoOrder: [{ hostId: 'local', repoId: 'repo-a' }],
workspaceHostOrder: ['local', 'ssh:box'],
sidebarOpen: true,
+ showAgentModels: true,
agentsVisibleHostIds: ['local'],
agentsFilterRepoIds: ['repo-a'],
agentsHideWorkspacesFromOtherDevices: false,
diff --git a/src/shared/__fixtures__/wsl-move-agent-model-ui.json b/src/shared/__fixtures__/wsl-move-agent-model-ui.json
new file mode 100644
index 00000000000..340440e9477
--- /dev/null
+++ b/src/shared/__fixtures__/wsl-move-agent-model-ui.json
@@ -0,0 +1,24 @@
+{
+ "desktopBeforeMove": {
+ "lastActiveWorktreeId": null,
+ "collapsedGroups": [],
+ "showAgentModels": false,
+ "showDotfilesByWorktree": {
+ "repo-a::\\\\wsl.localhost\\Ubuntu\\home\\dev\\app": true
+ }
+ },
+ "projectedProjectUI": {
+ "showDotfilesByWorktree": {
+ "repo-a::\\\\wsl.localhost\\Ubuntu\\home\\dev\\app": true
+ }
+ },
+ "desktopAfterMove": {
+ "lastActiveWorktreeId": null,
+ "collapsedGroups": [],
+ "showAgentModels": false,
+ "showDotfilesByWorktree": {
+ "repo-a::\\\\wsl.localhost\\Ubuntu\\home\\dev\\app": true,
+ "repo-a::/home/dev/app": true
+ }
+ }
+}
diff --git a/src/shared/constants.ts b/src/shared/constants.ts
index 842d2811567..494a7b4a68e 100644
--- a/src/shared/constants.ts
+++ b/src/shared/constants.ts
@@ -216,6 +216,7 @@ export function getDefaultUIState(): PersistedUIState {
editorFontZoomLevel: 0,
worktreeCardProperties: [...DEFAULT_WORKTREE_CARD_PROPERTIES],
_worktreeCardModeDefaulted: true,
+ showAgentModels: true,
agentActivityDisplayMode: DEFAULT_AGENT_ACTIVITY_DISPLAY_MODE,
workspaceStatuses: cloneDefaultWorkspaceStatuses(),
workspaceBoardOpacity: 1,
diff --git a/src/shared/pairing-local-ui-fields.test.ts b/src/shared/pairing-local-ui-fields.test.ts
index a931db05ca5..ebfc6e2329a 100644
--- a/src/shared/pairing-local-ui-fields.test.ts
+++ b/src/shared/pairing-local-ui-fields.test.ts
@@ -7,6 +7,7 @@ describe('pairing-local UI fields', () => {
hideWorkspacesFromOtherDevices: true,
manualRepoOrder: [{ hostId: 'local' as const, repoId: 'repo-a' }],
workspaceHostOrder: ['local' as const],
+ showAgentModels: false,
sidebarWidth: 280,
activeView: 'tasks' as const
}
diff --git a/src/shared/pairing-local-ui-fields.ts b/src/shared/pairing-local-ui-fields.ts
index 588d8dd28fb..47347e21368 100644
--- a/src/shared/pairing-local-ui-fields.ts
+++ b/src/shared/pairing-local-ui-fields.ts
@@ -11,6 +11,8 @@ export const PAIRING_LOCAL_UI_FIELDS = [
'workspaceHostOrder',
// A phone-width browser and a desktop window each choose their own left sidebar, and old hosts reject the unknown key.
'sidebarOpen',
+ // Sidebar model badges are a client display choice; older hosts reject the new key.
+ 'showAgentModels',
// Agent View filters and presentation belong to each client's host catalog and viewport.
'agentsVisibleHostIds',
'agentsFilterRepoIds',
diff --git a/src/shared/persisted-ui-state-types.ts b/src/shared/persisted-ui-state-types.ts
index 2ac523eb7dc..05b92d92932 100644
--- a/src/shared/persisted-ui-state-types.ts
+++ b/src/shared/persisted-ui-state-types.ts
@@ -110,6 +110,7 @@ export type PersistedUIState = {
worktreeCardProperties: WorktreeCardProperty[]
/** One-shot migration flag for deriving card properties from the two worktree card modes. */
_worktreeCardModeDefaulted?: boolean
+ showAgentModels?: boolean
agentActivityDisplayMode?: AgentActivityDisplayMode
workspaceStatuses?: WorkspaceStatusDefinition[]
workspaceBoardOpacity?: number
diff --git a/src/shared/rpc-contract/client-ui-params.ts b/src/shared/rpc-contract/client-ui-params.ts
index 93e1ce159cc..4ec7bb6e335 100644
--- a/src/shared/rpc-contract/client-ui-params.ts
+++ b/src/shared/rpc-contract/client-ui-params.ts
@@ -172,6 +172,7 @@ export const UiUpdateFields = z
editorFontZoomLevel: z.number().finite().optional(),
worktreeCardProperties: WorktreeCardProperties.optional(),
_worktreeCardModeDefaulted: z.boolean().optional(),
+ showAgentModels: z.boolean().optional(),
agentActivityDisplayMode: AgentActivityDisplayMode.optional(),
workspaceStatuses: z.array(WorkspaceStatusDefinition).optional(),
workspaceBoardOpacity: z.number().finite().optional(),
diff --git a/src/shared/wsl-move/wsl-move-ui-dispositions.ts b/src/shared/wsl-move/wsl-move-ui-dispositions.ts
index 8e33f507781..7f79c467d8b 100644
--- a/src/shared/wsl-move/wsl-move-ui-dispositions.ts
+++ b/src/shared/wsl-move/wsl-move-ui-dispositions.ts
@@ -110,6 +110,7 @@ export const UI_STATE_GLOBAL_FIELDS = [
'editorFontZoomLevel',
'worktreeCardProperties',
'_worktreeCardModeDefaulted',
+ 'showAgentModels',
'agentActivityDisplayMode',
'workspaceStatuses',
'workspaceBoardOpacity',