From 3164405108df5ec67138815b50e85dc8cb28bc23 Mon Sep 17 00:00:00 2001 From: Sameh Khamis Date: Sun, 13 Sep 2026 05:43:41 -0700 Subject: [PATCH] fix: retain completed scene status in current snapshots --- docs/CODE-BOUNDARIES.md | 1 - src/cameraHandoff.test.mjs | 2 +- src/scenes/director.js | 2 ++ src/ui/sceneControls.js | 5 ++--- src/ui/sceneControls.test.mjs | 1 + 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/CODE-BOUNDARIES.md b/docs/CODE-BOUNDARIES.md index 77bad8983..abb07a114 100644 --- a/docs/CODE-BOUNDARIES.md +++ b/docs/CODE-BOUNDARIES.md @@ -339,7 +339,6 @@ owners with synchronous cleanup. Existing scene, share and HUD engines retain their entry points. `ui/styles` loads the ordered stylesheet entry; component files retain the original cascade, including responsive and dock refinements. - ## UI state and Scene actions `StyleManager.subscribeShareState(listener)` supplies the current shareable diff --git a/src/cameraHandoff.test.mjs b/src/cameraHandoff.test.mjs index b1beee7d1..6fc4b2a32 100644 --- a/src/cameraHandoff.test.mjs +++ b/src/cameraHandoff.test.mjs @@ -258,7 +258,7 @@ test('deferred search releases only after its final authority check', () => { assert.match(ui, /begin: \(\) => this\._beginDeferredNavigation\('location'\)/); assert.match(ui, /beforeFly: \(generation\) => this\._reassertNavigationHandoff\(generation\)/); assert.match(ui, /isCurrent: \(generation\) =>\s*!this\._disposed && generation === this\._navigationGeneration/); - assert.match(ui, /change\.type === 'settled'\) this\._settleLocationSearchUi\(change\.generation\)/); + assert.match(ui, /change\.type === 'settled'\)\s*this\._settleLocationSearchUi\(change\.generation\)/); assert.doesNotMatch(search.slice(0, search.indexOf('await this.search')), /_releaseFollowCamera/); }); diff --git a/src/scenes/director.js b/src/scenes/director.js index 5a0f15c95..c4b3d854b 100644 --- a/src/scenes/director.js +++ b/src/scenes/director.js @@ -404,6 +404,7 @@ export class SceneDirector { _publish(change) { this._state?.publish(change); } _shotOutcome(type, scene, shot, index = scene.shots.indexOf(shot)) { + if (type === 'shot-loaded') this._presentation.status = `Loaded: ${scene.title} / ${shot.title}`; this._publish({ type, sceneId: scene.id, sceneTitle: scene.title, shot, index }); } @@ -979,6 +980,7 @@ export class SceneDirector { link.click(); link.remove(); URL.revokeObjectURL(url); + this._presentation.status = 'Project exported'; this._publish({ type: 'project-exported', project: this._project }); } diff --git a/src/ui/sceneControls.js b/src/ui/sceneControls.js index 751f8e0d4..8141d6e09 100644 --- a/src/ui/sceneControls.js +++ b/src/ui/sceneControls.js @@ -100,9 +100,8 @@ export class SceneControls { this.setPlaybackActive(state.playbackActive); if (initial || type === 'playback-keyboard') this.setPlaybackKeyboardEnabled(state.keyboardEnabled); - if (type === 'project-exported') this.updateStatus('Project exported'); - if (type === 'shot-loaded') - this.updateStatus(`Loaded: ${change.sceneTitle} / ${change.shot.title}`); + if (type === 'project-exported') this.updateStatus(state.status); + if (type === 'shot-loaded') this.updateStatus(state.status); if (type === 'run-event' && change.event === 'shot_start') this.setButtons(state.running); } diff --git a/src/ui/sceneControls.test.mjs b/src/ui/sceneControls.test.mjs index fd208b940..c4ed99f93 100644 --- a/src/ui/sceneControls.test.mjs +++ b/src/ui/sceneControls.test.mjs @@ -374,6 +374,7 @@ test('Scene controls consume current state, preserve rows on progress, and unsub f.state.progress = 0.5; channel.publish({ type: 'progress-changed' }); assert.equal(f.elements.shots.children[0], row); + f.state.status = 'Project exported'; channel.publish({ type: 'project-exported' }); assert.equal(f.elements.status.textContent, 'Project exported'); owner.destroy();