TypeScript
fix(web): pinned thread marker stays put when hovering the row (#11122)
oliver9bb7d5801705
diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsxindex 454f8f45f68..7f912cfef5e 100644--- a/apps/web/src/components/Sidebar.tsx+++ b/apps/web/src/components/Sidebar.tsx@@ -2212,7 +2212,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowPonPointerDown={handleActionPointerDown}className={cn("pointer-events-none absolute inset-y-0 right-0 -mr-1 inline-flex cursor-pointer items-center gap-1 rounded-md bg-transparent px-1.5 text-xs text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:pointer-events-auto focus-visible:opacity-100 group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:opacity-100",- isWoke && "group-any-hover/sidebar-row:static",+ isWoke && "static",)}><AlarmClockOffIcon className="mb-px size-3" />@@ -2229,7 +2229,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowPonPointerDown={handleActionPointerDown}className={cn("pointer-events-none absolute inset-y-0 right-0 -mr-1 inline-flex cursor-pointer items-center gap-1 rounded-md bg-transparent px-1.5 text-xs text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:pointer-events-auto focus-visible:opacity-100 group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:opacity-100",- isWoke && "group-any-hover/sidebar-row:static",+ isWoke && "static",)}/>}@@ -2246,7 +2246,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowPonPointerDown={handleActionPointerDown}className={cn("pointer-events-none absolute inset-y-0 right-0 inline-flex cursor-pointer items-center gap-1 rounded-md bg-transparent px-2 text-xs text-muted-foreground opacity-0 transition-opacity hover:text-foreground focus-visible:pointer-events-auto focus-visible:opacity-100 group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:opacity-100",- isWoke && "group-any-hover/sidebar-row:static",+ isWoke && "static",)}><CheckIcon className="size-3" />@@ -2314,12 +2314,13 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP<span className="flex-1" />)}{pinIndicator}+ {/* Reserve both states' widths so revealing actions cannot move the pin or Woke label. */}{sortable?.isDragging ? (dragDestination) : (<spanclassName={cn(- "group/sidebar-status-slot relative ml-auto flex h-5 min-w-8 shrink-0 items-stretch justify-end text-xs",+ "group/sidebar-status-slot ml-auto grid h-5 min-w-8 shrink-0 items-stretch justify-end text-xs",props.sweepAction !== null && "hidden",)}>@@ -2327,9 +2328,9 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowPclassName={cn(isWokeStatus? "pointer-events-auto"- : "pointer-events-none group-has-[:focus-visible]/sidebar-status-slot:absolute group-has-[:focus-visible]/sidebar-status-slot:right-0 group-has-[:focus-visible]/sidebar-status-slot:opacity-0 group-any-hover/sidebar-row:absolute group-any-hover/sidebar-row:right-0 group-any-hover/sidebar-row:opacity-0",- "flex items-center self-center justify-self-end tabular-nums text-secondary-label transition-opacity",- snoozeMenuOpen && "pointer-events-none absolute right-0 opacity-0",+ : "pointer-events-none group-has-[:focus-visible]/sidebar-status-slot:opacity-0 group-any-hover/sidebar-row:opacity-0",+ "flex items-center self-center justify-self-end tabular-nums text-secondary-label transition-opacity [grid-area:1/1]",+ snoozeMenuOpen && "pointer-events-none opacity-0",)}>{topStatus ? (@@ -2400,8 +2401,9 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: SidebarThreadRowP// would keep the controls pinned over the status label// once the pointer moves away (e.g. after a failed// settle) instead of cross-fading back.- "pointer-events-none absolute inset-y-0 right-0 flex items-stretch opacity-0 transition-opacity has-[:focus-visible]:pointer-events-auto has-[:focus-visible]:static has-[:focus-visible]:opacity-100 group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:static group-any-hover/sidebar-row:opacity-100",- snoozeMenuOpen && "pointer-events-auto static opacity-100",+ "pointer-events-none flex items-stretch justify-self-end opacity-0 transition-opacity has-[:focus-visible]:pointer-events-auto has-[:focus-visible]:opacity-100 group-any-hover/sidebar-row:pointer-events-auto group-any-hover/sidebar-row:opacity-100",+ isWokeStatus ? "[grid-area:1/2]" : "[grid-area:1/1]",+ snoozeMenuOpen && "pointer-events-auto opacity-100",)}>{hasUnsentDraft ? (