Commit Graph
383 Commits
Author SHA1 Message Date
Sameh Khamis c1f60cb7e7 Cut the Google requests the HUD summary makes on its own
The HUD builds place context for its AI summary whenever the camera
settles, and each build paid for up to four reverse geocodes plus a Nearby
Places search, even when no OpenAI key was configured to use them.

- Ask GET /api/openai/hud-summary/status once; with no summary configured,
  or after an unconfigured reply, make no place lookups for the page.
- Reverse-geocode at most two points: the view center and one viewport
  point.
- Reuse a lookup until the view center moves a quarter of the visible
  width, the camera's distance to it doubles or halves, or the camera
  crosses a lookup height. The reused points are asked again, so only a
  timeout, failure or empty answer spends.
- Repaint the last AI reply when a small pan leaves the context unchanged.

Cached-only hosts and voice context lookups are unchanged.
2026-10-28 14:59:33 -07:00
quanticsoul4772 3e5edff884 Merge branch 'main' into upstream/terrain-429-pause 2026-10-28 09:05:56 -07:00
Said Turksever c1820aea49 fix(terrain): end retries early on a long Retry-After; cover the 429 pause
A Retry-After longer than the 10 s retry budget used to sleep the whole
budget out and then give up, so the proxy's 429 pause started 10 s late
and every new-point poll in that window still went upstream and logged.
The retry loop now stops at once in that case.

Tests: the retry loop no longer sleeps for an unreachable Retry-After;
fully cached points, including stale ones, are served during the pause
with no upstream call; a 503 does not pause; a shorter concurrent
Retry-After never cuts the pause short. CURRENT-STATE now says which
requests are still served and which log.
2026-10-28 14:09:12 +00:00
quanticsoul4772 ea491e1603 Merge branch 'main' into upstream/perimeters-stale 2026-10-27 16:51:15 -07:00
quanticsoul4772 0ba59112f9 Merge branch 'main' into upstream/terrain-429-pause 2026-10-27 16:51:00 -07:00
Sameh Khamis c533b1994c Merge main and preserve voice panel and GhostMaps schema coverage 2026-10-26 08:52:03 -07:00
Sameh Khamis aeee3652ce Merge PR #1299 with current main for validation 2026-10-26 08:39:16 -07:00
Mazeyar Moeini Feizabadi 4da002bd42 Merge current main into S2 GhostMaps and preserve updated import and voice behavior 2026-10-26 16:25:49 +01:00
Mazeyar Moeini Feizabadi 4a18af5426 fix: address GhostMaps resource and source ownership review findings 2026-10-26 16:24:34 +01:00
quanticsoul4772 c53928ab06 Merge branch 'main' into upstream/perimeters-stale 2026-10-25 19:45:35 -07:00
Jenil Patel a7fcb3c232 fix(maps): avoid 404 on keyless Google tiles-token probe (#1066)
Return an uncached unavailable-token response for keyless Google tile-token requests.

Contribution by @dvilrgamerz.
2026-10-25 19:13:38 -07:00
quanticsoul4772andClaude Opus 5.5 25973ade2c fix(perimeters): report a stale WFIGS snapshot as stale, and stop serving it after a day
When WFIGS was unreachable the proxy served its last snapshot, marked stale
(X-Data-Stale, body.stale), with no age limit, and the client source kept
only the rows. The layer then read healthy with a fresh update time and
get_fire_perimeters reported the perimeters as current; three days into an
outage it still said "1 mapped wildfire perimeter in the requested box."
The source now offers getSnapshotDetail ({rows, stale, fetchedAt}); the
layer reports stale with the snapshot's fetch time, the tool adds stale,
retrieved_at and "(data may be stale)", and the proxy serves a stale
snapshot for at most 24 hours, as the GNSS proxy caps its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 18:01:19 -07:00
quanticsoul4772andClaude Opus 5.5 923211c24a fix(terrain): key the 429 pause on status, never shorten it, and document it
Review follow-ups: the upstream error now carries its HTTP status and the
pause checks error.status instead of the message text; concurrent 429s
extend the pause with Math.max rather than a shorter Retry-After cutting a
longer one short; the per-chunk re-check says it is for multi-chunk
requests; the first 429 test runs its backoff on mocked timers.
CURRENT-STATE describes the pause.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 17:08:26 -07:00
quanticsoul4772andClaude Opus 5.5 d7986309b6 fix(terrain): pause upstream calls after a 429
A rate-limited upstream got asked again by every page request for new
points (about once a second while the camera moves), each with its own
retries, which kept the limit in force and logged "refresh incomplete" each
time. After a 429 the proxy now leaves the upstream alone for its
Retry-After (at most 10 minutes), or 60 s when it sends none, serving
cached points meanwhile. The warning that starts the pause says
"(HTTP 429; pausing upstream for N s)"; requests refused during the pause
don't log.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 16:31:08 -07:00
quanticsoul4772 6bbf9b94c4 fix(traffic): flag stale cached TomTom tiles in get_traffic_flow (#1239)
Report stale traffic tiles and their fetch time, and release pending freshness metadata when tile requests fail or are cancelled.

Contribution by @quanticsoul4772.
2026-10-25 08:26:26 -07:00
Sameh Khamis 134505f716 Merge PR #1326 with current main 2026-10-24 23:14:55 -07:00
Sameh Khamis a2a3aba1d2 Merge main into fix/ais-static-keeps-motion 2026-10-24 21:39:32 -07:00
Sameh Khamis 77b485d619 fix(ais): refresh changed static metadata without advancing position 2026-10-24 21:29:21 -07:00
Sameh Khamis aa9a7d41bf Merge main into fix/cyclone-movement-knots 2026-10-24 21:20:41 -07:00
quanticsoul4772andSameh Khamis 1c234ce027 fix(opensky): load OAuth credential files and retire Basic auth (#1229)
Read OpenSky OAuth credentials from OPENSKY_CREDENTIALS_FILE and stop sending retired Basic authentication. Update setup diagnostics and guidance.

Keep credential-file warnings free of parser excerpts and filesystem error details, cover both failure paths with a regression test, and use a launcher-compatible absolute path example.

Original contribution by quanticsoul4772, with credential-warning and documentation follow-up by Sameh Khamis.

Co-authored-by: quanticsoul4772 <[email protected]>
Co-authored-by: Sameh Khamis <[email protected]>
2026-10-24 08:25:42 -07:00
manjunath 5c3b66c263 feat(voice): reconcile preview and settings with main
add the shared Voice Preview and Settings panel with browser-local preview
and inactivity preferences, keyboard controls and responsive positioning

preserve main’s Rotation and Context behavior, clarify panel routing and
refresh schema pins within the unchanged prompt limit
2026-10-24 15:20:15 +05:30
Rudy Celekli 2bcd27c1e0 fix(ais): keep a tracked vessel's motion when static data arrives 2026-10-24 00:23:44 -04:00
Rudy Celekli 0b19f11ad0 fix(cyclones): convert NHC movement speed from mph to knots 2026-10-24 00:21:05 -04:00
Said Turksever 1c2fe8201f Merge branch 'main' into codex/fix-overpass-cache-singleflight 2026-10-24 01:11:43 +01:00
manjunath22466 b2fb4a261e feat(camera): add globe rotation (#1225)
Add continuous globe rotation with direction and speed controls, viewport fit checks, camera ownership handoff, and voice refusal guards.
2026-10-23 14:51:42 -07:00
Said Turksever 8eb1029393 Merge branch 'main' into codex/fix-military-history-failures 2026-10-23 15:01:01 +01:00
Said Turksever a4f9b5e925 Merge branch 'main' into codex/fix-space-provider-cooldowns 2026-10-23 14:39:06 +01:00
Said TurkseverandClaude Opus 5.5 f93982f55e Carry server structural rejections into Radio diagnostics
The proxy now skips malformed upstream rows individually but counts
them, capped at 10,000, in the catalog metadata and the /stations
envelope (rejectedStationCount). The count never fails health policy,
so an otherwise healthy generation is still accepted. The client
validates the field, adds its own rejected rows after admission, and
reports degraded coverage when either side skipped rows. Adds an
end-to-end proxy-to-client test and aligns DATA_SOURCES.md and
CURRENT-STATE.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 12:39:56 +01:00
Said TurkseverandClaude Opus 5.5 0c20ed9975 fix(overpass): retry a joined caller's admission on its own quota
A caller that joins a cold reservation no longer inherits another client's
RATE_LIMITED result. Once the rejected reservation is released it retries:
it either owns the next reservation and is admitted on its own quota, or joins
an admitted fetch. Adds a two-client regression (exhausted owner, available
joiner, exhausted joiner coalescing onto the admitted fetch).

Also drops the duplicate memory publication for a disk hit in the handler;
preflight already sets it, the handler only trims.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 12:33:05 +01:00
Said TurkseverandClaude Opus 5.5 0b5b897c11 Allow active TLE group, admit proxied same-origin requests, keep longest cooldown
- CelesTrak allowlist includes `active`, which Space Missions'
  getActiveTle() requests; unknown groups still answer 400.
- The CelesTrak gate uses admitSameSiteKeyless so the documented reverse
  proxy keeps working while foreign/opaque Origins and cross-site
  Sec-Fetch-Site are still refused with 403.
- A provider failure never shortens an existing cooldown (CelesTrak and
  Launch Library keep the later deadline).
- Tests: real getActiveTle() through the middleware, proxied app request
  vs unrelated Origin, concurrent failures finishing in both orders.
- docs/CURRENT-STATE.md: eight groups, keyless gate, non-shortening cooldown.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 12:26:41 +01:00
Said Turksever bdf5899dda Merge origin/main into codex/fix-overpass-cache-singleflight 2026-10-23 12:10:39 +01:00
Said Turksever 98af799cb4 Merge remote-tracking branch 'origin/main' into fix/1273
# Conflicts:
#	docs/CURRENT-STATE.md
#	src/tooling/liveProviders.test.mjs
2026-10-23 12:09:32 +01:00
Said TurkseverandClaude Opus 5.5 0caffd8b70 Merge origin/main into codex/fix-space-provider-cooldowns
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 12:09:31 +01:00
Said Turksever 17864965d9 Merge remote-tracking branch 'origin/main' into fix/1268
# Conflicts:
#	docs/CURRENT-STATE.md
2026-10-23 12:09:23 +01:00
daikaginza e60cbb42e3 perf(terrain): evict from the front of the point cache instead of sorting it
Once the cache was full, every write sorted all 50,000 entries to find the
oldest. A Map keeps insertion order, so keep the map in fetch-time order
and delete from the front: the resolver re-inserts each point it refetches
(an overwrite would leave it in its old place), and the disk load sorts
once, since a file written before this change, or a migrated raw-batch
cache, is not in age order.

Suggested by asturksever on #975.
2026-10-23 11:57:37 +07:00
Sameh Khamis 73e789489b chore: drop exports nothing imports
Knip, configured with the application, package exports, scripts, QA
harnesses, workers, tools and tests as entry points, reports exports
that no module imports. Each was checked by hand against string-based
and namespace imports.

- Symbols that are still used inside their own module lose only the
  `export` keyword (176 constants and helpers).
- Unused re-exports are removed from barrel modules (flight, military,
  vessel, CCTV, directions, transit history, local ADS-B and street-level
  policy modules).
- Declarations that nothing uses at all are deleted, among them
  AIS_WATCHDOG_STATUSES, applyFilter, isRadioCountryCode, compactText,
  DENSITY_STOPS, the unused CCTV endpoint constants, and the SDR band
  constants.
- Default exports that nothing imports are removed. The ones in
  src/data/earthquakes.js, src/data/telegeographySubmarineCables.js,
  src/data/wind.js and src/data/bhoteKoshiLocator.js each constructed a
  layer instance at import time that nothing used; those instances are
  no longer created.

Every export of a package.json entry stays, as does TOMTOM_CREDIT,
which the traffic layer reads from the credits namespace it is given.
2026-10-22 19:00:40 -07:00
Sameh Khamis f60b9ef7c8 chore: remove unused imports and local helpers
Drop module-local helpers that nothing calls (linkAbort, summarize,
stringOption, summarizeEntity and the polygonCenter, propertyObject and
unwrapProperties helpers only it used, CALLOUT_DOT_SIZE_PX) and unused
import specifiers in runtime modules, tests, QA scripts and tools.

None of the removed bindings is exported. Re-exports such as the ALPR
policy constants and every package export are unchanged.
2026-10-22 18:09:37 -07:00
Said Turksever 2abae6ee41 Merge branch 'main' into codex/fix-terrain-request-bound 2026-10-22 23:54:47 +01:00
Said Turksever 98d9b54bcd Merge branch 'main' into codex/fix-aircraft-refresh 2026-10-22 23:15:48 +01:00
Mazeyar Moeini Feizabadi cb11e7dac8 fix: clear GhostMaps outage state on unchanged-head recovery 2026-10-22 02:42:26 +02:00
Mazeyar Moeini Feizabadi d5c49d35e8 Merge latest main into S2 GhostMaps contribution 2026-10-22 02:41:26 +02:00
Sameh Khamis b75db874c6 Read API paths and forwarded requests as the router does
The router reads an absolute-form target's path without resolving dot
segments, so a target such as http://host/api/../x still reaches /api
middleware. Take that path the same way when deciding whether the API
response headers apply.

The Street View fallback now treats any forwarding header as forwarded, even
an empty one, before it spends the key.
2026-10-21 15:43:29 -07:00
Sameh Khamis afe05454d9 Require a directory prefix for camera URL pins
The URL parser already turns backslashes into separators, so only encoded
separators need refusing; a pin prefix without a trailing slash is treated as
a directory.
2026-10-21 15:33:14 -07:00
Sameh Khamis b1ed77c26c Keep camera routes reachable behind a reverse proxy
The CCTV routes now use the keyless cross-site checks, which refuse cross-site
browser requests but accept forwarding headers, so cameras work behind the
documented reverse proxy. The Street View fallback is the one step that spends
a key; a request with forwarding headers skips it and gets the placeholder
frame, as when no key is configured.
2026-10-21 15:33:14 -07:00
Sameh Khamis 3e80afe713 Pin camera sources by parsed URL
Camera catalog image URLs were pinned by string prefix, so a URL that only
began with the agency's directory before dot segments or an encoded separator
were resolved still counted as inside it. The pin now parses the URL and
requires the same scheme, the exact host, no credentials, the default port and
a normalized path inside the pinned directory. Redirects on a pinned host must
stay inside the same directory.

Document the response format checks and API response headers alongside the
existing server hardening notes.
2026-10-21 15:07:40 -07:00
Sameh Khamis 0ad75095a7 Validate provider response formats
CCTV frames and the Street View fallback accept only JPEG, PNG, GIF, WebP and
AVIF, parsed from the media type essence and sent under the canonical type;
any other type is cancelled and falls through to the next fallback as a
failed upstream does. Live media must match its feed kind (video/mp4,
video/webm, or multipart/x-mixed-replace with a boundary) before the camera
is reported healthy or any byte is relayed, and its redirects now stay on the
registered origin like frames. Every /api/cctv route uses the same-site gate.

The GBFS proxy relays only bodies that parse as JSON, re-serialized under a
fixed application/json type.
2026-10-21 15:07:20 -07:00
Said TurkseverandClaude Opus 5.5 635fb55514 Merge branch 'codex/fix-overpass-request-admission' into codex/fix-overpass-cache-singleflight
Resolve docs/CURRENT-STATE.md (and scripts/format-scope.json) by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 15:04:45 +01:00
Said TurkseverandClaude Opus 5.5 c192c3b8b5 Merge branch 'main' into codex/fix-terrain-request-bound
Resolve docs/CURRENT-STATE.md (and scripts/format-scope.json) by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 15:04:39 +01:00
Said TurkseverandClaude Opus 5.5 6477f9c910 Merge branch 'main' into codex/fix-military-history-failures
Resolve docs/CURRENT-STATE.md (and scripts/format-scope.json) by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 15:04:31 +01:00
Said TurkseverandClaude Opus 5.5 76ee07ee6e Merge branch 'main' into codex/fix-space-provider-cooldowns
Resolve docs/CURRENT-STATE.md (and scripts/format-scope.json) by keeping both sides.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 15:04:23 +01:00