mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +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
+22
-14
@@ -53,11 +53,12 @@ export const FIRST_RUN_SESSION_KEY = 'gev:first-run-mission-session:v1';
|
||||
* TOUCHED, DURABLE layer enables for the mission's OWN layers, at
|
||||
* `origin: 'user'` — identical to clicking those rows.
|
||||
* Choosing ENVIRONMENTAL *is* choosing those layers.
|
||||
* TOUCHED, DURABLE the Context panel reveal, but only for the two
|
||||
* Context missions, exactly as the visible Contacts /
|
||||
* Space Missions tabs do it. The globe missions open no
|
||||
* panel at all — nothing there needs explaining, and a
|
||||
* panel-collapse write is a pref nobody chose.
|
||||
* TOUCHED, DURABLE the Context panel reveal, but only for the Contacts
|
||||
* mission, exactly as the visible Contacts tab does
|
||||
* it. Space Missions opens its own panel the way
|
||||
* switching its layer on does. The globe missions open
|
||||
* no panel at all — nothing there needs explaining,
|
||||
* and a panel-collapse write is a pref nobody chose.
|
||||
* TOUCHED, SESSION the camera. Never persisted by anything.
|
||||
* NOT TOUCHED detection mode + density. The reasonable-defaults
|
||||
* landing owns the DENSE/75 start, and Contacts owns
|
||||
@@ -75,9 +76,10 @@ export const FIRST_RUN_SESSION_KEY = 'gev:first-run-mission-session:v1';
|
||||
* `_setModels3dMode`, which default to origin 'user' and
|
||||
* would persist a 3D choice nobody made.
|
||||
*
|
||||
* The two Context missions deliberately reuse `styleManager.setContextMode`, the
|
||||
* same facade the visible tabs and voice use, so Contacts detection ownership,
|
||||
* layer isolation and rollback stay in exactly one place.
|
||||
* The Contacts mission deliberately reuses `styleManager.setContextMode`, the
|
||||
* same facade the visible tab and voice use, so Contacts detection ownership,
|
||||
* layer isolation and rollback stay in exactly one place. Space Missions is an
|
||||
* ordinary layer, switched on like clicking its row.
|
||||
*/
|
||||
|
||||
/** @type {Readonly<Record<string, object>>} */
|
||||
@@ -88,8 +90,10 @@ export const FIRST_RUN_MISSIONS = Object.freeze({
|
||||
busyKey: msg('Starting live contacts…'),
|
||||
}),
|
||||
'space-missions': Object.freeze({
|
||||
kind: 'context',
|
||||
contextMode: 'space-missions',
|
||||
// An ordinary layer with its own panel: no camera flight, and its panel
|
||||
// opens as it does for a click on its Data Layers row.
|
||||
kind: 'layer',
|
||||
layerIds: Object.freeze(['rocket-launches']),
|
||||
busyKey: msg('Opening space missions…'),
|
||||
}),
|
||||
environmental: Object.freeze({
|
||||
@@ -265,9 +269,13 @@ export async function runFirstRunChoice(
|
||||
// Globe missions: start the pull-out and the layer work together so the
|
||||
// camera is already moving while the feeds spin up. The flight is framing,
|
||||
// not the mission — a stalled or superseded flight never fails the tile.
|
||||
const flight = Promise.resolve()
|
||||
.then(() => flyToGlobe())
|
||||
.catch(() => null);
|
||||
// Layer missions keep the camera where it is.
|
||||
const flight =
|
||||
mission.kind === 'globe'
|
||||
? Promise.resolve()
|
||||
.then(() => flyToGlobe())
|
||||
.catch(() => null)
|
||||
: null;
|
||||
const outcomes = await Promise.all(
|
||||
mission.layerIds.map(async (layerId) => {
|
||||
try {
|
||||
@@ -469,7 +477,7 @@ export function initFirstRunExperience({
|
||||
// setContextMode is also a voice/internal facade and deliberately
|
||||
// does not decide panel chrome. This first-run click is an explicit
|
||||
// visual choice, so reveal the result exactly as the visible
|
||||
// Contacts / Space Missions tabs do.
|
||||
// Contacts tab does.
|
||||
styleManager.setPanelCollapsed?.('global-context-panel', false, {
|
||||
explicit: true,
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user