···104104 throw new Error('Tile token validation failed. Tile may have been revoked.');
105105 }
106106107107- // Signal ready to main process
108108- ipcRenderer.send('tile:ready', { tileId, tileEntry });
109109-110110- return { capabilities: grantedCapabilities };
107107+ // Defer tile:ready to the next event-loop tick so any synchronous
108108+ // post-initialize code in background.html (e.g. extension.init() +
109109+ // api.commands.register()) has a chance to complete before the lazy
110110+ // system's hasSubscriber check fires.
111111+ const result = { capabilities: grantedCapabilities };
112112+ setTimeout(() => {
113113+ ipcRenderer.send('tile:ready', { tileId, tileEntry });
114114+ }, 0);
115115+ return result;
111116 };
112117113118 /**