File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,21 +63,10 @@ describe("buildThreadActionMenuItems", () => {
6363 ...baseState ,
6464 projectFilter : { label : "Beta Project" , isActive : true } ,
6565 } ) ;
66- const item = items . find ( ( candidate ) => candidate . id === "filter-by-project" ) ;
67- expect ( item ) . toMatchObject ( { label : "Show all projects" } ) ;
68- expect ( items . map ( ( candidate ) => candidate . id ) ) . toEqual ( [
69- "pin" ,
70- "settle" ,
71- "snooze" ,
72- "rename" ,
73- "regenerate-title" ,
74- "mark-unread" ,
75- "filter-by-project" ,
76- "copy" ,
77- "project-settings" ,
78- "archive" ,
79- "delete" ,
80- ] ) ;
66+ const filterIndex = items . findIndex ( ( candidate ) => candidate . id === "filter-by-project" ) ;
67+ expect ( items [ filterIndex ] ) . toMatchObject ( { label : "Show all projects" , icon : "folder-tree" } ) ;
68+ expect ( items [ filterIndex - 1 ] ?. id ) . toBe ( "mark-unread" ) ;
69+ expect ( items [ filterIndex + 1 ] ?. id ) . toBe ( "copy" ) ;
8170 } ) ;
8271
8372 it ( "includes branch items only for threads with a branch" , ( ) => {
Original file line number Diff line number Diff line change @@ -56,8 +56,8 @@ export interface ThreadActionMenuState {
5656
5757/**
5858 * Single source for the per-thread action menu: the sidebar row's right-click
59- * menu and the chat header menu both render exactly this list, so labels,
60- * ordering, and capability gating cannot drift between the two surfaces .
59+ * menu and the chat header menu share labels, ordering, and capability gating.
60+ * Each surface supplies state for the actions it supports .
6161 */
6262export function buildThreadActionMenuItems (
6363 state : ThreadActionMenuState ,
You can’t perform that action at this time.
0 commit comments