diff --git a/.agents/docs/components-sidebar-session-tree.md b/.agents/docs/components-sidebar-session-tree.md index e4b288f042..8f33405d9b 100644 --- a/.agents/docs/components-sidebar-session-tree.md +++ b/.agents/docs/components-sidebar-session-tree.md @@ -147,6 +147,12 @@ with nothing competing for the right edge and more room for the title. Nothing i the diff, branch, and PR detail were already in the desktop hover info card, which is where a user goes when they want numbers rather than a glance. +The end slot reserves a 20px column per revealed action (⋯ parks left of Archive) +and, while any action is revealed, paints itself with the row's own fill — +`--sidebar-hover`, or `--sidebar-selection` under `aria-current`. Every end-slot +button, now or added later, shares that opaque layer; nothing beneath it can show +through, and the ⋯'s pressed tint shades the fill as an inset shadow. + The mobile chat rows still keep status on their leading node; their geometry (48px indent, a selection checkbox in the same slot, a chevron that has to sit outside the row button and lift above the edge-back swipe zone) is different enough that the change is a diff --git a/packages/components/src/components/AGENTS.md b/packages/components/src/components/AGENTS.md index 1dcdedc03d..de999d875e 100644 --- a/packages/components/src/components/AGENTS.md +++ b/packages/components/src/components/AGENTS.md @@ -32,7 +32,9 @@ Ancestor/scoped rules apply. `CLAUDE.md` links here; edit `AGENTS.md` only. children stay out of `sessionListAtom` rows. - Opener and unrelated top-level rows retain flat-list alignment. In the leading slot, an opener shows disclosure, a child ├/└, nothing else — the ⋯ menu reveals in the - end slot before Archive. Draw nesting regardless of hover or working/unread/waiting + end slot before Archive; the slot paints revealed actions with the row's fill. + Draw nesting + regardless of hover or working/unread/waiting status. Children alone widen the slot 14px→26px, a 12px title indent that never shifts the background. Keep geometry in `session-row-leading-slot.tsx`; context-menu expand/collapse uses the same toggle. diff --git a/packages/components/src/components/sidebar-row-shared.tsx b/packages/components/src/components/sidebar-row-shared.tsx index 14de2edd09..3b0e4ad334 100644 --- a/packages/components/src/components/sidebar-row-shared.tsx +++ b/packages/components/src/components/sidebar-row-shared.tsx @@ -632,8 +632,12 @@ export function SessionOpenedByTreeRow({ /** * ③ The hover-revealed ⋯ action. It opens the row's ordinary right-click menu from * a left click by re-dispatching `contextmenu` at its own corner, so the button and - * the right-click gesture can never diverge. `SidebarRowEndSlot` parks it one 20px - * column left of Archive (or at the right edge itself on a menu-only row). + * the right-click gesture can never diverge. `SidebarRowEndSlot` reserves its own + * 20px column left of Archive and paints its revealed-action area with the row's + * fill, so the trigger sits on the same opaque `--sidebar-hover` / + * `--sidebar-selection` as the row beneath it. The pressed tint shades that fill + * as an inset shadow rather than a translucent background-color that would let + * content through again. */ export function SessionRowMenuButton({ label, @@ -663,12 +667,13 @@ export function SessionRowMenuButton({ }} className={cn( 'flex h-5 w-5 items-center justify-center rounded-sm opacity-0 pointer-events-none', - 'text-sidebar-foreground-muted/80 transition-[opacity,color,background-color] duration-100', - 'hover:bg-sidebar-foreground/15 hover:text-sidebar-foreground', + 'text-sidebar-foreground-muted/80 transition-[opacity,color,box-shadow] duration-100', + 'hover:text-sidebar-foreground hover:shadow-[inset_0_0_0_20px_hsl(var(--sidebar-foreground)/0.15)]', 'focus-visible:outline-hidden', // The trigger itself stays pressed-looking while its menu is open, // not just the row around it. - 'group-data-[menu-open]:bg-sidebar-foreground/15 group-data-[menu-open]:text-sidebar-foreground', + 'group-data-[menu-open]:text-sidebar-foreground group-data-[menu-open]:shadow-[inset_0_0_0_20px_hsl(var(--sidebar-foreground)/0.15)]', + 'group-data-[menu-open]/row:text-sidebar-foreground group-data-[menu-open]/row:shadow-[inset_0_0_0_20px_hsl(var(--sidebar-foreground)/0.15)]', revealClassName )} > @@ -779,7 +784,9 @@ export function SidebarRowActionButton({ * The hover actions (the ⋯ menu, then Archive) are absolutely overlaid on hover, so a * wide rest cluster never causes layout movement. The slot reserves one 20px * column per action even when no rest content shows, so the ⋯ stays inside the - * row's trailing edge instead of overlaying the title. + * row's trailing edge instead of overlaying the title, and while its actions + * are revealed the slot paints itself with the row's own fill — every end-slot + * action, present or added later, is opaque over its column. */ export function SidebarRowEndSlot({ sessionId, @@ -846,11 +853,24 @@ export function SidebarRowEndSlot({ // the row's navigation; the hover action buttons re-enable pointer events on hover. // justify-end keeps a narrower resting mark's right edge exactly where the // revealed action lands, so the row's rightmost mark never shifts on hover. + // The revealed fill keeps the same color the row paints under these states: + // --sidebar-hover on hover and menu-open alike. aria-current lives on the + // same group element, so the selection overrides compound the state into + // one ancestor selector to win over the plain hover fill.