@@ -18,6 +18,7 @@ import { restrictToFirstScrollableAncestor, restrictToVerticalAxis } from "@dnd-
1818import { CSS } from "@dnd-kit/utilities" ;
1919import {
2020 canSnooze ,
21+ changeRequestAutoSettles ,
2122 effectiveSettled ,
2223 effectiveSnoozed ,
2324 threadWokeAt ,
@@ -649,6 +650,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
649650 // False on environments whose server predates thread.settle/unsettle:
650651 // the lifecycle affordances hide entirely rather than fail on click.
651652 settlementSupported : boolean ;
653+ autoSettleOnMerge : boolean ;
652654 // Same contract for thread.snooze/unsnooze.
653655 snoozeSupported : boolean ;
654656 // Renders the pin glyph. Pinned cards keep the full settle/snooze quick
@@ -755,17 +757,15 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
755757 // deliberately static), so the pill has to carry the weight. Snoozing is
756758 // an explicit act, so the pill clears only when the user re-engages:
757759 // reading a completion-triggered wake, clicking the pill, sending a
758- // message, settling, archiving — or finishing the work outright (merged
759- // or closed PR). Timer wakes survive a mere visit. An unparseable visit
760- // timestamp counts as never-visited — corrupt local data must not eat
761- // the wake signal.
760+ // message, settling, archiving, or a change request state that settles the
761+ // thread. Timer wakes survive a mere visit. An unparseable visit timestamp
762+ // counts as never-visited, so corrupt local data cannot eat the wake signal.
762763 const lastVisitedDate = lastVisitedAt === undefined ? null : parseTimestampDate ( lastVisitedAt ) ;
763764 const wokeAtDate = props . wokeAt === null ? null : parseTimestampDate ( props . wokeAt ) ;
764765 const isWoke =
765766 wokeAtDate !== null &&
766767 ( lastVisitedDate === null || lastVisitedDate < wokeAtDate ) &&
767- prState !== "merged" &&
768- prState !== "closed" ;
768+ ! changeRequestAutoSettles ( prState , props . autoSettleOnMerge ) ;
769769 // In-flight rows (working, or waiting on approval/input) fade as a whole:
770770 // there is nothing for the user to do yet, so prominence is reserved for
771771 // rows that need a human — done (unread), read-but-unsettled, failed, and
@@ -3448,6 +3448,7 @@ export default function Sidebar() {
34483448 serverConfigs . get ( thread . environmentId ) ?. environment . capabilities
34493449 . threadSettlement === true
34503450 }
3451+ autoSettleOnMerge = { autoSettleOnMerge }
34513452 snoozeSupported = {
34523453 serverConfigs . get ( thread . environmentId ) ?. environment . capabilities
34533454 . threadSnooze === true
0 commit comments