Stop roster hover and focus from moving the camera while Space Missions goes off

While Space Missions was going off (its Satellites restore still running,
the panel still shown), hovering or keyboard-focusing a roster row still
scheduled the roster preview, which flew the camera to that launch with
nothing left to end it. The preview is no longer scheduled once the layer
is going off, and one already pending is dropped. Selection, focus, replay
and stepping from the Data Layers row were already refused then.

Co-authored-by: Manjunath Paparaju <[email protected]>
This commit is contained in:
Sameh KhamisandManjunath Paparaju committed 2026-11-18 16:37:48 -08:00
1 parent 9ac937af82
commit 8675ead171
3 files changed
+35 -3

No files matched your search

+3 -1
View File
@@ -5594,7 +5594,9 @@ activeCameraCardEnabled: true })` may publish it through the retained
> taken while it ran is kept. Restored parameters never re-show primitives
> while the Satellite layer is disabled. When Satellites is still busy after
> the 30 s limit, the restore changes nothing and keeps the saved state, so
> switching Space Missions off again finishes it.
> switching Space Missions off again finishes it. While Space Missions goes
> off, its panel's roster and controls select, focus, preview and replay
> nothing, so no camera move starts that nothing would end.
> - **Flights 3D/cockpit hardening:** the destination-direction cue is an
> inline SVG rather than a remotely loaded Material Icons ligature, so a
> blocked or late font can no longer expand the literal word `navigation`
+8 -2
View File
@@ -380,14 +380,20 @@ export function createPanel({ state: layerState, services, parts, source }) {
function scheduleMissionRosterPreview(index) {
const launch = layerState._launches[index];
if (!launch || layerState._selectedLaunchId) return;
// Once the layer is going off (its Satellites restore may still be
// running) hovering or focusing a roster row moves no camera.
if (!launch || layerState._selectedLaunchId || !layerState._enabled) return;
if (layerState._missionRosterHoverTimer)
clearTimeout(layerState._missionRosterHoverTimer);
layerState._hoveredRosterLaunchId = launch.id;
parts.overlays.syncMissionOverlayEntries();
layerState._missionRosterHoverTimer = setTimeout(() => {
layerState._missionRosterHoverTimer = null;
if (layerState._hoveredRosterLaunchId !== launch.id) return;
if (
layerState._hoveredRosterLaunchId !== launch.id ||
!layerState._enabled
)
return;
const currentLaunch = resolveMissionRosterPreviewLaunch(
layerState._launches,
launch.id,
+24
View File
@@ -9,6 +9,7 @@ function fixture() {
const state = createState({
services: { overlays: {}, render: {} },
});
state._enabled = true;
const calls = [];
const parts = {
overlays: {
@@ -194,3 +195,26 @@ test('the panel commands act on the selected mission', () => {
['select', null, undefined],
]);
});
test('a roster row hovered or focused while the layer goes off moves no camera', async () => {
const { state, panel, calls } = fixture();
state._launches = [launch('a'), launch('b')];
panel.createMissionPanel();
panel.renderMissionRoster();
// Hovered just before the layer goes off: the pending preview is dropped.
panel.commands.rosterPointerEnter(0);
state._enabled = false;
await new Promise((resolve) => setTimeout(resolve, 160));
// Hovered or focused after it went off, while the panel still shows.
panel.commands.rosterPointerEnter(1);
panel.commands.rosterFocus(1);
assert.equal(state._missionRosterHoverTimer, null, 'no preview is pending');
await new Promise((resolve) => setTimeout(resolve, 160));
assert.deepEqual(
calls.filter(([name]) => name === 'preview'),
[],
);
panel.clearMissionPanel();
});