@@ -175,7 +175,7 @@ describe("buildThreadActionItems", () => {
175175 icon : null ,
176176 runThread,
177177 } ) ;
178- expect ( new Set ( items . map ( ( item ) => item . value ) ) . size ) . toBe ( 2 ) ;
178+ expect ( new Set ( items . map ( ( item ) => item . value ) ) . size ) . toBe ( 3 ) ;
179179 const remoteItem = items . find ( ( item ) => item . description === "Remote project · Current thread" ) ;
180180 await remoteItem ?. run ( ) ;
181181 expect ( runThread ) . toHaveBeenCalledWith ( remote ) ;
@@ -271,13 +271,15 @@ describe("buildThreadActionItems", () => {
271271 const threads = [
272272 makeThread ( { id : ThreadId . make ( "title" ) , title : "Disable Convex schema validation" } ) ,
273273 makeThread ( { id : ThreadId . make ( "message" ) , title : "Fix schema validation" } ) ,
274+ makeThread ( { id : ThreadId . make ( "home:managed" ) , title : "Home" } ) ,
274275 ] ;
275276 const items = buildThreadActionItems ( {
276277 threads,
277278 projectByKey : new Map ( ) ,
278279 icon : null ,
279280 runThread : async ( ) => undefined ,
280281 } ) ;
282+ expect ( items . map ( ( item ) => item . value ) ) . toContain ( "thread:environment-local:home:managed" ) ;
281283 const filter = ( threadMessageItems : typeof items ) =>
282284 filterCommandPaletteGroups ( {
283285 activeGroups : [ ] ,
@@ -290,11 +292,14 @@ describe("buildThreadActionItems", () => {
290292
291293 const before = filter ( [ ] ) ;
292294 // The server matched both; the title match stays where it was.
293- const after = filter ( [ items [ 0 ] ! , items [ 1 ] ! ] . toReversed ( ) ) ;
295+ const after = filter ( items . toReversed ( ) ) ;
294296 expect ( before ) . toEqual ( [ [ "Threads" , [ "thread:environment-local:title" ] ] ] ) ;
295297 expect ( after ) . toEqual ( [
296298 [ "Threads" , [ "thread:environment-local:title" ] ] ,
297- [ "In messages" , [ "thread:environment-local:message" ] ] ,
299+ [
300+ "In messages" ,
301+ [ "thread:environment-local:home:managed" , "thread:environment-local:message" ] ,
302+ ] ,
298303 ] ) ;
299304 } ) ;
300305
0 commit comments