Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(sidebar): 对齐自动任务组缩进并更新标题测试
Dashffa7cacc35a1
diff --git a/apps/desktop/src/renderer/__tests__/machineSwitcherMenu.test.ts b/apps/desktop/src/renderer/__tests__/machineSwitcherMenu.test.tsindex 865a957612..8dcea673f6 100644--- a/apps/desktop/src/renderer/__tests__/machineSwitcherMenu.test.ts+++ b/apps/desktop/src/renderer/__tests__/machineSwitcherMenu.test.ts@@ -576,7 +576,7 @@ describe('远程机器切换入口并入 SidebarTopNav(置顶段上方,固定不expect(menuSource).toContain('useRemoteSessionBootstrapLoading(selectedDeviceId)');expect(menuSource).toContain('aria-busy={remoteSessionBootstrapLoading}');expect(menuSource).toMatch(- /<span className="truncate leading-none">\{triggerText\}<\/span>\s*<ChevronDown[\s\S]*?animate-spinner motion-reduce:animate-none/,+ /<span className="truncate">\{triggerText\}<\/span>\s*<ChevronDown[\s\S]*?animate-spinner motion-reduce:animate-none/,);expect(menuSource).toContain('<Loader2 size={12} strokeWidth={1.8} />');});diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/AutomationSessionGroupItem.tsx b/apps/desktop/src/renderer/features/cc-agent/sidebar/AutomationSessionGroupItem.tsxindex 462a0a961b..bb017afd68 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/AutomationSessionGroupItem.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/AutomationSessionGroupItem.tsx@@ -507,9 +507,9 @@ export const AutomationSessionGroupItem = withSidebarNavigation<AutomationSessio}}className={cn(// list 组头与普通 SessionCard 共用 10px 内容边距;只有展开后的子任务- // 由下方 pl-3 容器额外缩进。text 模式继续沿用 SessionItem 的树形缩进。+ // 由下方 pl-2 容器增加 8px 层级缩进。text 模式沿用 SessionItem 的树形缩进。'group relative flex h-8 w-full items-center gap-1.5 rounded-full',- sessionVariant === 'list' ? 'px-2.5' : indented ? 'pl-[22px] pr-2' : 'pl-3 pr-2',+ sessionVariant === 'list' ? 'px-2.5' : indented ? 'pl-5 pr-2' : 'pl-3 pr-2','text-left text-sm font-medium',hasActiveHidden? 'bg-sidebar-item-active text-[var(--sidebar-item-active-foreground)]'@@ -846,7 +846,7 @@ export const AutomationSessionGroupItem = withSidebarNavigation<AutomationSessio</div></Tip>{hasVisibleChildren && (- <div className="flex flex-col gap-0.5 pl-3">+ <div className="flex flex-col gap-0.5 pl-2">{visibleSessions.map((session: Session, index) => {const nextSession = visibleSessions[index + 1];const nextHighlighted =diff --git a/apps/desktop/src/renderer/features/cc-agent/sidebar/__tests__/sessionCardReviewRegressions.test.ts b/apps/desktop/src/renderer/features/cc-agent/sidebar/__tests__/sessionCardReviewRegressions.test.tsindex 8ec6174629..3b851d3cde 100644--- a/apps/desktop/src/renderer/features/cc-agent/sidebar/__tests__/sessionCardReviewRegressions.test.ts+++ b/apps/desktop/src/renderer/features/cc-agent/sidebar/__tests__/sessionCardReviewRegressions.test.ts@@ -480,9 +480,9 @@ describe('SessionCard review regressions', () => {it('aligns list automation headers with regular tasks and indents only expanded children', () => {expect(automationGroupSource).toMatch(- /sessionVariant === 'list'\s*\? 'px-2\.5'\s*: indented\s*\? 'pl-\[22px\] pr-2'\s*: 'pl-3 pr-2'/,+ /sessionVariant === 'list'\s*\? 'px-2\.5'\s*: indented\s*\? 'pl-5 pr-2'\s*: 'pl-3 pr-2'/,);- expect(automationGroupSource).toContain('<div className="flex flex-col gap-0.5 pl-3">');+ expect(automationGroupSource).toContain('<div className="flex flex-col gap-0.5 pl-2">');expect(automationGroupSource).toContain("sessionVariant === 'list' ? 'w-3' : 'w-[15px]'");expect(automationGroupSource).toContain("sessionVariant === 'list' && 'order-2'");});