Keep the Space Missions panel out of the Cockpit and its controls out of teardown

From review:
- Voice "open the Space Missions panel" under the Cockpit opened it and
  wrote its preference; it is refused there now, as the layer's own reveal
  is. On a phone the panel's Missions sheet shows too.
- A voice "context off" switches Space Missions off only when no Context
  mode is on, entering or starting (Contacts), and it also reaches Space
  Missions while the layer is still starting.
- While the layer is going off (its Satellites restore may still run) a
  roster click, focus or replay does nothing.
- Stepping missions from the Data Layers row opens the panel, as a globe
  pick does.
- SHARE-LINK-FORMAT lists panel 11, space-missions-panel (token n).

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju authored and Sameh Khamis committed 2026-11-18 16:03:51 -08:00
1 parent 0a6fd5f43f
commit 67d675c5d9
6 files changed
+1275 -312

No files matched your search

+33 -3
View File
@@ -1012,6 +1012,26 @@ export function createGevActionRunner({
error: say,
};
}
// The Cockpit owns the screen and hides the right rail: the panel is
// not opened (or its preference written) under it.
if (
open &&
panelId === 'space-missions-panel' &&
styleManager?.getCockpitState?.()?.active
) {
const say =
'The Space Missions panel opens once you leave the cockpit.';
return {
ok: false,
action: 'set_panel_open',
panelId,
open,
applied: false,
unavailable: true,
say,
error: say,
};
}
if (!setPanelOpen(styleManager, panelId, open)) {
const say = 'There is no panel to open here.';
return {
@@ -1023,6 +1043,9 @@ export function createGevActionRunner({
error: say,
};
}
// A phone shows the right rail only as tab sheets: show this one's.
if (open && panelId === 'space-missions-panel')
styleManager?.revealPanel?.(panelId);
return { ok: true, action: 'set_panel_open', panelId, open };
}
@@ -1077,6 +1100,7 @@ export function createGevActionRunner({
!styleManager?.getCockpitState?.()?.active
) {
setPanelOpen(styleManager, 'space-missions-panel', true);
styleManager?.revealPanel?.('space-missions-panel');
}
return {
...result,
@@ -1084,13 +1108,19 @@ export function createGevActionRunner({
mode: 'space-missions',
};
}
const contextState = styleManager.getContextModeState?.() || {};
if (
mode === 'off' &&
!styleManager.getContextModeState?.()?.mode &&
dataManager.isEnabled?.('rocket-launches')
!contextState.mode &&
!contextState.changing &&
!contextState.entering &&
!dataManager.isEffectivelyEnabled?.('military-awareness') &&
(dataManager.isEffectivelyEnabled?.('rocket-launches') ??
dataManager.isEnabled?.('rocket-launches'))
) {
// "Exit Space Missions" still arrives as context off. With no Context
// mode on, Space Missions is what is being left: switch its layer off.
// mode on, entering or starting (Contacts), Space Missions, on or
// still starting, is what is being left: switch its layer off.
const result = await runGevAction(
'set_layer_visibility',
{ layerId: 'rocket-launches', enabled: false },
File diff suppressed because it is too large. Load diff