experiments in a post-browser web
10
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix(cmd): await init before publishing ext:ready so subscribers are ready for command batches

+8 -7
+8 -7
app/cmd/background.html
··· 14 14 15 15 console.log(`[ext:${extId}] background.html loaded`); 16 16 17 - // Signal ready to main process 17 + // Initialize extension FIRST so its subscribers (cmd:register-batch, etc.) 18 + // are registered before any other extension publishes commands on ext:ready. 19 + if (extension.init) { 20 + console.log(`[ext:${extId}] calling init()`); 21 + await extension.init(); 22 + } 23 + 24 + // Signal ready to main process — only after subscribers are in place. 18 25 api.publish('ext:ready', { 19 26 id: extId, 20 27 manifest: { ··· 23 30 version: '1.0.0' 24 31 } 25 32 }, api.scopes.SYSTEM); 26 - 27 - // Initialize extension 28 - if (extension.init) { 29 - console.log(`[ext:${extId}] calling init()`); 30 - extension.init(); 31 - } 32 33 33 34 // Handle shutdown request from main process 34 35 api.subscribe('app:shutdown', () => {