+ {showHeaderCollapseAffordance ? (
+ {
+ event.preventDefault()
+ event.stopPropagation()
+ toggleGroupWithScrollAnchor(row.key)
+ }}
+ >
+
+
+ ) : null}
+
{isProjectGroupHeader && !row.repo && row.projectGroup?.id ? (
diff --git a/src/renderer/src/components/sidebar/project-header-drag-contract.ts b/src/renderer/src/components/sidebar/project-header-drag-contract.ts
index 18662d5f25e..c8e3bc1465a 100644
--- a/src/renderer/src/components/sidebar/project-header-drag-contract.ts
+++ b/src/renderer/src/components/sidebar/project-header-drag-contract.ts
@@ -48,7 +48,7 @@ export const PROJECT_HEADER_DRAG_THRESHOLD_PX = 4
const REPO_HEADER_DRAG_HANDLE_SELECTOR = '[data-repo-header-drag-handle]'
const REPO_HEADER_ACTION_SELECTOR =
- '[data-repo-header-action], button, a, input, textarea, select, [contenteditable=""], [contenteditable="true"]'
+ '[data-repo-header-action], [data-repo-header-collapse-affordance], button, a, input, textarea, select, [contenteditable=""], [contenteditable="true"]'
export function isProjectHeaderDragHandleTarget(
target: EventTarget | null,
diff --git a/src/renderer/src/components/sidebar/project-header-drag.test.ts b/src/renderer/src/components/sidebar/project-header-drag.test.ts
index b53a4e868bc..2ef27043fd6 100644
--- a/src/renderer/src/components/sidebar/project-header-drag.test.ts
+++ b/src/renderer/src/components/sidebar/project-header-drag.test.ts
@@ -34,4 +34,14 @@ describe('repo header action targets', () => {
expect(isRepoHeaderActionTarget(header.querySelector('#label'), header)).toBe(false)
expect(isRepoHeaderActionTarget(header, header)).toBe(false)
})
+
+ it('ignores the hover collapse affordance', () => {
+ const header = createHeader(`
+
+
+
+ `)
+
+ expect(isRepoHeaderActionTarget(header.querySelector('#chevron'), header)).toBe(true)
+ })
})
diff --git a/src/renderer/src/components/sidebar/project-header-drag.ts b/src/renderer/src/components/sidebar/project-header-drag.ts
index ac84dc620be..0dbbb655907 100644
--- a/src/renderer/src/components/sidebar/project-header-drag.ts
+++ b/src/renderer/src/components/sidebar/project-header-drag.ts
@@ -53,7 +53,7 @@ export type RepoHeaderDragController = {
// real drag. Below this we treat the press as a normal click (toggle group).
const DRAG_THRESHOLD_PX = 4
const REPO_HEADER_ACTION_SELECTOR =
- '[data-repo-header-action], button, a, input, textarea, select, [contenteditable=""], [contenteditable="true"]'
+ '[data-repo-header-action], [data-repo-header-collapse-affordance], button, a, input, textarea, select, [contenteditable=""], [contenteditable="true"]'
export function isRepoHeaderActionTarget(
target: EventTarget | null,
diff --git a/src/renderer/src/components/sidebar/worktree-card-compact-agents.tsx b/src/renderer/src/components/sidebar/worktree-card-compact-agents.tsx
index 3f43b3b62f8..8eb6dc8a594 100644
--- a/src/renderer/src/components/sidebar/worktree-card-compact-agents.tsx
+++ b/src/renderer/src/components/sidebar/worktree-card-compact-agents.tsx
@@ -1,5 +1,5 @@
import React, { useCallback, useRef } from 'react'
-import { ChevronRight } from 'lucide-react'
+import { ChevronDown } from 'lucide-react'
import { AgentStateDot } from '@/components/AgentStateDot'
import type { DashboardAgentRow as DashboardAgentRowData } from '@/components/dashboard/useDashboardData'
import { AgentIcon } from '@/lib/agent-catalog'
@@ -179,8 +179,11 @@ export function CompactAgentSummaryButton({
)}
>
)}
-