Commit Graph

11 Commits

Author SHA1 Message Date
JIMMY_JFEXP 2d79664dc7 Dev: route the web's map through this stack's tile server; power grid offline
Two reasons an offline dev run's web client had no map:

1. Vite proxied every tile to the public tile host. web_command now sets
   ODIAN_TILE_SERVER_URL=http://127.0.0.1:18081 for the Vite it starts, and
   ODIAN_Engine's _WEB/vite.config.ts sends /basemap, /mvt and /netlayer there:
   the site while it answers, this PC's installed tiles when it does not - the
   same path the .exe already draws from.

2. The power-grid netlayer had no source offline. datasets.json named every
   PostGIS overlay but `powerv2_postgis`, so the tile server answered
   /netlayer/<ds>/powerv2/* with 404 "powerv2_render_sqlite not found" while
   postgis_power_entities / _links / _topology sat in the local snapshot. Added
   to POSTGIS_SOURCES; the tile server resolves it through the same
   ODIAN_TILE_POSTGIS_DSN as the others.

Spot-check: with the site unreachable, /netlayer/<ds>/powerv2/bbox/8/128/86/131/89.json
answers 200 (721064 B, the same body the site serves) and topology.bin 200.
2026-09-29 14:00:28 +02:00
JIMMY_JFEXP d90dda1df5 Dev: keep Vite off the workspace's target/ so tauri dev starts
`npm run tauri dev` died before the window opened: Vite's watcher crashed
with EBUSY on target\debug\deps\odian_launcher_lib.dll. Root cause: the Cargo
workspace builds into target/ at the repo root, not under src-tauri/, and
vite.config.ts only excluded src-tauri - so Vite watched the DLLs the Rust
build holds locked.

Spot-check: a fresh clone, `npm install`, `npm run tauri dev` opens the
launcher window instead of "beforeDevCommand terminated".
2026-09-29 12:14:30 +02:00
JIMMY_JFEXP 425acebe0d Dev mode: sign the web client in so live mode reaches it
A dev run's web client showed no live tracks while the .exe beside it did.
Root cause: the local API relays a request to the DHP only when it carries a
token that API minted itself (main.cpp's forwarder, the guard that keeps it
from being an open proxy). The .exe mints one with ODIAN_MINT_SECRET; the web
client was opened with ?user= only, so every /session/* call it made was
served from this PC's database.

The launcher now mints a token from this stack's API for the run's operator
(stack::mint_web_token) and opens the browser with it in the URL FRAGMENT
(StackConfig::web_url_signed). A fragment never reaches a request line or a
server log, and the launcher's own log still prints the tokenless address.
If the mint fails the web opens as before and the log says it shows this PC's
data only. Needs ODIAN_Engine's _WEB/src/auth.ts to read #token=.

Spot-check: launch dev mode with the web target while online; the API log
reads "now LIVE on the DHP" and the browser shows live tracks.
2026-09-29 12:11:38 +02:00
Kelorastus 80dd1e7c7d update 2026-09-29 10:29:52 +02:00
Kelorastus 73a8f2c30c updtae 2026-09-28 11:19:02 +02:00
Kelorastus 21d6e6bffb update 2026-09-25 10:14:44 +02:00
Kelorastus 4d620fc5ad update 2026-09-23 16:05:19 +02:00
Kelorastus 4a92cc0b63 update 2026-09-22 13:37:29 +02:00
Kelorastus d5da361952 V1 of laucher 2026-09-18 14:42:28 +02:00
Kelorastus 3fdfde7043 M4 2026-09-16 11:42:24 +02:00
Kelorastus b7f3061be3 ODIAN Launcher: hub, installer, local stack and remembered sign-in (M2)
- Tauri 2 + Svelte 5 hub in ODIAN dark: patch notes and roadmap, install and
  update progress, local stack status, settings with DHP and MCP addresses.
- crates/odian-packs: Rust installer for pack format v1 (signed manifests,
  resumable verified downloads from a DHP or an ODIAN drive), byte-compatible
  with ODIAN_MCP_Server's Python odian_packs.
- Local stack on 127.0.0.1: Postgres -> Engine API -> tile server -> Odian.exe,
  one Job Object, clean shutdown; database snapshot restore on a fresh PC only.
- Keycloak sign-in through the DHP's MCP, remembered until Sign out with a
  launcher session that renews the Engine token silently.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 15:23:17 +02:00