Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(sidebar): 仅在文件夹和机器收起时显示运行呼吸
Lizi652a2ee0b08b
diff --git a/apps/desktop/src/renderer/__tests__/botGroupLampRendering.test.tsx b/apps/desktop/src/renderer/__tests__/botGroupLampRendering.test.tsxindex 74631314e2..416a07b447 100644--- a/apps/desktop/src/renderer/__tests__/botGroupLampRendering.test.tsx+++ b/apps/desktop/src/renderer/__tests__/botGroupLampRendering.test.tsx@@ -218,7 +218,7 @@ describe('Bot groups across devices', () => {expectLamp(deviceHeader('Device A'), null);const a = deviceHeader('Device A').parentElement!;const b = deviceHeader('Device B').parentElement!;- expectLamp(deviceHeader('Device B'), phase);+ expectLamp(deviceHeader('Device B'), phase === 'running' ? null : phase);expectLamp(botHeader(a), null);expectLamp(botHeader(b), phase);expect(within(a).queryByTestId('row-lit')).toBeNull();@@ -230,6 +230,12 @@ describe('Bot groups across devices', () => {expect(p.onSessionClick).toHaveBeenCalledWith('lit');fireEvent.click(within(b).getByRole('button', { name: 'bots.sidebar.newTaskWith' }));expect(p.onOpenBot).toHaveBeenCalledWith('demo');+ fireEvent.click(deviceHeader('Device B'));+ expect(deviceHeader('Device B').getAttribute('aria-expanded')).toBe('false');+ expectLamp(deviceHeader('Device B'), phase);+ fireEvent.click(deviceHeader('Device B'));+ expect(deviceHeader('Device B').getAttribute('aria-expanded')).toBe('true');+ expectLamp(deviceHeader('Device B'), phase === 'running' ? null : phase);});it('keeps show-all state per device and stable across task reorder and Bot rename', () => {diff --git a/apps/desktop/src/renderer/__tests__/projectLampMerge.test.tsx b/apps/desktop/src/renderer/__tests__/projectLampMerge.test.tsxindex 4a7fab6c41..3b8150ba39 100644--- a/apps/desktop/src/renderer/__tests__/projectLampMerge.test.tsx+++ b/apps/desktop/src/renderer/__tests__/projectLampMerge.test.tsx@@ -77,13 +77,13 @@ describe('project lamp after upstream sidebar merge', () => {expect(header.querySelector('.session-status-breathing')).not.toBeNull();});- it('leaves expanded project attention to its child rows', () => {+ it('leaves expanded project attention and running state to its child rows', () => {const { container } = render(<ProjectNode{...props()}isCollapsed={false}collapsedAttentionTone="error"- lamp={{ running: false, dotTone: 'error' }}+ lamp={{ running: true, dotTone: 'error' }}/>,);const header = container.querySelector('[data-project-header]')!;diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsxindex 85d852eb84..dfdf99a3c1 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectNode.tsx@@ -94,8 +94,9 @@ export interface ProjectNodeProps {*/hideRemoteMachineLabel?: boolean;/**- * 项目行运行灯:文件夹图标呼吸橙。未读仍走上游既定的 collapsedAttentionTone- * 右侧状态槽,不在标题旁重复显示。聚合集合由父层按实际渲染的会话提供。+ * 项目行运行灯:仅收起时文件夹图标呼吸橙,展开后由子任务提示运行状态。+ * 未读仍走 collapsedAttentionTone 右侧状态槽,不在标题旁重复显示。+ * 聚合集合由父层按实际渲染的会话提供。*/lamp?: SessionLampAggregate;/** 透传给项目内 SessionEntryList 的折叠豁免追加集合(语义见其 prop 注释)。 */@@ -427,11 +428,11 @@ const ProjectHeader = memo(function ProjectHeader({!isEditingName && 'hover:bg-sidebar-item-hover',)}>- {/* 灯语与 rail 浮层面板项目行同款:running → 呼吸橙(动画挂 wrapper)。 */}+ {/* 仅收起时汇总运行态,避免与展开的子任务同时呼吸(动画挂 wrapper)。 */}<spanclassName={cn('inline-flex shrink-0',- lamp?.running+ isCollapsed && lamp?.running? 'text-[var(--status-bar-accent)] session-status-breathing': 'text-[var(--sidebar-list-muted)]',)}diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsxindex f5fefce58d..70bc2149a9 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/sections/ProjectsSection.tsx@@ -1138,11 +1138,12 @@ export function ProjectsSection({) : (<ChevronDown size={12} strokeWidth={2} className="shrink-0" />)}- {/* 段内任一 running → 设备图标呼吸橙(rail 段钮同款灯语)。 */}+ {/* 设备段收起时才用图标呼吸提示内部运行态,展开后由下层内容提示。 */}<spanclassName={cn('inline-flex shrink-0',- sectionLamp.running &&+ sectionCollapsed &&+ sectionLamp.running &&'text-[var(--status-bar-accent)] session-status-breathing',)}>