fix(sidebar): remove Claude subagent-view eye indicator (#34558)

* fix(sidebar): drop Claude subagent-view eye icon; badge viewed subagent only

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(sidebar): hide subagent-view indicator on collapsed rows too

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
OrcaWin
2026-10-27 15:16:02 -07:00
committed by GitHub
co-authored by Claude OrcaWin
parent 3058cdd1a8
commit ef21574a41
6 changed files with 5 additions and 91 deletions
@@ -1,63 +0,0 @@
import { Tooltip, TooltipContent, TooltipTrigger } from './ui/tooltip'
import { Eye } from 'lucide-react'
import { translate } from '@/i18n/i18n'
import type { DashboardAgentRow } from './dashboard/useDashboardData'
import { useClaudeAgentRowView } from './dashboard/use-claude-agent-row-view'
import { getAgentRowPrimaryText } from '../../../shared/agent-row-primary-text'
export function ClaudeAgentViewIndicator({
view,
showChild = true,
showName = false
}: {
view: { current: boolean; agentId?: string; child: boolean; label?: string } | null
showChild?: boolean
showName?: boolean
}) {
if (!view || (!view.current && (view.child || !showChild))) {
return null
}
const label = view.current
? translate('auto.components.ClaudeAgentViewIndicator.viewing', 'Currently viewing')
: translate(
'auto.components.ClaudeAgentViewIndicator.viewingChild',
'Viewing subagent {{name}}',
{ name: view.label }
)
return (
<Tooltip>
<TooltipTrigger asChild>
<span
className="inline-flex shrink-0 items-center gap-1 text-3xs text-foreground"
aria-label={label}
>
<Eye className="size-3" aria-hidden="true" />
{(!view.current || showName) && <span className="max-w-24 truncate">{view.label}</span>}
</span>
</TooltipTrigger>
<TooltipContent>
{label}
{view.agentId && (
<p>
{translate(
'auto.components.ClaudeAgentViewIndicator.returnHint',
'Click the parent row to return. Esc stops this subagent. Enter sends your draft to this subagent.'
)}
</p>
)}
</TooltipContent>
</Tooltip>
)
}
export function ClaudeAgentSummaryViewIndicator({ agent }: { agent: DashboardAgentRow }) {
const view = useClaudeAgentRowView(agent)
return (
<ClaudeAgentViewIndicator
showName
view={
view?.current ? { ...view, label: getAgentRowPrimaryText(agent.entry) || 'Claude' } : view
}
/>
)
}
@@ -2,7 +2,6 @@ import React, { useState, useCallback } from 'react'
import { cn } from '@/lib/utils'
import { viewClaudeAgentFromRow } from '@/lib/claude-agent-row-view'
import { useClaudeAgentRowView } from './use-claude-agent-row-view'
import { ClaudeAgentViewIndicator } from '@/components/ClaudeAgentViewIndicator'
import {
AgentStateDot,
agentStateLabel,
@@ -298,7 +297,6 @@ const DashboardAgentRow = React.memo(function DashboardAgentRow({
>
{displayLabel}
</span>
<ClaudeAgentViewIndicator view={view} showChild={!childAgentsExpanded} />
{model && (
<span
className={cn(
@@ -46,18 +46,9 @@ export function useClaudeAgentRowView(agent: DashboardAgentRow) {
if (!view) {
return null
}
const child = agent.rowSource === 'subagent'
const current = child
? view.agentId === (agent.childRow?.providerId ?? agent.childRow?.id)
: !view.agentId
const viewedChild = parent.children?.find((item) => (item.providerId ?? item.id) === view.agentId)
const legacyChild = parent.subagents?.find((item) => item.id === view.agentId)
const label =
viewedChild?.name ||
viewedChild?.description ||
viewedChild?.agentType ||
legacyChild?.description ||
legacyChild?.agentType ||
view.agentId
return { current, agentId: view.agentId, child, label, focused }
const current =
agent.rowSource === 'subagent'
? view.agentId === (agent.childRow?.providerId ?? agent.childRow?.id)
: !view.agentId
return { current, focused }
}
@@ -8,7 +8,6 @@ import { formatAgentTypeLabel } from '@/lib/agent-status'
import { cn } from '@/lib/utils'
import { viewClaudeAgentFromRow } from '@/lib/claude-agent-row-view'
import { useClaudeAgentRowView } from '@/components/dashboard/use-claude-agent-row-view'
import { ClaudeAgentViewIndicator } from '@/components/ClaudeAgentViewIndicator'
import { getAgentDotState } from './worktree-card-agent-summary'
import { getAgentRowPrimaryText } from '../../../../shared/agent-row-primary-text'
import { formatAgentToolPreview } from '@/lib/agent-row-tool-preview'
@@ -249,7 +248,6 @@ export const CompactAgentRow = React.memo(function CompactAgentRow({
</span>
</>
)}
<ClaudeAgentViewIndicator view={view} showChild={!childAgentsExpanded} />
{model && (
<span
className={cn(
@@ -11,8 +11,6 @@ import {
summarizeAgents
} from './worktree-card-agent-summary'
import { translate } from '@/i18n/i18n'
import { ClaudeAgentSummaryViewIndicator } from '@/components/ClaudeAgentViewIndicator'
import { useFocusedAgentPaneKey } from './focused-agent-row-highlight'
export { CompactAgentRow } from './worktree-card-compact-agent-row'
@@ -80,8 +78,6 @@ export function CompactAgentSummaryButton({
expanded,
onToggle
}: CompactAgentSummaryButtonProps): React.JSX.Element {
const focusedPaneKey = useFocusedAgentPaneKey(agents[0]?.tab.worktreeId ?? '')
const focusedAgent = agents.find((agent) => agent.paneKey === focusedPaneKey)
const summary = summarizeAgents(agents, subjectLabel)
const groups = buildSummaryAgentGroups(agents)
const visibleGroups = groups.slice(0, 3)
@@ -135,7 +131,6 @@ export function CompactAgentSummaryButton({
onPointerDown={stopPointerPropagation}
onDragStart={stopPointerPropagation}
>
{!expanded && focusedAgent && <ClaudeAgentSummaryViewIndicator agent={focusedAgent} />}
{expanded ? (
<span className="min-w-0 flex-1 truncate px-1 font-medium text-muted-foreground">
{subjectLabel}
-5
View File
@@ -19209,11 +19209,6 @@
"cancelled": "This plain SSH terminal was closed before it started.",
"terminalUnavailable": "Orca couldn’t open a terminal here.",
"openHint": "Keeps you working on the host while Orca can’t set up there."
},
"ClaudeAgentViewIndicator": {
"viewing": "Currently viewing",
"viewingChild": "Viewing subagent {{name}}",
"returnHint": "Click the parent row to return. Esc stops this subagent. Enter sends your draft to this subagent."
}
},
"i18n": {