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

+12
View File
@@ -16,6 +16,18 @@ export function createControls({ state: layerState, services, parts, source }) {
: entries.length - 1
: (index + step + entries.length) % entries.length;
parts.panel.selectMissionAt(entries[next].index);
// Stepped from the Data Layers row: the panel opens, as for a globe pick.
const id = layerState._selectedLaunchId;
for (const listener of [...(layerState._globePickListeners || [])]) {
try {
listener(id);
} catch (error) {
console.warn(
'[Data:RocketLaunches] mission step listener failed',
error,
);
}
}
}
const methods = {
+2
View File
@@ -336,6 +336,8 @@ export function createReplay({ state: layerState, services, parts, source }) {
// The chase camera moves on the frame loop; without one, no replay.
const frame = findFrame(layerState._viewer);
if (!layerState._viewer || !launch || !track || !frame) return false;
// Not while the layer is going off.
if (!layerState._enabled) return false;
if (layerState._replayCameraLaunchId === launchId) {
stopMissionReplay();
return false;
+5 -2
View File
@@ -66,6 +66,9 @@ export function createSelection({
}
function setSelectedMission(launchId, isolate = true) {
// Once the layer is going off (its Satellites restore may still be
// running) a roster click selects nothing and moves no camera.
if (launchId && !layerState._enabled) return;
if (launchId) parts.panel.clearMissionRosterHover();
if (
layerState._replayCameraLaunchId &&
@@ -118,7 +121,7 @@ export function createSelection({
}
function focusMission(launch) {
if (!layerState._viewer || !launch) return;
if (!layerState._viewer || !launch || !layerState._enabled) return;
stopMissionZoomAnchor();
parts.rendering.selectLaunchEntity(launch.id);
const camera = cameraOf(layerState._viewer);
@@ -163,7 +166,7 @@ export function createSelection({
}
function focusLaunchSite(launch) {
if (!layerState._viewer || !launch) return;
if (!layerState._viewer || !launch || !layerState._enabled) return;
parts.replay.stopMissionReplay();
stopMissionZoomAnchor();
parts.rendering.selectLaunchEntity(launch.id);