feat(plugins): add JavaScript plugin system with overlay panel (#303)

This commit is contained in:
sudacode authored and GitHub committed 2026-10-31 19:09:54 -07:00
1 parent 90fc7cf940
commit a9a4c4f083
110 files changed
+5897 -344

No files matched your search

+26
View File
@@ -158,6 +158,32 @@ test('primeModalWindow leaves Linux modal creation lazy', () => {
assert.equal(h.createCalls, 0);
});
test('a cancelled queued plugin panel cannot replace its successor when the window loads', () => {
const modal = new FakeOverlayWindow({ ...LOADING_BLANK_WINDOW, documentLoaded: false });
const h = createHarness({ modal });
const first = new AbortController();
h.runtime.sendToActiveOverlayWindow(
'plugin-panel:open',
{ panelId: 1 },
{
restoreOnModalClose: 'plugin-panel',
preferModalWindow: true,
signal: first.signal,
},
);
first.abort();
h.runtime.sendToActiveOverlayWindow(
'plugin-panel:open',
{ panelId: 2 },
{
restoreOnModalClose: 'plugin-panel',
preferModalWindow: true,
},
);
modal.finishLoad();
assert.deepEqual(modal.sent, [['plugin-panel:open', { panelId: 2 }]]);
});
test('sendToActiveOverlayWindow does not retain restore state when modal creation fails', () => {
const h = createHarness({ createModal: () => null });