@@ -14,18 +14,7 @@ import {
1414 threadListInboxReturns ,
1515} from "./threadListV2" ;
1616import { computeThreadMoveAvailability } from "./threadOrder" ;
17-
18- /**
19- * Screens' select handlers read the content-only key set; a fresh one per list rebuild gave
20- * every row a new handler whenever any thread shell changed. Keyed by a string, the set keeps
21- * its identity until its keys change.
22- */
23- function useKeySet ( newlineSeparatedKeys : string ) : ReadonlySet < string > {
24- return useMemo (
25- ( ) => new Set ( newlineSeparatedKeys . length === 0 ? [ ] : newlineSeparatedKeys . split ( "\n" ) ) ,
26- [ newlineSeparatedKeys ] ,
27- ) ;
28- }
17+ import { useKeySet } from "./useKeySet" ;
2918
3019type LayoutInput = Parameters < typeof buildThreadListV2Items > [ 0 ] ;
3120
@@ -71,9 +60,7 @@ export function useThreadListV2(input: {
7160 const disconnectedEnvironmentIds = useKeySet (
7261 useWorkspaceEnvironments ( )
7362 . filter ( ( environment ) => isThreadListV2EnvironmentDisconnected ( environment . connectionState ) )
74- . map ( ( environment ) => environment . environmentId )
75- . sort ( )
76- . join ( "\n" ) ,
63+ . map ( ( environment ) => environment . environmentId ) ,
7764 ) ;
7865 // Up/down menu availability for every card, computed once per section per
7966 // rebuild (see computeThreadMoveAvailability): per-thread planner calls made
@@ -141,7 +128,7 @@ export function useThreadListV2(input: {
141128 ) ,
142129 } ) ;
143130 useOlderSettledShelfGrowth ( olderSettledShelf , layout . listedSettledThreads ) ;
144- const contentOnlyThreadKeys = useKeySet ( [ ...layout . contentOnlyThreadKeys ] . sort ( ) . join ( "\n" ) ) ;
131+ const contentOnlyThreadKeys = useKeySet ( [ ...layout . contentOnlyThreadKeys ] ) ;
145132 const scopedProjectKeys =
146133 input . projectRefs == null
147134 ? null
0 commit comments