diff --git a/src/components/conversations/sidebar-conversation-card.test.tsx b/src/components/conversations/sidebar-conversation-card.test.tsx index f92538e0c5..fe7619d8e8 100644 --- a/src/components/conversations/sidebar-conversation-card.test.tsx +++ b/src/components/conversations/sidebar-conversation-card.test.tsx @@ -530,13 +530,13 @@ describe("SidebarConversationCard sub-session chevron", () => { expect(queryByLabelText("Expand sub-conversations")).toBeNull() }) - it("overlays the chevron on the rail axis (the agent-icon position)", () => { + it("anchors the chevron to the rail gutter", () => { const { getByLabelText } = renderCard(conv(2), { hasChildren: true, expanded: false, }) - // The chevron now sits at the agent-icon's rail-axis x (revealed on hover), - // not in the right-hand time/action slot. + // The chevron stays in the rail gutter, separate from the agent icon + // and the right-hand time/action slot. const chevron = getByLabelText("Expand sub-conversations") expect(chevron.style.left).toContain("--conv-rail-axis") }) diff --git a/src/components/conversations/sidebar-conversation-card.tsx b/src/components/conversations/sidebar-conversation-card.tsx index 9e0c4ae094..8e444f0fa9 100644 --- a/src/components/conversations/sidebar-conversation-card.tsx +++ b/src/components/conversations/sidebar-conversation-card.tsx @@ -20,6 +20,7 @@ import { CheckCircle2, Info, ChevronRight, + MessagesSquare, SquareTerminal, } from "lucide-react" import { useTranslations } from "next-intl" @@ -384,9 +385,8 @@ export const SidebarConversationCard = memo(function SidebarConversationCard({ "rounded-full", "pr-[0.25rem]" )} - // Rail-axis-relative left padding (was a fixed `pl-7`): at depth 0 - // this resolves to 0.875rem + 0.875rem = 1.75rem (= pl-7), so root - // rows are pixel-identical; deeper rows inherit the shifted var. + // Keep agent icons and titles aligned for parents and leaves. + // The child chevron occupies the gutter before the rail. style={{ paddingLeft: "calc(var(--conv-rail-axis, 0.875rem) + 0.875rem)", @@ -412,16 +412,7 @@ export const SidebarConversationCard = memo(function SidebarConversationCard({ }} />
- {/* Expand/collapse affordance for delegation children. It overlays - the agent icon at the rail axis: idle shows the icon, and - hovering (or focusing) the row swaps in this chevron at the very - same spot while the icon fades. A sibling of the row button (HTML - forbids nested buttons) with `stopPropagation` so a toggle never - selects the row; pointer events stay off until revealed so a - click on the icon area still selects the row when not hovering. */} + {/* Keep the child toggle visible in the gutter before the + agent icon. It is a sibling of the row button so expanding + a subtree never selects the conversation. */} {hasChildren && onToggleExpand && ( + )} + {/* Right slot: sizes to its content — the time / status badge normally, the two quick-action buttons (pin, done) on hover — so it never reserves more width than what is actually shown