diff --git a/apps/desktop/src/app/chat/sidebar/chrome.tsx b/apps/desktop/src/app/chat/sidebar/chrome.tsx index 8e2da48782..d931c323de 100644 --- a/apps/desktop/src/app/chat/sidebar/chrome.tsx +++ b/apps/desktop/src/app/chat/sidebar/chrome.tsx @@ -55,7 +55,9 @@ export function SidebarDateDivider({ className, label, ...props }: React.Compone ) } -/** Outer grid — sole owner of row height. */ +/** Outer grid — sole owner of row height. The trailing `actions` slot is + * marked `data-row-actions` so a row-wide drag gesture can exclude it with + * one selector: it holds real controls, never grab surface. */ export function SidebarRowShell({ actions, children, @@ -65,7 +67,11 @@ export function SidebarRowShell({ return (
{children} - {actions ?
{actions}
: null} + {actions ? ( +
+ {actions} +
+ ) : null}
) } diff --git a/apps/desktop/src/app/chat/sidebar/projects/overview-row.tsx b/apps/desktop/src/app/chat/sidebar/projects/overview-row.tsx index 210d861617..aedd2e6e09 100644 --- a/apps/desktop/src/app/chat/sidebar/projects/overview-row.tsx +++ b/apps/desktop/src/app/chat/sidebar/projects/overview-row.tsx @@ -125,6 +125,18 @@ export function ProjectOverviewRow({ } className={cn('group/workspace', dragging && 'cursor-grabbing bg-(--ui-sidebar-surface-background)')} + // The label is grab surface too, not just the lead's grabber — same + // listeners, minus the controls that keep their own gestures. A project + // row has no rival drag (its title navigates on CLICK), so the sortable + // owns the press outright. + {...dragHandleProps} + onPointerDown={event => { + if ((event.target as HTMLElement).closest('[data-reorder-handle], [data-row-actions]')) { + return + } + + dragHandleProps?.onPointerDown?.(event) + }} ref={rowRef} > @@ -141,6 +153,7 @@ export function ProjectOverviewRow({