Controller: layouts for the media timing review and duplicate card dialogs (#313)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
YashaNoosandClaude Opus 5.5 authored and GitHub committed 2026-11-02 01:38:26 -08:00
1 parent 696462a82e
commit 6d0f37ac21
50 files changed
+4555 -46

No files matched your search

+40 -1
View File
@@ -8,7 +8,7 @@ import {
createHarness,
type FakeOverlayWindowInit,
} from './overlay-runtime-test-harness';
import type { OverlayHostedModal } from '../shared/ipc/contracts';
import { IPC_CHANNELS, type OverlayHostedModal } from '../shared/ipc/contracts';
const SUBSYNC_PAYLOAD = {
ffsubsyncAvailable: true,
@@ -749,3 +749,42 @@ test('Linux keeps the dedicated modal window unmapped until the renderer opens t
assert.equal(modal.isVisible(), true);
assert.equal(modal.ignoreMouseEvents, false);
});
test('modal window path suspends the main overlay controller until the last modal closes', () => {
const main = new FakeOverlayWindow({ visible: true });
const h = createHarness({ main, modal: new FakeOverlayWindow() });
const suspendMessages = () =>
main.sent.filter(([channel]) => channel === IPC_CHANNELS.event.controllerSuspendedChanged);
h.runtime.sendToActiveOverlayWindow(
'media-timing-review:open',
{ reviewId: 'r-1' },
{ restoreOnModalClose: 'media-timing-review', preferModalWindow: true },
);
h.runtime.notifyOverlayModalOpened('media-timing-review');
assert.deepEqual(suspendMessages(), [[IPC_CHANNELS.event.controllerSuspendedChanged, true]]);
h.runtime.handleOverlayModalClosed('media-timing-review');
assert.deepEqual(suspendMessages(), [
[IPC_CHANNELS.event.controllerSuspendedChanged, true],
[IPC_CHANNELS.event.controllerSuspendedChanged, false],
]);
});
test('a modal hosted in the main overlay keeps that overlay controller active', () => {
const main = new FakeOverlayWindow({ visible: true });
const h = createHarness({ main, createModal: () => new FakeOverlayWindow() });
h.runtime.sendToActiveOverlayWindow(
'media-timing-review:open',
{ reviewId: 'r-1' },
{ restoreOnModalClose: 'media-timing-review' },
);
h.runtime.notifyOverlayModalOpened('media-timing-review');
h.runtime.handleOverlayModalClosed('media-timing-review');
assert.equal(
main.sent.some(([channel]) => channel === IPC_CHANNELS.event.controllerSuspendedChanged),
false,
);
});