feat(recording): render the safe frame from a recording store

RecordingControls publishes the safe frame a recording composes in, 16:9
or 9:16 (null while none records), to the new recording store, and the
scene chrome renders the overlay's active and ratio classes from it
instead of the controls writing them. Any frame but 9:16, even none named,
records in 16:9 as before.
This commit is contained in:
Sameh Khamis committed 2026-11-01 14:15:36 -08:00
1 parent 0949f6a776
commit 3a750c9021
11 files changed
+116 -38

No files matched your search

+6 -5
View File
@@ -56,8 +56,6 @@ function fixture() {
'left-panel-stack',
'right-context-rail',
'pp-toggles',
'safe-frame-overlay',
'safe-frame-box',
'hud-toggle',
'hud-layout-select',
].map((id) => [id, element()]),
@@ -222,9 +220,11 @@ test('recording restores the original HUD after repeated entry and revokes retai
let mode = 'auto',
variant = 'tactical';
const hudSyncs = [];
const frames = [];
const owner = new RecordingControls({
syncShareState() {},
syncHudControls: () => hudSyncs.push(variant),
publishSafeFrame: (frame) => frames.push(frame),
});
owner.hud = {
getMode: () => mode,
@@ -249,9 +249,10 @@ test('recording restores the original HUD after repeated entry and revokes retai
'each change shows the HUD layout it leaves',
);
assert.equal(document.body.classList.contains('recording-mode'), false);
assert.equal(
f.nodes.get('safe-frame-overlay').classList.contains('active'),
false,
assert.deepEqual(
frames,
['9:16', '16:9', null],
'the safe frame follows each change and leaves with the recording',
);
} finally {
f.restore();