Skip to content

Commit 5f15fd1

Browse files
committed
fix(web): unpin button shows the pin-off icon on hover
The pinned-thread marker doubles as the unpin button but always showed the pin glyph. Hover and keyboard focus now swap in pin-off so the icon reads as the action it performs. Made by Claude Opus 5.5 in Claude Code.
1 parent daa1d0e commit 5f15fd1

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

‎apps/web/src/components/Sidebar.tsx‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1712,11 +1712,20 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
17121712
type="button"
17131713
aria-label="Unpin thread"
17141714
onClick={handleUnpinClick}
1715-
className="inline-flex cursor-pointer items-center rounded-sm text-muted-foreground/65 outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
1715+
className="group/unpin inline-flex cursor-pointer items-center rounded-sm text-muted-foreground/65 outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring"
17161716
/>
17171717
}
17181718
>
1719-
<PinIcon aria-hidden className="size-3 shrink-0" />
1719+
{/* Pin marks the pinned state at rest; hover and focus swap in pin-off so the
1720+
icon reads as the action the button performs. */}
1721+
<PinIcon
1722+
aria-hidden
1723+
className="size-3 shrink-0 group-hover/unpin:hidden group-focus-visible/unpin:hidden"
1724+
/>
1725+
<PinOffIcon
1726+
aria-hidden
1727+
className="hidden size-3 shrink-0 group-hover/unpin:block group-focus-visible/unpin:block"
1728+
/>
17201729
</TooltipTrigger>
17211730
<TooltipPopup>Unpin thread</TooltipPopup>
17221731
</Tooltip>

0 commit comments

Comments
 (0)