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:
Manjunath PaparajuandSameh Khamis authored and Sameh Khamis committed 2026-11-18 16:03:51 -08:00
1 parent 8b2ca602e5
commit 0a6fd5f43f
101 files changed
+2885 -1673

No files matched your search

+4 -3
View File
@@ -88,11 +88,12 @@ function assertLegacyRoundTrip(hash) {
return { parsed, state, encoded };
}
test('the HAL example survives the round trip and shrinks to 39 characters', () => {
test('the HAL example survives the round trip and shrinks to 42 characters', () => {
const { parsed, state, encoded } = assertLegacyRoundTrip(HAL_EXAMPLE_HASH);
assert.equal(HAL_EXAMPLE_HASH.length, 302);
assert.equal(encoded.length, 39);
assert.equal(encoded, 'ARCg-SQYrah3ILAJKB4wO1IEAIQAEGIBNMgBC1o');
// Its long form predates the Space Missions panel: that entry says nothing.
assert.equal(encoded.length, 42);
assert.equal(encoded, 'ARCg-SQYrah3ILAJKB4wO1IEAIQAEGIDNLAByAELpA');
assert.equal(parsed.roll, 360);
assert.equal(state.roll, 0);
assert.deepEqual(state.layerState.enabledLayerIds, [
+7
View File
@@ -191,6 +191,13 @@ export const SHARE_VIEW_PANELS = freezeAll([
pinnable: false,
collapsed: false,
},
{
number: 11,
id: 'space-missions-panel',
token: 'n',
pinnable: false,
collapsed: true,
},
]);
const PANEL_BY_NUMBER = new Map(SHARE_VIEW_PANELS.map((p) => [p.number, p]));
const PANEL_BY_ID = new Map(SHARE_VIEW_PANELS.map((p) => [p.id, p]));
+39 -2
View File
@@ -708,6 +708,43 @@ test('panels: only differences from the frozen layout are written', () => {
);
});
test('panels: the Space Missions panel round-trips, and older links keep its default', () => {
const open = {
specs: [{ id: 'space-missions-panel', collapsed: false, pinned: null }],
};
const hash = assertRoundTrip({ panelState: open });
const specs = decodeOk(hash).state.panelState.specs;
assert.deepEqual(
specs.find((spec) => spec.id === 'space-missions-panel'),
{ id: 'space-missions-panel', collapsed: false, pinned: null },
);
// A link that names only an older panel reads Space Missions as collapsed.
const older = decodeOk(
encodeShareView({
panelState: {
specs: [{ id: 'cctv-panel', collapsed: false, pinned: null }],
},
}),
).state.panelState;
assert.equal(
older.specs.some((spec) => spec.id === 'space-missions-panel'),
false,
'an older link has no opinion about the panel',
);
const panel = SHARE_VIEW_PANELS.find((p) => p.id === 'space-missions-panel');
assert.equal(panel.collapsed, true);
assert.equal(
new Set(SHARE_VIEW_PANELS.map((p) => p.token)).size,
SHARE_VIEW_PANELS.length,
'panel tokens are unique',
);
assert.equal(
new Set(SHARE_VIEW_PANELS.map((p) => p.number)).size,
SHARE_VIEW_PANELS.length,
'panel numbers are unique',
);
});
test('a place view opens at its camera; a thing view also names what to follow', () => {
const place = decodeOk(encodeShareView({ lat: 1, lon: 2 })).state;
assert.deepEqual(place.view, { kind: 'place' });
@@ -889,7 +926,7 @@ test('unknown fields inside a thing view, codes and bits are skipped too', () =>
10,
[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1],
); // layer 160
writer.bytesField(12, new WireWriter().varint(11 * 16 + 4 + 1).finish()); // panel 11
writer.bytesField(12, new WireWriter().varint(12 * 16 + 4 + 1).finish()); // panel 12
writer.uintField(14, 99); // style code 99
writer.bytesField(13, thing.finish());
const result = decodeOk(hashOf(writer.finish()));
@@ -909,7 +946,7 @@ test('unknown fields inside a thing view, codes and bits are skipped too', () =>
['enum:style', 99],
['flags', 32],
['layer', 160],
['panel', 11],
['panel', 12],
['thing', 20],
],
);