fix(launches): hand the camera over before stopping, and only blame a fresh index error

- releaseCameraOwnership marks the camera released before stopping, so a
  flight navigation asked to preserve survives; exit also releases it, so an
  inactive layer never cancels another owner's flight.
- The failure toast names the mission index only when its error is from the
  current Context attempt (stats.errorAt), not an earlier one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
Mazeyar Moeini FeizabadiandClaude Opus 5.5 committed 2026-11-06 19:28:56 +01:00
1 parent 13219828e3
commit efa4374644
7 files changed
+41 -10

No files matched your search

+4 -3
View File
@@ -4,12 +4,13 @@ import {
contextModeWord,
} from '../contextModePolicy.js';
/** Why a Space Missions entry failed, when its mission index never loaded. */
export function spaceMissionsIndexFailure(dataManager) {
/** Why a Space Missions entry failed: its mission index never loaded, and
* the error is no older than `since` (an earlier attempt's is not the cause). */
export function spaceMissionsIndexFailure(dataManager, since = 0) {
const stats = dataManager?.layers
?.get('rocket-launches')
?.module?.getStats?.();
return stats?.error && stats.lastUpdate == null
return stats?.error && stats.lastUpdate == null && stats.errorAt >= since
? t(
'Space Missions unavailable: the mission index could not load. Try again later.',
)