diff --git a/web/src/components/HoverTooltip.tsx b/web/src/components/HoverTooltip.tsx index e984030d..a34007d4 100644 --- a/web/src/components/HoverTooltip.tsx +++ b/web/src/components/HoverTooltip.tsx @@ -57,6 +57,7 @@ export function HoverTooltip(props: { return ( & { id: string; kind: Pe } describe('SessionAttentionIndicator tooltip', () => { + it('keeps background tooltips left-anchored while pending tooltips stay inside the right edge', () => { + const pending = renderWithI18n( + + ) + expect(screen.getByRole('tooltip', { hidden: true })).toHaveClass('right-0') + expect(screen.getByRole('tooltip', { hidden: true })).not.toHaveClass('left-0') + pending.unmount() + + renderWithI18n( + + ) + expect(screen.getByRole('tooltip', { hidden: true })).toHaveClass('left-0') + expect(screen.getByRole('tooltip', { hidden: true })).not.toHaveClass('right-0') + }) + it('renders permission tooltip body listing each pending tool', () => { const summary = makeSummary({ id: 's1', diff --git a/web/src/components/SessionAttentionIndicator.tsx b/web/src/components/SessionAttentionIndicator.tsx index b27796d5..7090afd5 100644 --- a/web/src/components/SessionAttentionIndicator.tsx +++ b/web/src/components/SessionAttentionIndicator.tsx @@ -61,7 +61,7 @@ export function SessionAttentionIndicator(props: { id={props.tooltipId} target={dot} side="bottom" - align="start" + align={kind === 'background' ? 'start' : 'end'} className="shrink-0" revealOnParentFocusClass={SESSION_ROW_TOOLTIP_FOCUS_CLASS} > diff --git a/web/src/components/SessionRowSummary.test.tsx b/web/src/components/SessionRowSummary.test.tsx index 7be12892..54aa8be3 100644 --- a/web/src/components/SessionRowSummary.test.tsx +++ b/web/src/components/SessionRowSummary.test.tsx @@ -580,6 +580,7 @@ describe('SessionRowSummary time label', () => { ) expect(screen.getByText('just now')).toBeInTheDocument() + expect(screen.getByText('just now')).toHaveClass('translate-y-[0.5px]') act(() => { vi.advanceTimersByTime(2 * 60_000) }) expect(screen.getByText('2m ago')).toBeInTheDocument() diff --git a/web/src/components/SessionRowSummary.tsx b/web/src/components/SessionRowSummary.tsx index cd7c1266..f7e0b5bf 100644 --- a/web/src/components/SessionRowSummary.tsx +++ b/web/src/components/SessionRowSummary.tsx @@ -325,7 +325,7 @@ export function SessionRowSummary(props: { ) : null} {timeLabel ? ( - {timeLabel} ) : null} diff --git a/web/src/index.css b/web/src/index.css index 763d93f0..f7ce2bc8 100644 --- a/web/src/index.css +++ b/web/src/index.css @@ -519,6 +519,15 @@ html:has(.chat-scroll-y) #root { opacity: 1; } +/* Hover tooltips are absolutely positioned inside a row, but the collapsible + * shell must keep overflow hidden during its height animation. Once a row + * tooltip is active, let that shell expose it so the tooltip's lower edge is + * not clipped by the group boundary. */ +.collapsible-panel[data-open] > .collapsible-inner:has([data-hover-tooltip-anchor]:hover), +.collapsible-panel[data-open] > .collapsible-inner:has(.session-list-item:focus-visible) { + overflow: visible; +} + /* Scale content area to use available space on wide screens */ @media (min-width: 1280px) { :root {