Commit Graph
1221 Commits
Author SHA1 Message Date
Sameh Khamis 51b561815c fix(voice): say the attachment limit is 10 KB in total
The attach menu promised up to 10 KB per file, but the attachments share
one 10 KB budget, so two 6 KB files were refused. The hint now says the
limit covers them all, in every locale.
2026-11-03 15:54:54 -08:00
Sameh Khamis 829db19f60 fix(voice): keep the voice preferences in reach from chat Settings
With Voice Preview off the voice panel never opens on its own, and chat
Settings hid the voice preferences, so the Preview toggle, inactivity
timeout and model tier could not be reached by pointer. Chat Settings now
show them below the chat options, still in chat's frame and without the
voice tabs.
2026-11-03 15:54:54 -08:00
Sameh Khamis 4f4af9c4e0 fix(voice): show the voice panel that typed chat asks for
set_panel_open for voice-settings or voice-preview reported success while
chat's open state kept the voice panel hidden, minimized chat included. A
successful explicit show now closes chat, which keeps the typed session,
its running turn and its messages; reopening chat restores them.
2026-11-03 15:54:54 -08:00
Sameh Khamis b6967a3dd9 Merge branch 'main' into feat/typed-ai-chat
# Conflicts:
#	src/i18n/locales/ar.json
2026-11-03 15:45:43 -08:00
Sameh Khamis f120989a2b docs(cctv): say the Houston pack needs TxDOT's written permission to enable
TranStar's Content Usage terms prohibit copying, distribution and
external framing of its images without TxDOT's prior written
permission. The opt-in text only said the pack was off unless
CCTV_HOUSTON_ENABLED=1, without saying what an operator needs before
setting it. Say "enable only if you hold TxDOT's written permission" in
.env.example, the README, DATA_SOURCES.md, CURRENT-STATE and the
changelog, matching the NYC and Florida packs, and fix the column of the
.env.example comment.

The houston-cctv credit now reads "(Houston, when enabled)" and links
the Content Usage terms, like the Florida credit. Where the docs said
frames are "never stored or redistributed", they now say what happens:
frames are relayed on demand, buffered only per request, sent with
no-store and not archived.
2026-11-03 15:03:37 -08:00
Sameh Khamis 8cd0cc82f5 fix(cctv): read TranStar dir as the camera's side of the road, at low confidence
TranStar's `dir` field is the side of the freeway a camera sits on, not
the way it faces. TranStar's own map script (translateCameraDirection)
shows it as "Traffic closest to the camera is traveling": South is
eastbound, North westbound, West southbound and anything else
northbound. The live catalog agrees: I-10 cameras are North/South and
I-45 cameras East/West.

Treating `dir` as a high-confidence facing pointed most Houston cameras
across or away from the road they watch, and dropped the "estimated"
marking. Map it to the travel direction instead (S 90, N 270, W 180,
E 0) as a low-confidence prior with the low-confidence pose, and keep
the id-hash fallback for None or unknown values.
2026-11-03 15:02:30 -08:00
Sameh Khamis 09bdc314d0 Merge branch 'main' into fix/houston-cctv-pack 2026-11-03 15:01:13 -08:00
Sameh Khamis add905e6b9 docs(drone-airspace): correct the share token, voice support and coverage
The changelog fragment named share-link token 6 (sea marks); the layer
reserves 8. CURRENT-STATE said voice could toggle and query the layer and
listed it among the analyst record sources, but it is in VOICE_OFF_LAYERS.
Say voice is off for now, and that the layer covers FAA prohibited and
restricted special-use airspace only, not the UAS Facility Map / LAANC grids
or TFRs. A test pins these claims to the token ledger and the voice manifest.
2026-11-03 14:35:59 -08:00
Sameh Khamis 585392cbcf fix(drone-airspace): refuse cross-site requests to the FAA proxy
A foreign Origin or Sec-Fetch-Site: cross-site request was answered and
counted against the client's 60-a-minute quota, and could start a refresh.
Run the keyless same-site checks the other map routes use before rate
limiting and cache acquisition; reverse-proxy forwarding headers stay
accepted. List the route with the keyless map routes in SECURITY.md.
2026-11-03 14:35:14 -08:00
Sameh Khamis 8e63420f06 fix(drone-airspace): show stale FAA snapshots as stale and cap them at a day
The source dropped the proxy's stale flag and fetch time, so the layer row
read nominal and freshly updated through an outage, and the proxy served its
last snapshot indefinitely. Carry stale and fetchedAt through the source as
Fire Perimeters does, date a stale snapshot by its fetch, and stop serving a
snapshot more than 24 hours old.
2026-11-03 14:34:01 -08:00
Sameh Khamis 6bdedd8523 fix(drone-airspace): refuse empty or incompletely paged FAA snapshots
An upstream answer whose zones all fail validation normalized to an empty
list, and paging that stopped at the page limit while the service still
flagged more records was accepted as complete. Both were cached as a fresh
snapshot for an hour and replaced the last good one. Treat them as failed
refreshes so stale-on-error keeps serving the previous snapshot.
2026-11-03 14:33:10 -08:00
Matt Van Horn 08b8be26fe Merge remote-tracking branch 'upstream/main' into fix/drone-airspace
# Conflicts:
#	docs/CURRENT-STATE.md
#	src/app/constructCatalog.test.mjs
#	src/app/sourceComposition.test.mjs
#	src/data/layerState.test.mjs
#	src/data/layerStateTokenLedger.test.mjs
#	src/i18n/locales/ar.json
2026-11-03 11:55:42 -08:00
manjunath22466 340ba840ac Merge branch 'main' into feat/typed-ai-chat 2026-11-04 00:34:22 +05:30
Sameh Khamis 0e3b1f67cf Merge branch 'main' into manjunath/hal-769-gev-ux-improve-visibility-of-the-250-km-radius-circle
# Conflicts:
#	scripts/format-scope.json
#	src/layers/awareness/policy.js
#	src/layers/awareness/rendering.js
2026-11-03 11:00:53 -08:00
manjunath22466 976ea38a7f Merge branch 'main' into feat/typed-ai-chat 2026-11-04 00:30:37 +05:30
Sameh Khamis 4fc889ad19 Merge branch 'main' into manjunath/hal-769-range-ring-visibility 2026-11-03 10:48:55 -08:00
manjunath22466 fe78b3ebc9 Merge branch 'main' into feat/typed-ai-chat 2026-11-04 00:17:47 +05:30
Sameh Khamis 02a6739466 fix(awareness): follow a gesture to its last contact, and drop it on blur
Lifting one finger of a pinch removed the document listeners, so the
remaining finger's drag, which Cesium carries on with, stopped counting.
A gesture now ends only when its last pointer lifts or no touches are
left. And a gesture whose end never reaches the page (the window loses
focus mid-drag, or the page is hidden) left the listeners attached, so
a later unrelated drag counted as camera input; a blur or hidden page
now stops following it and drops its pending input.
2026-11-03 10:47:23 -08:00
Matt Van Horn 038b4f3ef6 Merge remote-tracking branch 'upstream/main' into fix/houston-cctv-pack
# Conflicts:
#	docs/CURRENT-STATE.md
2026-11-03 10:41:50 -08:00
Sameh Khamis de634952ec fix(awareness): keep a long drag or touch counting as camera input
Only canvas events refreshed the 1.5 s input window, and a touch only on
touchstart. Cesium follows a drag that leaves the canvas at document
level (in Firefox, and wherever there are no pointer events), so a long
gesture kept moving the camera after the window closed, and the pulses
rested mid-gesture. From a pointer or touch start on the canvas until
its end or cancel, moves at document level now count too; the listeners
go when the gesture ends or the layer detaches.
2026-11-03 10:40:30 -08:00
Sameh Khamis 56a7cacbec fix(awareness): ignore canvas input while the cockpit owns the camera
The cockpit turns Cesium's camera controls off and moves the camera on
its own, so a click, drag or wheel on the canvas moved nothing yet still
counted as the user handling the map: the cockpit's next move woke a
nine-second pulse burst. Input now counts only while the camera controls
take it, and a gesture still pending when another owner takes the
camera is dropped.
2026-11-03 10:39:09 -08:00
German Khokhlov e8735163c7 Merge branch 'main' into upstream/traffic-paired-flow-density 2026-11-03 22:38:31 +04:00
Sameh Khamis 0d32f59b40 Merge branch 'main' into manjunath/hal-769-range-ring-visibility
# Conflicts:
#	scripts/format-scope.json
2026-11-03 10:33:19 -08:00
Sameh Khamis 553f0c06ee Merge branch 'main' into feat/voice-geometry 2026-11-03 09:49:42 -08:00
manjunath22466 7618be4930 Merge branch 'main' into feat/typed-ai-chat 2026-11-03 23:17:25 +05:30
Manjunath a851199f5b fix(awareness): rest the range pulses unless the user moves the camera
Review follow-ups for the sonar pulses.

Wake on user input only: a camera move wakes the pulses only within
1.5 s of a pointer, wheel or touch on the Cesium canvas, where its
camera controller listens. Tracking, the cockpit view, an orbit or a
fly-to move the camera on every frame and no longer keep the pulses
running. Keys don't count: the camera controller reads none.

Below the disc: with the camera under 2.5 km the pulses rest
completely, with no disc, ring flash, echoes or frame requests.

Echo brightness: echoes scale by the contact bracket's drawn alpha,
which includes the Cyber sonar sweep, rounded to the nearest band with
no floor, so an echo is never brighter than its bracket.

Disc follow: the pulse disc follows the subject by a model-matrix
rotation about the Earth's centre and is rebuilt only every 20 km
instead of every 500 m.

Tests: a cap on burst length; teardown through disable(); the echo's
spread and alpha on the canvas; echoes under the Cyber sonar never
brighter than their bracket; waking by pointer, wheel, touch and drag
but not by keys, app camera moves or stale input; the rest below the
disc; and tighter asserts. CURRENT-STATE notes that terrain above
2.5 km still cuts through the disc and ring.
2026-11-03 22:50:32 +05:30
Sameh Khamis 68667e2e3c fix(area): accept "State of Texas" and "USA" as the units they name
resolve_area compared the spoken name with the unit's name literally, so
"State of Texas" (admin1) and "USA" or "UK" (country) were refused with
AREA_IDENTITY_MISMATCH although the bundled matcher found exactly those
units. Both identity checks, the bundled one and the outline ladder's, now
also accept the prefix forms and same-unit country aliases the matcher
reads, at the level they imply, so the level check still applies.
"Great Britain", "Britain", "America" and "Korea" still need their own
names, and the natural-region check stays literal.
2026-11-03 09:12:28 -08:00
Sameh Khamis b817d5802b fix(camera): let a two-finger tilt win over finger-spacing drift
Above 300 km the guard treated any shrinking pinch distance as an outward
zoom, so a two-finger tilt whose fingers drifted slightly closer had its
pitch overwritten. A two-finger gesture now counts as a zoom only when the
spacing changes more than the fingers' midpoint moves.
2026-11-03 09:10:58 -08:00
Sameh Khamis 08ff7f3e9d fix(camera): let a camera above the zoom ceiling zoom in without a jump
Cesium clamps any zoom that starts above maximumZoomDistance to that
limit, in either direction, so a share link or flight that left the
camera above 40,000 km jumped to the ceiling on the first wheel tick.
While the camera is above the ceiling, the guard now uses its current
height as the limit and lowers it as the camera descends.
2026-11-03 09:09:55 -08:00
Sameh Khamis 540629a0fc fix(osm): keep a capped place list incomplete in analyst follow-ups
osm_query said "At least N" when the server capped its list, but handed
the places to the analyst engine with truncated:false, so "which of those
have emergency?" answered as if the list were whole. The handoff now
carries the cap and its caveat, and follow-ups (and their follow-ups)
stay incomplete with an unknown total.
2026-11-03 09:09:28 -08:00
Sameh Khamis 4efba8ccca fix(osm): end the server's place search before the voice answer gives up
The voice answer waited 25 s for /api/osm/features, while the server let
Overpass run for 25 s and itself waited up to 40 s per endpoint and 45 s
in all. When the browser gave up first it closed the request, the route
cancelled the upstream query, and nothing was cached, so the OSM_TIMEOUT
retry started the same query from scratch and timed out again.

The server now tells Overpass 20 s, waits 22 s per endpoint and 22 s in
all, which ends inside the client's 25 s. A test pins that ordering.
2026-11-03 09:08:16 -08:00
Sameh Khamis 51637a5e96 Merge branch 'main' into feat/voice-geometry
# Conflicts:
#	SECURITY.md
#	scripts/format-scope.json
#	src/app/constructCatalog.test.mjs
#	src/app/sourceComposition.test.mjs
#	src/firstRunExperience.test.mjs
#	src/i18n/locales/ar.json
#	src/i18n/locales/de.json
#	src/i18n/locales/es.json
#	src/i18n/locales/fr.json
#	src/i18n/locales/it.json
#	src/i18n/locales/ja.json
#	src/i18n/locales/pt.json
#	src/i18n/locales/ru.json
#	src/i18n/locales/uk.json
#	src/i18n/locales/zh-CN.json
#	src/i18n/locales/zh-Hant.json
#	src/voice/actionSchemas.test.mjs
2026-11-03 09:07:16 -08:00
Sameh Khamis d5a568e55f Merge branch 'main' into fix/zoom-out-runaway 2026-11-03 09:04:51 -08:00
manjunath22466 0a8d824124 fix(voice): keep a stopped round's actions and follow-up memory
A reply stopped partway through a round now keeps the actions that ran,
answering the calls it never reached as skipped, so the history stays
paired for both providers. A failed typed turn no longer resets the
pointer, referents and follow-up memory, since its conversation continues.

The server now tells a rejected key (401, or Gemini's 400 with reason
API_KEY_INVALID, matched exactly), denied access (403) and an account out
of credit (OpenAI's 429 insufficient_quota) apart; each cools down for a
minute and gets its own message in the chat.
2026-11-03 22:34:21 +05:30
manjunath22466 9d4d7b3ee0 Merge branch 'main' into feat/typed-ai-chat 2026-11-03 22:02:28 +05:30
manjunath22466 da8b0dd8cd fix(voice): address review of typed AI chat
Typed chat sessions no longer end on the voice inactivity timeout, and a
failed or stopped reply keeps the conversation: Stop cancels only the
reply in progress, and map actions that already ran stay in the model's
context. Each upstream request and map action gets its own deadline, old
tool results shrink instead of the history overflowing, and step limits,
a missing or rejected key, the OAuth lock and throttling each get their
own message.

- Server: OpenAI chat is off under GEV_PREFER_CODEX_OAUTH; chat throttles
  default to the provider's throttle; replies carry API_KEY_MISSING,
  API_KEY_REJECTED, CODEX_OAUTH_REQUIRED and RATE_LIMITED codes; upstream
  Retry-After passes through, and a rejected key (Gemini's invalid-key 400
  included) cools down for a minute
- Pinokio forwards the chat throttle settings
- UI: the reply reveal publishes only the message list; the border orbit
  runs only while busy; layers attach with a button or Enter; the log is
  aria-busy while a reply types out; auto-scroll respects a reader who
  scrolled up; Escape closes the attach menu; the chat gear says Settings;
  a note says chat bills the OpenAI key when voice uses ChatGPT sign-in
- Layout does less work while panel height animates; unused blurs removed
- Gemini voice start ends chat; the voice preview clears on every new
  session
- Tests for the route gates, client limits, attachments and the fixes
2026-11-03 22:01:08 +05:30
Said Turksever fa8db45d63 Merge commit '2ebde97fb3af19402eab83fca2bfbec9ddfd166a' into easy-wins-20261103-pr1518 2026-11-03 16:17:33 +00:00
Said Turksever a0924c00d7 fix: resolve review findings and refresh PR #1518 against main 2026-11-03 16:17:30 +00:00
manjunath22466 11cd0142ac Merge remote-tracking branch 'upstream/main' into feat/typed-ai-chat 2026-11-03 21:22:43 +05:30
Said Turksever bc6af1ccd1 Merge branch 'main' into feat/radio-country-coverage 2026-11-03 15:46:24 +00:00
Said Turksever 3afbd0c638 Merge branch 'main' into fix/d-military-positionless-rows 2026-11-03 15:28:59 +00:00
Said Turksever 34906c9abb Merge branch 'main' into codex/overpass-admission-review-fixes 2026-11-03 15:07:08 +00:00
Manjunath 686bc4fd0e fix(awareness): draw the 250 km range ring as an unpickable primitive
The range ring was a Cesium entity, and entities are always picked, so
a click or tap on its edge became an unowned hit: vessel selection read
it as empty space and pickContact stopped its touch search there. A
contact under the 250 km edge was hard to select.

The ring is now a polyline primitive with allowPicking false, in the
same PolylineOutline material and 4 px width the entity used, so it
draws the same. The flash while pulses run writes the material's colour
alphas from the pulses' per-frame update; under reduced motion the
colours stay at full and no listener is added. A subject that moves
250 m rebuilds the primitive and keeps the material, so a flash carries
on across the move. Viewers without a usable primitive collection
(headless tools, stubs) still get a static entity.

The ring's geometry options come from awarenessRingGeometryOptions,
tested directly, and the tests now check that the awareness visual adds
no entity and that every primitive it adds is unpickable, with and
without reduced motion.
2026-11-03 20:25:30 +05:30
Said Turksever 94e4c2176e fix(radio): canonicalize priority country aliases before querying 2026-11-03 14:50:23 +00:00
Said Turksever a6d20120a7 Merge upstream main into PR #1435 for integration review 2026-11-03 14:50:23 +00:00
Said Turksever aff540ad39 Merge upstream main into PR #1206 for integration review 2026-11-03 14:50:23 +00:00
Manjunath 0f56b3147b fix(awareness): stop the subject echoing itself and cover the echo wiring
Remaining review follow-ups for the sonar pulses.

No self-echo: pulses are born 5 km out (startFraction of the radius),
but contacts nearer than that, the subject included, still lit on every
pulse birth. They now never echo. Just past the birth ring, an echo is
scaled with the front's own fade-in, so a bracket no longer flashes
before a visible front reaches it. The ring flash at the full radius is
unchanged.

Older Safari: the reduced-motion listener falls back to the media
query's addListener / removeListener when addEventListener is missing,
as other modules here already do.

Echo wiring test: a detectionHost test now paints through the real
detection lane with an echo field set, and checks the echo stroke takes
the echo colour on the default style and each style's line colour under
CRT, NVG and FLIR. CURRENT-STATE notes the 5 km no-echo zone.
2026-11-03 20:04:33 +05:30
Said Turksever 8e40d2689b Merge branch 'main' into prereq-10-osm-overlays 2026-11-03 14:34:32 +00:00
Said Turksever a236504347 fix: respect camera ownership and finish outward zoom framing 2026-11-03 14:32:30 +00:00
quanticsoul4772 8b363d39f6 Merge branch 'main' into upstream/traffic-paired-flow-density 2026-11-03 06:20:51 -08:00