File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -404,7 +404,9 @@ const SidebarV2Row = memo(function SidebarV2Row(props: {
404404 // actions: settling clears the pin server-side, and snoozing hides the
405405 // card until wake with the pin intact underneath. The pin glyph itself
406406 // is a quick-action that unpins in place; pinning lives in the context
407- // menu.
407+ // menu. Like the other lifecycle affordances it is capability-gated so
408+ // it hides rather than fails while the descriptor is not loaded.
409+ pinningSupported : boolean ;
408410 isPinned : boolean ;
409411 // Compact wake countdown ("2h") for rows in the snoozed shelf.
410412 snoozeWakeLabelText : string | null ;
@@ -999,7 +1001,7 @@ const SidebarV2Row = memo(function SidebarV2Row(props: {
9991001 ) : (
10001002 < span className = "flex-1" />
10011003 ) }
1002- { props . isPinned ? (
1004+ { props . isPinned && props . pinningSupported ? (
10031005 < button
10041006 type = "button"
10051007 aria-label = "Unpin thread"
@@ -3122,6 +3124,10 @@ export default function SidebarV2() {
31223124 serverConfigs . get ( thread . environmentId ) ?. environment . capabilities
31233125 . threadSnooze === true
31243126 }
3127+ pinningSupported = {
3128+ serverConfigs . get ( thread . environmentId ) ?. environment . capabilities
3129+ . threadPinning === true
3130+ }
31253131 isPinned = { section === "pinned" }
31263132 snoozeWakeLabelText = {
31273133 section === "snoozed" && thread . snoozedUntil != null
You can’t perform that action at this time.
0 commit comments