@@ -391,7 +391,7 @@ describe("wsNativeApi", () => {
391391 } ) ;
392392 } ) ;
393393
394- it ( "forwards context menu metadata to desktop bridge" , async ( ) => {
394+ it ( "forwards context menu items to desktop bridge without position " , async ( ) => {
395395 const showContextMenu = vi . fn ( ) . mockResolvedValue ( "delete" ) ;
396396 Object . defineProperty ( getWindowForTest ( ) , "desktopBridge" , {
397397 configurable : true ,
@@ -411,13 +411,13 @@ describe("wsNativeApi", () => {
411411 { x : 200 , y : 300 } ,
412412 ) ;
413413
414- expect ( showContextMenu ) . toHaveBeenCalledWith (
415- [
416- { id : "rename" , label : "Rename thread" } ,
417- { id : "delete" , label : "Delete" , destructive : true } ,
418- ] ,
419- { x : 200 , y : 300 } ,
420- ) ;
414+ // Position is intentionally not forwarded to the desktop bridge;
415+ // Electron's Menu.popup() uses the current mouse cursor position
416+ // which avoids coordinate-space mismatches.
417+ expect ( showContextMenu ) . toHaveBeenCalledWith ( [
418+ { id : "rename" , label : "Rename thread" } ,
419+ { id : "delete" , label : "Delete" , destructive : true } ,
420+ ] ) ;
421421 } ) ;
422422
423423 it ( "uses fallback context menu when desktop bridge is unavailable" , async ( ) => {
0 commit comments