@@ -701,13 +701,8 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
701701 autoSettleOnMerge : boolean ;
702702 // Same contract for thread.snooze/unsnooze.
703703 snoozeSupported : boolean ;
704- // Renders the pin glyph. Pinned cards keep the full settle/snooze quick
705- // actions: settling clears the pin server-side, and snoozing hides the
706- // card until wake with the pin intact underneath. The glyph is also the
707- // in-row pin state cue (the pinned block has no header), so it always
708- // shows while pinned; it only becomes a clickable unpin quick-action once
709- // the pinning capability is confirmed, and stays a passive marker while
710- // the descriptor is not loaded. Pinning itself lives in the context menu.
704+ // Pinned threads show the same pin marker in active, settled, and snoozed
705+ // rows. The marker can unpin the thread when the server supports pinning.
711706 pinningSupported : boolean ;
712707 isPinned : boolean ;
713708 // Present only on pinned cards whose server supports reordering: dnd-kit
@@ -1192,6 +1187,31 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
11921187 < TerminalIcon className = { cn ( "size-3.5" , terminalStatus . pulse && "animate-status-pulse" ) } />
11931188 </ span >
11941189 ) : null ;
1190+ const pinIndicator = props . isPinned ? (
1191+ props . pinningSupported ? (
1192+ < Tooltip >
1193+ < TooltipTrigger
1194+ render = {
1195+ < button
1196+ type = "button"
1197+ aria-label = "Unpin thread"
1198+ onClick = { handleUnpinClick }
1199+ 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"
1200+ />
1201+ }
1202+ >
1203+ < PinIcon aria-hidden className = "size-3 shrink-0" />
1204+ </ TooltipTrigger >
1205+ < TooltipPopup > Unpin thread</ TooltipPopup >
1206+ </ Tooltip >
1207+ ) : (
1208+ < PinIcon
1209+ aria-label = "Pinned"
1210+ role = "img"
1211+ className = "size-3 shrink-0 text-muted-foreground/65"
1212+ />
1213+ )
1214+ ) : null ;
11951215
11961216 if ( variant === "slim" ) {
11971217 return (
@@ -1233,6 +1253,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
12331253 />
12341254 </ span >
12351255 { title }
1256+ { pinIndicator }
12361257 { terminalStatusIcon }
12371258 { isRegeneratingTitle ? (
12381259 < span role = "status" className = "sr-only" >
@@ -1395,31 +1416,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
13951416 ) : (
13961417 < span className = "flex-1" />
13971418 ) }
1398- { props . isPinned ? (
1399- props . pinningSupported ? (
1400- < Tooltip >
1401- < TooltipTrigger
1402- render = {
1403- < button
1404- type = "button"
1405- aria-label = "Unpin thread"
1406- onClick = { handleUnpinClick }
1407- 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"
1408- />
1409- }
1410- >
1411- < PinIcon aria-hidden className = "size-3 shrink-0" />
1412- </ TooltipTrigger >
1413- < TooltipPopup > Unpin thread</ TooltipPopup >
1414- </ Tooltip >
1415- ) : (
1416- < PinIcon
1417- aria-label = "Pinned"
1418- role = "img"
1419- className = "size-3 shrink-0 text-muted-foreground/65"
1420- />
1421- )
1422- ) : null }
1419+ { pinIndicator }
14231420 { /* The visible state owns this slot's width: status at rest,
14241421 actions on hover/keyboard focus or while the popover is open. Keeping
14251422 the hidden state out of flow lets the project label reclaim
@@ -2043,20 +2040,9 @@ export default function Sidebar() {
20432040 snapshot != null && ( thread . worktreePath === null || snapshot . branch === thread . branch )
20442041 ? snapshot . pr
20452042 : null ;
2046- // Snooze outranks everything, including a pin: "hide until Tuesday"
2047- // temporarily suspends "keep on top". The pin survives underneath —
2048- // and so does its pinOrderKey, so on wake the thread reappears at
2049- // its exact slot in the pinned block. (For unpinned threads
2050- // this is also the snooze-beats-auto-settle rule: the wake time is a
2051- // stronger statement about when the thread matters again.)
2043+ // Snooze outranks settlement and pinning until the thread wakes.
20522044 if ( supportsSnooze && effectiveSnoozed ( thread , { now : preciseNow } ) ) {
20532045 snoozed . push ( thread ) ;
2054- // A pin otherwise overrides the lifecycle: pinned threads never
2055- // auto-settle out of sight. (The decider clears settled state on
2056- // pin and the pin on settle, so pin-vs-settled conflicts only
2057- // arise from stale or raced writes.)
2058- } else if ( thread . pinnedAt != null ) {
2059- pinned . push ( thread ) ;
20602046 } else if (
20612047 supportsSettlement &&
20622048 effectiveSettled ( thread , {
@@ -2067,6 +2053,8 @@ export default function Sidebar() {
20672053 } )
20682054 ) {
20692055 settled . push ( thread ) ;
2056+ } else if ( thread . pinnedAt != null ) {
2057+ pinned . push ( thread ) ;
20702058 } else {
20712059 active . push ( thread ) ;
20722060 }
@@ -3697,7 +3685,7 @@ export default function Sidebar() {
36973685 serverConfigs . get ( thread . environmentId ) ?. environment . capabilities
36983686 . threadPinning === true
36993687 }
3700- isPinned = { section === "pinned" }
3688+ isPinned = { thread . pinnedAt != null }
37013689 sortable = { sortable }
37023690 snoozeWakeLabelText = {
37033691 section === "snoozed" && thread . snoozedUntil != null
0 commit comments