experiments in a post-browser web
10
fork

Configure Feed

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

refactor(main): loadDevExtension uses relaunchTile

+6 -6
+6 -6
backend/electron/main.ts
··· 1618 1618 /** 1619 1619 * Load a dev extension with devtools always open 1620 1620 */ 1621 - export async function loadDevExtension(extId: string): Promise<BrowserWindow | null> { 1621 + export async function loadDevExtension(extId: string): Promise<object | null> { 1622 1622 const devExt = devExtensions.get(extId); 1623 1623 if (!devExt) { 1624 1624 console.error(`[ext:dev] Dev extension not registered: ${extId}`); 1625 1625 return null; 1626 1626 } 1627 1627 1628 - // Create the extension window 1629 - const win = await createExtensionWindow(extId); 1630 - if (!win) { 1628 + // Relaunch as v2 tile: re-read manifest, revoke old token, close old window, launch fresh. 1629 + const result = await relaunchTile(extId); 1630 + if (!result) { 1631 1631 return null; 1632 1632 } 1633 1633 1634 1634 // Always open devtools for dev extensions (regardless of debug mode) 1635 1635 if (!isHeadless()) { 1636 - win.webContents.openDevTools({ mode: 'detach', activate: false }); 1636 + result.window.webContents.openDevTools({ mode: 'detach', activate: false }); 1637 1637 } 1638 1638 1639 1639 DEBUG && console.log(`[ext:dev] Loaded dev extension: ${extId}`); 1640 - return win; 1640 + return result; 1641 1641 } 1642 1642 1643 1643 /**