feat(character-dictionary): add manager modal and scope name matching to current media (#86)

This commit is contained in:
2026-05-25 18:29:20 -07:00
committed by GitHub
parent 097b619d71
commit 3932e53ced
71 changed files with 1896 additions and 127 deletions
+26
View File
@@ -110,6 +110,32 @@ test('overlay manager applies bounds for main and modal windows', () => {
assert.deepEqual(modalCalls, [{ x: 80, y: 90, width: 100, height: 110 }]);
});
test('overlay manager can suppress z-order promotion during bounds updates', () => {
const calls: string[] = [];
const createManager = createOverlayManager as unknown as (options: {
updateOverlayWindowBounds: (
geometry: Electron.Rectangle,
window: Electron.BrowserWindow | null,
options: { promote: boolean },
) => void;
shouldPromoteWindowOnBoundsUpdate: (window: Electron.BrowserWindow) => boolean;
}) => ReturnType<typeof createOverlayManager>;
const manager = createManager({
updateOverlayWindowBounds: (_geometry, _window, options) => {
calls.push(`promote:${options.promote}`);
},
shouldPromoteWindowOnBoundsUpdate: () => false,
});
manager.setMainWindow({
isDestroyed: () => false,
} as unknown as Electron.BrowserWindow);
manager.setOverlayWindowBounds({ x: 1, y: 2, width: 3, height: 4 });
assert.deepEqual(calls, ['promote:false']);
});
test('runtime-option broadcast still uses expected channel', () => {
const broadcasts: unknown[][] = [];
broadcastRuntimeOptionsChangedRuntime(