Files
ODIAN_Launcher/src-tauri
JIMMY_JFEXP ce36cf0f37 Live mode on a PC that started offline: re-probe at launch, remember the Engine API
The dev drive, plugged into another PC that was offline and then connected,
ran two sessions with no live aircraft. Its API log, on the drive, says why:
"upstream: live mode off (ODIAN_UPSTREAM_URL is unset)" - both times.

Root cause: live mode is decided when the stack starts (StackConfig::
upstream_url = Inner::engine_url), and engine_url was only ever learned from a
site probe and held in MEMORY. A launcher opened offline has none, and it probes
again only on window focus (30 s debounce) or the refresh button - so a Launch
pressed after connecting still used the offline answer, the API got no
ODIAN_UPSTREAM_URL, and live_loop (which would have synced the offline edits and
switched the API to the DHP when the network came) never started.

- launch() re-probes the site first when the launcher thinks it is offline (one
  probe, 2 s at most on a PC that really is). It is also the update check a
  launch from a stale "offline" skipped.
- The Engine API address is kept in launcher.json (LauncherState::engine, keyed
  by site like tile_sync) and loaded at start, so a session started offline
  still arms live mode and goes live by itself once the network is back - the
  path live_loop already handles. Changing the DHP address in Settings drops it.

Spot-check: state::tests - per-site, unchanged-is-no-write, survives save/load,
and a launcher.json from before the field still loads.
2026-09-29 15:29:09 +02:00
..
2026-09-28 11:19:02 +02:00
2026-09-29 10:29:52 +02:00
2026-09-23 16:05:19 +02:00
2026-09-25 10:14:44 +02:00
2026-09-29 10:29:52 +02:00