experiments in a post-browser web
10
fork

Configure Feed

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

fix(ipc): route cmd panel + chain-editor through tile-preload (preload.js post-deletion)

+22
+22
backend/electron/ipc.ts
··· 1113 1113 DEBUG && console.log('[window-open] datastore-viewer window: assigned trustedBuiltin tile-preload token'); 1114 1114 } 1115 1115 1116 + // Special-case: peek://ext/cmd/panel.html is the cmd palette UI, opened 1117 + // on-demand from the cmd resident renderer. peek://ext/cmd/chain-editor.html 1118 + // is the chain editor opened from the panel. Both need tile-preload to call 1119 + // api.window.*, api.context.*, api.datastore.*, api.publish/subscribe, etc. 1120 + if (!tileWebPrefs && (url === 'peek://ext/cmd/panel.html' || url === 'peek://ext/cmd/chain-editor.html')) { 1121 + const CMD_UI_ID = 'cmd-ui'; 1122 + const cmdUiEntry = url.endsWith('panel.html') ? 'panel' : 'chain-editor'; 1123 + const cmdUiGrant = createTrustedBuiltinGrant(CMD_UI_ID); 1124 + const cmdUiToken = generateToken(CMD_UI_ID, cmdUiEntry, cmdUiGrant); 1125 + tileWebPrefs = { 1126 + preload: getTilePreloadPath(), 1127 + additionalArguments: [ 1128 + `--tile-id=${CMD_UI_ID}`, 1129 + `--tile-entry=${cmdUiEntry}`, 1130 + `--tile-token=${cmdUiToken}`, 1131 + ], 1132 + tileId: CMD_UI_ID, 1133 + entryId: cmdUiEntry, 1134 + }; 1135 + DEBUG && console.log(`[window-open] cmd-ui window (${cmdUiEntry}): assigned trustedBuiltin tile-preload token`); 1136 + } 1137 + 1116 1138 // Canvas page host windows use tile-preload with a trustedBuiltin grant so 1117 1139 // page.js can use api.window.*, api.datastore.*, api.context.*, api.profiles.*, 1118 1140 // api.chromeExtensions.*, api.app.*, api.subscribe/publish, etc. The token is