Skip to content

Commit 4935f0a

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 0c13320 commit 4935f0a

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
@@ -1676,11 +1676,20 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
16761676
type="button"
16771677
aria-label="Unpin thread"
16781678
onClick={handleUnpinClick}
1679-
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"
1679+
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"
16801680
/>
16811681
}
16821682
>
1683-
<PinIcon aria-hidden className="size-3 shrink-0" />
1683+
{/* Pin marks the pinned state at rest; hover and focus swap in pin-off so the
1684+
icon reads as the action the button performs. */}
1685+
<PinIcon
1686+
aria-hidden
1687+
className="size-3 shrink-0 group-hover/unpin:hidden group-focus-visible/unpin:hidden"
1688+
/>
1689+
<PinOffIcon
1690+
aria-hidden
1691+
className="hidden size-3 shrink-0 group-hover/unpin:block group-focus-visible/unpin:block"
1692+
/>
16841693
</TooltipTrigger>
16851694
<TooltipPopup>Unpin thread</TooltipPopup>
16861695
</Tooltip>

0 commit comments

Comments
 (0)