mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 09:42:21 +00:00
Make Space Missions an ordinary layer with its own panel
Space Missions no longer runs as a Context mode. The launches layer owns its Satellites dependency, including the rule that a Satellites off asked for after Space Missions was switched on ends it (request order decides), and a small controller connects the layer to its own panel and store. Context no longer isolates, snapshots or restores Space Missions or Satellites, so Contacts and Space Missions run together in either order, and scene playback no longer exits an isolating mode. Settled by the owner: Contacts leaves Satellites as it is, and only a person's or voice Satellites off ends Space Missions; a scene, story, preset or other programmatic off does not. Turning the layer on by hand or by voice, choosing it at first run, or picking a mission on the globe opens the Space Missions panel, and on a phone its Missions sheet. Asking voice to open the panel while the layer is off is refused with a reason, and voice never opens it while the Cockpit owns the screen. With no Context mode on, a voice Context off switches Space Missions off. A failed Satellites restore no longer cuts the layer's teardown short. Mission labels on the globe select their mission. The layer names a failed first index load itself, so the Context toast no longer imports Space Missions code. Also carries the satellites request ordering and DataLayerManager.waitForLayerIdle, the share token for the panel, voice panel ids, Cockpit folding the panel away and the phone tab ellipsis. The panel shares the rail gutters and hover border of the other side panels. On top of the Omnibar: "open space missions panel" reaches the new panel, and Open Context no longer answers to "missions". Co-authored-by: Sameh Khamis <[email protected]>
This commit is contained in:
1 parent
8b2ca602e5
commit
0a6fd5f43f
101 files changed
+2885
-1673
No files matched your search
@@ -18,8 +18,6 @@
|
||||
// registry (director._captureLayerStates), so those shots declare all sixteen
|
||||
// keys and still reconcile in full.
|
||||
|
||||
import { contextLayerEnableBlockReason } from '../contextModePolicy.js';
|
||||
|
||||
/**
|
||||
* Layer params that re-establish a tracked contact — and with it a SECOND
|
||||
* writer on the camera.
|
||||
@@ -91,46 +89,6 @@ export function stripSceneTrackingParams(params) {
|
||||
return Object.keys(kept).length ? kept : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reserved layer id used ONLY to interrogate a Context mode's enable guard.
|
||||
*
|
||||
* The probe asks "would this mode refuse a layer it has no opinion about?" —
|
||||
* so it must name a layer that can never exist. The double-underscore form is
|
||||
* outside the kebab-case convention every real layer id follows, and
|
||||
* scenePolicy.test.mjs asserts no registered layer claims it, so the reservation
|
||||
* is enforced rather than assumed.
|
||||
* @constant {string}
|
||||
*/
|
||||
export const SCENE_EXCLUSIVITY_PROBE_LAYER_ID = '__scene-exclusivity-probe__';
|
||||
|
||||
/**
|
||||
* Whether an active Context mode must be exited before a shot's layers can be
|
||||
* applied.
|
||||
*
|
||||
* Space Missions is the shipped case: it isolates replay data, so its guard
|
||||
* (contextLayerEnableBlockReason) refuses every enable outside its own bundle.
|
||||
* A recipe declaring only flights/satellites/earthquakes/traffic would have
|
||||
* those enables refused outright — and Orbital Watch, whose satellites the
|
||||
* guard does permit, would still play over the mode's rocket-launches replay
|
||||
* it never declared. Either way the shot is not the composition it describes.
|
||||
*
|
||||
* The verdict is read off the guard itself rather than a mode name: a mode
|
||||
* that refuses an arbitrary unrelated layer is by definition isolating, so a
|
||||
* future isolating mode is covered the day its branch is added to the policy.
|
||||
*
|
||||
* @param {string|null} contextMode Active (or entering) Context mode.
|
||||
* @returns {boolean} Whether playback must leave the mode first.
|
||||
*/
|
||||
export function sceneRequiresContextModeExit(contextMode) {
|
||||
if (!contextMode) return false;
|
||||
return (
|
||||
contextLayerEnableBlockReason({
|
||||
contextMode,
|
||||
change: { layerId: SCENE_EXCLUSIVITY_PROBE_LAYER_ID, enabled: true },
|
||||
}) !== null
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Build the ordered layer reconcile plan for one shot.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user