@@ -70,6 +70,7 @@ import {
7070import {
7171 ThreadListV2PendingRow ,
7272 ThreadListV2Row ,
73+ ThreadListV2SettledShelfHeader ,
7374 ThreadListV2SnoozedShelfHeader ,
7475} from "./thread-list-v2-items" ;
7576import {
@@ -440,6 +441,8 @@ function ThreadNavigationSidebarPane(
440441 ) ;
441442 const [ snoozedShelfExpanded , setSnoozedShelfExpanded ] = useState ( false ) ;
442443 const toggleSnoozedShelf = useCallback ( ( ) => setSnoozedShelfExpanded ( ( value ) => ! value ) , [ ] ) ;
444+ const [ settledShelfExpanded , setSettledShelfExpanded ] = useState ( true ) ;
445+ const toggleSettledShelf = useCallback ( ( ) => setSettledShelfExpanded ( ( value ) => ! value ) , [ ] ) ;
443446 // now ticks per minute so the inactivity auto-settle boundary is actually
444447 // crossed while the pane stays open; without a clock dependency the
445448 // partition memoizes a frozen "now".
@@ -485,6 +488,8 @@ function ThreadNavigationSidebarPane(
485488 hiddenSettledCount : 0 ,
486489 snoozedCount : 0 ,
487490 snoozedShelfHeaderIndex : null ,
491+ settledCount : 0 ,
492+ settledShelfHeaderIndex : null ,
488493 nextSnoozeWakeAt : null ,
489494 } ;
490495 return buildThreadListV2Items ( {
@@ -500,13 +505,15 @@ function ThreadNavigationSidebarPane(
500505 now : `${ nowMinute } :00.000Z` ,
501506 snoozeNow : new Date ( ) . toISOString ( ) ,
502507 snoozedShelfExpanded,
508+ settledShelfExpanded,
503509 selectedThreadKey : props . selectedThreadKey ?? null ,
504510 } ) ;
505511 } , [
506512 changeRequestStateByKey ,
507513 nowMinute ,
508514 snoozeWakeTick ,
509515 snoozedShelfExpanded ,
516+ settledShelfExpanded ,
510517 props . selectedThreadKey ,
511518 options . selectedEnvironmentId ,
512519 props . searchQuery ,
@@ -557,9 +564,12 @@ function ThreadNavigationSidebarPane(
557564 snoozedCount : threadListV2Layout . snoozedCount ,
558565 snoozedShelfExpanded,
559566 snoozedShelfHeaderIndex : threadListV2Layout . snoozedShelfHeaderIndex ,
567+ settledCount : threadListV2Layout . settledCount ,
568+ settledShelfExpanded,
569+ settledShelfHeaderIndex : threadListV2Layout . settledShelfHeaderIndex ,
560570 snoozeLabelNow : `${ nowMinute } :00.000Z` ,
561571 } ) ;
562- if ( threadListV2Layout . hiddenSettledCount > 0 ) {
572+ if ( settledShelfExpanded && threadListV2Layout . hiddenSettledCount > 0 ) {
563573 items . push ( {
564574 type : "v2-show-more" ,
565575 key : "v2-show-more" ,
@@ -574,6 +584,7 @@ function ThreadNavigationSidebarPane(
574584 pendingTasks ,
575585 props . searchQuery ,
576586 selectedProjectRefs ,
587+ settledShelfExpanded ,
577588 snoozedShelfExpanded ,
578589 threadListV2Enabled ,
579590 threadListV2Layout ,
@@ -780,7 +791,6 @@ function ThreadNavigationSidebarPane(
780791 previous . key === item . key &&
781792 previous . item . thread === item . item . thread &&
782793 previous . item . variant === item . item . variant &&
783- previous . item . showSettledDivider === item . item . showSettledDivider &&
784794 previous . item . snoozed === item . item . snoozed &&
785795 previous . snoozeWakeLabelText === item . snoozeWakeLabelText
786796 ) ;
@@ -797,15 +807,20 @@ function ThreadNavigationSidebarPane(
797807 if ( previous . type === "v2-snoozed-shelf" && item . type === "v2-snoozed-shelf" ) {
798808 return previous . count === item . count && previous . expanded === item . expanded ;
799809 }
810+ if ( previous . type === "v2-settled-shelf" && item . type === "v2-settled-shelf" ) {
811+ return previous . count === item . count && previous . expanded === item . expanded ;
812+ }
800813 if (
801814 previous . type === "v2-thread" ||
802815 previous . type === "v2-show-more" ||
803816 previous . type === "v2-pending" ||
804817 previous . type === "v2-snoozed-shelf" ||
818+ previous . type === "v2-settled-shelf" ||
805819 item . type === "v2-thread" ||
806820 item . type === "v2-show-more" ||
807821 item . type === "v2-pending" ||
808- item . type === "v2-snoozed-shelf"
822+ item . type === "v2-snoozed-shelf" ||
823+ item . type === "v2-settled-shelf"
809824 ) {
810825 return false ;
811826 }
@@ -863,7 +878,6 @@ function ThreadNavigationSidebarPane(
863878 < ThreadListV2Row
864879 thread = { thread }
865880 variant = { item . item . variant }
866- showSettledDivider = { item . item . showSettledDivider }
867881 snoozed = { item . item . snoozed }
868882 snoozePresetMinute = { nowMinute }
869883 snoozeWakeLabelText = { item . snoozeWakeLabelText }
@@ -921,6 +935,15 @@ function ThreadNavigationSidebarPane(
921935 pane = "sidebar"
922936 />
923937 ) ;
938+ case "v2-settled-shelf" :
939+ return (
940+ < ThreadListV2SettledShelfHeader
941+ count = { item . count }
942+ expanded = { item . expanded }
943+ onToggle = { toggleSettledShelf }
944+ pane = "sidebar"
945+ />
946+ ) ;
924947 case "v2-show-more" :
925948 return (
926949 < Pressable
@@ -1039,6 +1062,7 @@ function ThreadNavigationSidebarPane(
10391062 snoozeEnvironmentIds ,
10401063 snoozeThread ,
10411064 nowMinute ,
1065+ toggleSettledShelf ,
10421066 toggleSnoozedShelf ,
10431067 unsettleThread ,
10441068 unsnoozeThread ,
0 commit comments