@@ -109,6 +109,7 @@ import { getTriggerDisplayModelName } from "../chat/providerIconUtils";
109109import { shouldShowInstanceBadge , type ProviderInstanceEntry } from "../../providerInstances" ;
110110import { useThreadRunningTerminalIds } from "../../state/terminalSessions" ;
111111import { InlineButton } from "../ui/button" ;
112+ import { Kbd } from "../ui/kbd" ;
112113import { Menu , MenuItem , MenuPopup , MenuSeparator , MenuShortcut , MenuTrigger } from "../ui/menu" ;
113114import { Tooltip , TooltipPopup , TooltipTrigger } from "../ui/tooltip" ;
114115import { MiddleTruncate } from "../ui/middle-truncate" ;
@@ -150,15 +151,15 @@ function threadTimeTimestamp(thread: SidebarThreadSummary): string {
150151
151152function JumpHintBadge ( props : { label : string } ) {
152153 return (
153- < span
154- aria-hidden
155- className = "pointer-events-none absolute right-1.5 top-1/2 z-10 inline-flex h-5 -translate-y-1/2 items-center rounded-full border border-border/80 bg-background/95 px-1.5 font-mono text-3xs font-medium tracking-tight text-foreground shadow-sm"
156- >
154+ < Kbd aria-hidden data-jump-hint >
157155 { props . label }
158- </ span >
156+ </ Kbd >
159157 ) ;
160158}
161159
160+ const JUMP_HINT_SLOT_CLASS_NAME =
161+ "[&>:not([data-jump-hint])]:invisible [&>:not([data-jump-hint])]:absolute" ;
162+
162163function WorkingDuration ( props : { startedAt : string | null } ) {
163164 const startedMs = props . startedAt !== null ? Date . parse ( props . startedAt ) : Number . NaN ;
164165 if ( Number . isNaN ( startedMs ) ) return null ;
@@ -931,6 +932,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
931932 // Closing here, not just masking, keeps the menu from reopening when the button returns.
932933 if ( snoozeMenuOpenRaw && ! showSnoozeButton ) setSnoozeMenuOpen ( false ) ;
933934 const snoozeMenuOpen = snoozeMenuOpenRaw && showSnoozeButton ;
935+ const jumpHintLabel = snoozeMenuOpen ? null : props . jumpLabel ;
934936 const handlePrClick = ( event : ReactMouseEvent < HTMLElement > , targetUrl ?: string ) => {
935937 const url = targetUrl ?? pr ?. url ?? currentLinkedPr ?. url ;
936938 if ( ! url ) return ;
@@ -1262,6 +1264,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
12621264 className = { cn (
12631265 "relative ml-auto flex h-6 min-w-8 shrink-0 items-center justify-end" ,
12641266 props . sweepAction !== null && "hidden" ,
1267+ jumpHintLabel && JUMP_HINT_SLOT_CLASS_NAME ,
12651268 ) }
12661269 >
12671270 < span
@@ -1372,12 +1375,12 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
13721375 < TooltipPopup side = "top" > Settle thread</ TooltipPopup >
13731376 </ Tooltip >
13741377 ) }
1378+ { jumpHintLabel ? < JumpHintBadge label = { jumpHintLabel } /> : null }
13751379 </ span >
13761380 ) }
13771381 { props . sweepAction !== null ? dragDestination : null }
13781382 </ div >
13791383 { multiline ? metaLine : null }
1380- { props . jumpLabel ? < JumpHintBadge label = { props . jumpLabel } /> : null }
13811384 </ TooltipTrigger >
13821385 { detailsTooltip }
13831386 </ Tooltip >
@@ -1448,6 +1451,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
14481451 className = { cn (
14491452 "group/sidebar-status-slot relative ml-auto flex h-5 min-w-8 shrink-0 items-stretch justify-end text-xs" ,
14501453 props . sweepAction !== null && "hidden" ,
1454+ jumpHintLabel && JUMP_HINT_SLOT_CLASS_NAME ,
14511455 ) }
14521456 >
14531457 < span
@@ -1563,6 +1567,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
15631567 ) : null }
15641568 </ span >
15651569 ) : null }
1570+ { jumpHintLabel ? < JumpHintBadge label = { jumpHintLabel } /> : null }
15661571 </ span >
15671572 ) }
15681573 { props . sweepAction !== null ? dragDestination : null }
@@ -1578,7 +1583,6 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP
15781583 </ div >
15791584 { metaLine }
15801585 </ div >
1581- { props . jumpLabel ? < JumpHintBadge label = { props . jumpLabel } /> : null }
15821586 </ TooltipTrigger >
15831587 { detailsTooltip }
15841588 </ Tooltip >
0 commit comments