···191191 content: msg.content
192192 });
193193 }
194194- }, api.scopes.GLOBAL);
194194+ });
195195196196 // Open a window with an external URL - this triggers trackWindowLoad
197197 // which emits item:created if the URL is new
···3939 // Mirrors the websearch pattern at websearch.spec.ts:91-126.
4040 const extensionLoaded = await sharedBgWindow.evaluate(async () => {
4141 const api = (window as any).app;
4242- api.publish('cmd:execute:pubsub repro', {}, api.scopes.GLOBAL);
4242+ api.publish('cmd:execute:pubsub repro', {});
4343 const start = Date.now();
4444 while (Date.now() - start < 15000) {
4545 const result = await api.extensions.list();
+3-3
tests/desktop/startup-events.spec.ts
···2727 // Subscribe to startup phase events
2828 api.subscribe('ext:startup:phase', (msg: any) => {
2929 received = true;
3030- }, api.scopes.GLOBAL);
3030+ });
31313232 // The subscription should be set up without error
3333 return { subscriptionCreated: true };
···6666 const queryCommands = () => new Promise((resolve) => {
6767 api.subscribe('cmd:query-commands-response', (msg: any) => {
6868 resolve(msg.commands || []);
6969- }, api.scopes.GLOBAL);
7070- api.publish('cmd:query-commands', {}, api.scopes.GLOBAL);
6969+ });
7070+ api.publish('cmd:query-commands', {});
7171 setTimeout(() => resolve([]), 1000);
7272 });
7373
+4-4
tests/desktop/tag-events.spec.ts
···3535 tagName: msg.tagName
3636 });
3737 }
3838- }, api.scopes.GLOBAL);
3838+ });
39394040 // Create new tag to trigger the event
4141 api.datastore.getOrCreateTag(name);
···8686 itemType: msg.itemType
8787 });
8888 }
8989- }, api.scopes.GLOBAL);
8989+ });
90909191 // Tag the item to trigger the event
9292 api.datastore.tagItem(itemId, tagId);
···142142 itemId: msg.itemId
143143 });
144144 }
145145- }, api.scopes.GLOBAL);
145145+ });
146146147147 // Untag the item to trigger the event
148148 api.datastore.untagItem(itemId, tagId);
···196196 clearTimeout(timeout);
197197 resolve({ received: true }); // This would be unexpected
198198 }
199199- }, api.scopes.GLOBAL);
199199+ });
200200201201 // Try to tag the same item with the same tag again
202202 api.datastore.tagItem(itemId, tagId);
···9393 const extensionLoaded = await sharedBgWindow.evaluate(async () => {
9494 const api = (window as any).app;
9595 // Trigger the lazy stub — this loads the extension
9696- api.publish('cmd:execute:open web search', {}, api.scopes.GLOBAL);
9696+ api.publish('cmd:execute:open web search', {});
97979898 // Wait for the extension to be running
9999 const start = Date.now();