Commit Graph
27 Commits
Author SHA1 Message Date
German Khokhlov 3973772b83 fix(recent-imagery): keep a half confirmed empty when the other half's request fails
When one half of a dateline box rejects or hits its deadline and the other
half answered Data-Present: false, the thrown error now carries the per-half
answers, and the loader merges them as it does for a 503 or a missing header.
The empty side stays undraped and DETAILS shows partial coverage.
2026-11-20 23:36:39 +04:00
German Khokhlov 8604968746 fix(recent-imagery): keep a half's explicit answer when the other half's probe fails
- The loader reads each half's Data-Present answer whatever the response
  status, and merges it before the thumbnail status rule, so a side Worldview
  confirmed empty stays undraped when the other side answers 503 or without
  the header, on a first probe and on a re-probe.
- DETAILS shows partial coverage for a day with a confirmed-empty side even
  when its probe failed.
- The dateline layer tests live in index.test.mjs on its shared fixture; the
  rendering test uses the model's boxKey.
2026-11-20 20:39:51 +04:00
German Khokhlov 8fd0a35f6a Merge main into byrdit/recent-imagery-dateline 2026-11-20 17:38:13 +04:00
German Khokhlov 06dccdb00f Recent Imagery: hand a deferred slot over when the pick gives way to an empty card
While a user pick kept first claim on the slot of an empty automatic
day, a click or an arrow key onto a card already confirmed empty dropped
that pick but left the hand-over waiting for the next probe result. Until
then the map stayed blank and the Esri lease stayed held, where main
showed the next ranked day.

focus() and preview() now hand the slot over at once when no pick is
left. An arrow key onto an empty card no longer follows that day, as a
click already did, so focus stays on the card the user chose.
2026-11-20 12:35:22 +04:00
German Khokhlov 8eac8bd545 Recent Imagery: defer the hand-over to a waiting pick instead of skipping it
The previous change skipped the hand-over for good while a user pick was
pending. When that pick then probed empty, failed with a terminal error,
or lost its source, nothing previewed and the slot stayed blank, where
main would have draped the next ranked day. During the arrow-key
debounce the empty slot also handed the Esri lease back and took it
again 250 ms later.

The hand-over is now deferred: the pick keeps first claim on the slot
while its probe can still settle, and the next ranked day takes over as
soon as the pick turns out empty, errors or loses its source. Turning a
source off also drops a followed pick of that source. The layer keeps
the current basemap while a deferred pick waits, and Escape releases it.
Six tests cover both answer orders, the source toggle, a terminal error,
the debounce and the lease.
2026-11-20 11:57:55 +04:00
German Khokhlov 35f69e84df Recent Imagery: keep a picked day when the automatic preview probes empty
A card click on an unprobed day follows that day while the automatic
preview stays on the map. If the automatic day then probed empty, the
hand-over to the next ranked day overwrote that follow, so neither the
picked day nor the successor draped when their probes came back
present. The hand-over now leaves the slot to a day the user picked that
is still being probed or waiting out the arrow-key debounce.

Also covers the off-screen successor with empty days shown: once the
visible days probe empty, the successor's probe is queued (the re-request
that came with the merge from main) and the day drapes when present.
2026-11-20 00:33:12 +04:00
German Khokhlov ea8ad63632 Merge remote-tracking branch 'origin/main' into german/recent-imagery-auto-successor
# Conflicts:
#	docs/CURRENT-STATE.md
2026-11-20 00:30:25 +04:00
German Khokhlov 5555aba82c Merge main into byrdit/recent-imagery-dateline
Resolve the Recent Imagery conflicts on main's renderer ports: dateline slots drape up to two globe-port layers, the drag preview draws a box across ±180°.
2026-11-19 19:14:59 +04:00
German Khokhlov fc137bef85 fix(recent-imagery): keep drapes and proven halves steady across re-probes
- The renderer compares the rectangles it actually drapes, so a probe that
  confirms the same halves no longer rebuilds a shown layer.
- A re-probe of a present day keeps a side it proved earlier through a
  transient failure and drops it only on fresh empty evidence.
- DETAILS shows partial coverage when a side is confirmed empty; the
  presentBoxes contract of the source is documented.
- probeHalf, the presentBoxes filter, requestBoxes and mount are simplified;
  the frozen-response Proxy is gone.
- Duplicate source tests move into their own suites and share the existing
  fixtures; tests pin the exact ±180 seam and the dateline refusals.
- Comments, CURRENT-STATE and the changelog fragment are shortened and match
  the JPEG / PNG drape rules.
2026-11-19 18:50:06 +04:00
German Khokhlov 3348e3517e Merge branch 'main' into perf/imagery-stale-thumbnail-cancellation-20260929
# Conflicts:
#	docs/CURRENT-STATE.md
2026-11-18 16:35:39 +04:00
brandonabyrd ccffaeca4d style: format imagery regression test 2026-11-13 17:12:48 -06:00
brandonabyrd 154d3388e5 fix: refresh imagery halves after thumbnail probes 2026-11-13 17:12:48 -06:00
Byrd-IT ca14954636 fix(recent-imagery): take the short arc when a box is dragged across the dateline
A drag across ±180° was turned into a min/max box about 360° wide and refused
as "Box is 38,332 km wide", and validateBox() refused any west > east box. A
drag whose corners are more than 180° apart is now the short box (west > east),
and the layer handles it end to end:

- model: lonSpanDeg() and nonCrossingBoxes(); validateBox, boxSideKm,
  boxCentre, boxFromPin and coverageFor read a west > east box as the short arc.
- catalog: CMR reads a west > east bounding_box as the short box, so the box
  is sent as it is.
- rendering: the slot drapes one imagery layer per side of ±180°.
- Worldview Snapshots rejects a west > east BBOX, so snapshot URLs, EXPORT and
  get_recent_imagery refuse a dateline box and request nothing; thumbnail and
  Data-Present probes use the box's wider side.
2026-11-13 17:12:47 -06:00
German Khokhlov def87c4dc0 Recent Imagery: drape the next ranked day when the automatic day is empty
When the automatic day probes empty, pruneEmpty() hands it over to the
next ranked day and follows that day until its probe answers. The
thumbnail subscriber previews a followed day only while it is focused,
but focus did not move with the hand-over: autoPreview() sets focus only
when there is none, and reconcileFocus() moves focus off a hidden card
to the nearest card, not to the next ranked day. With empty days shown,
focus stayed on the empty day; with them hidden, it could land on an
older neighbour. Either way the successor probed present and never
reached the map.

autoPreview() now takes the empty automatic day, and focus still on it
moves to the successor. Focus the user moved elsewhere stays put. Two
layer tests cover both cases; both fail without the change.
2026-11-13 18:45:37 +04:00
Kevin Rajan 4554cdf5c6 fix(imagery): re-probe cancelled auto-preview successor (merge main)
Reschedule thumbnail intent when pruning an empty automatic day changes
follow/preview, so a scrolled-off VIIRS successor cannot stay pending.

Add node:test regression for the cancelled successor. Preserve current main's
voice-cancel handling and changelog/docs. Review credit: gekh and
quanticsoul4772.

Tests not run locally; verify with node --test.
2026-11-10 10:48:03 -06:00
Sameh Khamis fd42fc0afd Merge main through #1495 into the renderer seam
Brings in radio country coverage (#1206), the restored format scope
(#1527), the zoom-out guard (#1522), voice geometry and OSM places (#846)
and paired traffic flow density (#1495).

What main added that reached Cesium or the viewer now goes through the
renderer:
- The zoom-out guard reads the Cesium camera controller's own input, so
  it moves into the adapter (src/render/cesium/zoomOutGuard.js). The
  application installs it through the scene's viewer hooks, and a scene
  whose renderer gives no guard starts without one.
- OSM places draws its points as a draw set, clamped to the ground.
- The voice area actions read the view box and the view centre from the
  camera port.
- The voice workflow harness is test support, named as such where the
  recent-imagery doubles are.
2026-11-09 18:51:30 -08:00
Sameh Khamis a8a9cc73a4 Map stacks off the Cesium allow-list: providers move into the Cesium adapter
The map stacks' imagery, terrain and Google 3D factories move into the
Cesium adapter (src/render/cesium/mapImagery.js, mapTerrain.js,
google3d.js); the ./maps/imagery, ./maps/terrain and ./maps/3d exports
point there. The catalog names its ion stacks by asset number, and the
map source controller and default sources are Cesium-free: they
build providers and switch imagery layers, terrain, tilesets and the
globe's visibility through a map engine (src/maps/engine.js) that the
Cesium adapter provides as it loads (mapEngine.js), through the
application's renderer or the ./render/cesium/unbound export. The
controller and createDefaultMapSources also take it as an `engine`
option.

src/maps/catalog.js, controller.js, imagery.js, terrain.js and google3d.js
leave the allow-list.
2026-11-09 12:11:42 -08:00
Sameh Khamis 04a764ed86 Draw the Recent Imagery box preview through the draw port, off the Cesium list
The box being dragged was two Cesium entities on a data source of its own.
It is now a clamped colour rectangle in a shapes set and a draped dashed
outline in a lines set, both unpickable, with the same colour, alpha,
width and dash length. The Cesium draw port now redraws a moved clamped
fill in the frame it moves, so the box shows on every frame of the drag.
The fill shows once the box has an area. The outline shows once the box
has any extent, so a drag along one axis still draws a line. The last box
is kept hidden between drags, and the next drag moves it.

markBaseTileset moves to a Cesium-free module, src/render/baseTilesets.js.
The globe port reads it and re-exports it, so a tileset a caller marks
as its base is still draped on. rendering.js no longer imports Cesium or
reaches the viewer and leaves the Cesium allow-list. The application's
tools loaded the globe factory only through it, so embed.js now loads it.
2026-11-08 21:18:56 -08:00
Sameh Khamis 81d8e3a4a7 Move geo import, voice capture, visual settings, scope mask and recent imagery onto the renderer ports
Geo import asks the frame port for renders, the camera port for moveEnd and
the globe port's progress for the terrain queue running dry; its data sources
are added, removed and shown by the listed geoImportPins module. Voice capture
waits on the frame port's postRender. Visual settings toggle the infrared fog
through the globe sky port, and the anime style dims the Milky Way through a
sky getter it is given. The scope mask reads the camera height and listens on
the frame and camera ports. Recent imagery picks the view centre, reads the
view rectangle and the field of view through the query and camera ports.
Installations claim camera sensitivity from their rendering module. The
application shell loads the unbound globe factory.
2026-11-07 18:10:39 -08:00
Sameh Khamis d928c30337 Move the imagery box preview into the recent imagery renderer
The box selection tool no longer builds Cesium entities itself: its fill
and dashed outline live in createImageryBoxPreview in the recent imagery
rendering module, and the tool takes the preview as a dependency. The
cockpit contact card reads the nearest contact's position with the geo
helpers. Both files leave the allow-list.

Tests now inject the preview with the Cesium double, check that a second
destroy returns the same promise, and pin the nose-relative bearing to a
known contact.
2026-11-07 03:11:51 -08:00
Sameh Khamis b1733fa41a Drape recent imagery through the renderer's globe port
The two recent imagery slots now add their GIBS layers through the
globe port and share their six-request budget through its admission
hook. The port moves the layers between the globe and the base tileset,
which the renderer now marks as a base when it is the host.

The renderer stays the layer's Cesium side: it still loads the camera
factory, and now the globe factory too. The weather and wind entries
load the globe factory as well, and the factory check counts callers
that take findGlobe as a default.
2026-11-06 20:06:40 -08:00
Sameh Khamis c5b716b107 Fly layer focus flights through the camera port
flyToBounds takes an easing, as flyTo does: in the contract, the Cesium
port and the reference recorder, pinned by a new conformance trace.

The flights of radio, awareness, CCTV, submarine cables, cyclones, the
launch preview, installations, ALPR, street-level framing, recent
imagery, weather and world focus now go through the renderer's camera
port. Street-level framing cancels its own flight handle rather than
whatever flight is current. worldFocus.js no longer reaches Cesium and
leaves the allow-list.

Layer pose reads stay for each layer's own slice. The local GeoJSON
flight stays on Cesium: gods-eye-view/infrastructure is used with plain
Cesium viewers that have no renderer bound.
2026-11-05 20:46:58 -08:00
Manjunath 40d8839589 fix(voice): localize the area, imagery and OSM cards and tidy OSM Places
From review:
- Card lines the actions write in English (area basis, part counts, merged
  duplicates, OSM caveats, the imagery window) are shown in the UI
  language through the analyst card's note path; the model still gets the
  English. One OSM place reads "1 hospital".
- Same-named clarification choices show their region code (WA, DC).
- OSM Places shows as unavailable once the server says no Overpass is
  configured, and its points are depth-tested past 2.5 km so they never
  show through the globe.
- find_imagery puts the operator's sources and mode back when a box is
  refused, and a voice search cancelled mid-flight leaves "Search
  cancelled" instead of an empty strip.
- The README lists OSM Places with the other Utilities.
2026-11-03 19:36:48 +05:30
Kevin Rajan cc0f6a8f15 Reconcile Recent Imagery cancellation with current acquisition (#881)
Preserve current injected thumbnail source and all origin changes.
Keep stale-intent cancellation without reintroducing direct WVS requests;
count a known-present aborted re-fetch once across repeated retention,
add its regression, and use a changelog fragment. Fix docs header
placement; preserve quanticsoul4772's review provenance.
2026-10-20 02:18:56 -05:00
German KhokhlovandClaude Opus 5.5 2b6ccad732 fix(i18n): fix Russian layouts and the gaps the screenshot review found
A review of the Russian UI screenshots found ~90 places where longer words
broke the layout or text was still English. Fixed so they hold for any
language, then shortened where a control is short by design.

- Layout: label columns that size to their text (weather and wind settings,
  Recent Imagery slots and opacity, style sliders, display panel), layer
  list names and icons, buttons that wrap instead of overflowing (CCTV,
  scenes, Bhote Koshi), voice header that always shows the cost, styled
  EN | ES | RU chips, voice error tray above the dock.
- t() context: t('CLEAR', { context: 'action' }) is «СБРОСИТЬ» while the sky
  stays «ЯСНО»; also used for radio categories, voice states and directions.
- Units and dates follow the locale through src/ui/unitLabels.js
  (formatQuantity: localized number, translated unit, non-breaking space):
  wind, pressure, cyclones, directions, CCTV, SDR gain, scene timing, flight
  tooltip, Recent Imagery dates and resolution.
- Newly translated: directions turn-by-turn steps (built from the maneuver;
  English matches the server word for word), HUD mode and summary, voice
  card states, radio categories on the globe, CCTV status, layer source
  lines, scene dialogs (Cancel, file pickers), Bhote Koshi statuses, titles,
  comparison dates and caveat, Recent Imagery notices. Stored data and text
  for AI tools stay English.
- es and ru: 1,885 messages each.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-12 21:18:03 +04:00
Kevin Rajan ab0754623e test: prove imagery layer retains current thumbnail intent 2026-09-29 13:38:46 -05:00
Bilawal Sidhuandmanjunath22466 082074a006 feat(layers): Recent Imagery — open satellite imagery for a selected box (#716)
Select a box on the world and browse the last 30 days of open satellite imagery over it, keyless: NASA GIBS Harmonized Landsat Sentinel-2 (30 m) and the VIIRS daily overview (250 m), with a day strip, IMAGE / VS BASEMAP / A / B modes with a swipe divider, PNG export and share links. The before/after swipe from the Nepal scene moves into shared modules so both use it.

Co-authored-by: manjunath22466 <[email protected]>
2026-09-22 20:34:11 -05:00