mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-19 01:32:19 +00:00
Compare commits
77
Commits
No files matched your search
@@ -287,6 +287,7 @@ The optional Local ADS-B layer and the broadcast-FM receiver use radio you recei
|
||||
- **Acartia.** Keyless. `/api/acartia/sightings` reads the current 7-day marine-mammal feed for ALL, MAMMALS and WHALES views intersecting 45.5–50.5° N, 126–121° W in the Salish Sea. WHALES accepts recognized cetaceans; other identified marine mammals appear under ALL/MAMMALS. The server rounds positions to 0.01° and drops comments before caching projected records (10 min fresh, stale ≤24 h); raw responses are not retained. Selected text cards credit the reporting provider under CC BY 4.0 and show Be Whale Wise guidance. `/sightings/current` answers without a key today, but Acartia's README asks API users to create an account and generate an API key on the [Acartia dashboard](https://acartia.io/) and to follow its [community guidelines](https://acartia.io/register). Attribution also appears in the layer row and Data attribution popover. Opportunistic sightings, not a census.
|
||||
- **Mapped installations.** OpenFreeMap military polygons use a bundled Overture/OSM name index; wide views show named points. Optional operator-configured Overpass and explicit Google Places searches keep their own source paths. Mapped data does not establish current activity or complete coverage.
|
||||
- **Place search.** Named-place fly-to uses Google Geocoding when a Maps key is configured, then Photon (`PHOTON_URL`; unset uses the public instance, empty disables it), then `/api/geocode` (Nominatim search) when neither answers. `/api/geocode` and the voice outline route `/api/geocode/outline` share one Nominatim queue (`NOMINATIM_URL`; unset, empty and invalid values disable it; an operator must explicitly select an authorized endpoint): one request at a time at least 1.1 s apart, an identifying `User-Agent` and `Referer`, a short queue that refuses a burst, a pause after 429/403/5xx answers (honouring `Retry-After` in full), at most one retry after a network failure, and a per-install daily cap on public-instance requests (`NOMINATIM_DAILY_CAP`, default 50). Processes using the same installation state file hold one lock through the actual fetch invocation and recording the next public start, with the daily slot persisted before invocation; restarts share that count, spacing and any pause. An unfinished dispatch marker fails closed until operator recovery; it is never automatically reclaimed. Public access fails closed if the state file cannot be read, locked, written or semantically validated. This coordination does not span independent installations or state directories and does not establish an application-wide public-service allowance or authorize public use. An operator-selected non-public endpoint is outside the public cap, spacing and durable-state requirement; an upstream cooldown is kept with the endpoint that returned it rather than leaking across operator URLs. Answers are cached on disk (outlines 90 days, places 30 days, no-results 24 hours); failures are not cached. Outlines are looked up only for an explicit ask, after bundled data and any configured Overpass, and only results whose type suits the ask are used. Administrative outline responses expose country/admin-1/admin-2 identity only when the selected Nominatim row has a recognized, unambiguous address type consistent with its own name; numeric rank, ambiguous types, missing fields and contradictory names do not manufacture identity. It is not used for systematic or bulk queries.
|
||||
- **Place suggestions.** The search box's suggester (`src/search/placeSuggestions.js`) asks Photon for a few candidates while a place is typed: at most one request every 500 ms per tab (shared by every search box), a six-second limit for the whole answer, none for a minute after a refusal, a failed request or a timeout, and text capped at 200 characters. Text that may be private is never sent: an email address, seven or more digits however separated (a street address's house number and postcode excepted, unless a word such as "card" or "phone" names the number), an IBAN shape, a password, PIN, token or key. An empty `PHOTON_URL` turns suggestions off along with the place search. Answers are cached in the tab.
|
||||
- **Street and building outlines.** Voice street highlights, pointed-at buildings and grounds use the OpenFreeMap vector tiles the traffic layer already loads. Traffic and outlines share one bounded pending fetch/decode owner per immutable XYZ tile; materialized outline geometry is charged to the retained-byte ceiling and capped by coordinate count. Consumer result caches and request lifetimes remain independent, while eviction or explicit teardown cancels queued idle projections and releases their decoded owner. No Overpass request is made unless `OVERPASS_UPSTREAMS` is configured. Named grounds require a returned name matching the selected place, except that an ask whose head noun names a kind of grounds (a school, university or college, hospital, cemetery, stadium or zoo) may use the part of the smallest unnamed tile area of that class that holds the resolved place; a differently named area never answers. Other anonymous landcover polygons cannot establish identity, so unsupported grounds stay unavailable rather than borrowing a nearby POI name.
|
||||
- **Voice areas and place search.** Voice areas (`resolve_area`) use the same outline sources as voice outlines. Voice place search (`osm_query`, `/api/osm/features`) runs only on an operator-configured Overpass: a fixed list of kinds, a bounded box and result count, one query at a time, answers cached for a day. It never uses Nominatim.
|
||||
- **Cockpit regional briefing.** `/api/regional-brief` rounds aircraft coordinates into 0.1° cache cells, caches results for five minutes, and resolves physical regions from bundled public-domain Natural Earth polygons without reverse-geocoding requests. Google News RSS is queried with the resolved locality/region first; GDELT is used only when that RSS query fails or is empty. Google's published Google News terms restrict that source to personal, noncommercial use, so commercial deployments must disable/replace it or obtain separate permission; GDELT permits commercial dataset use with citation. The Data attribution popover identifies the active headline sources; article links retain publisher attribution. Headlines are location-query matches, not verified incidents, risk rankings, or evidence that a location is safe. Empty, partial, stale, and unavailable source states remain distinct. Open-Meteo supplies current conditions independently of the news source. `WX OFF` disables cockpit weather rendering only; the Local Info briefing still fetches its source-backed weather values and displays the required linked Open-Meteo credit.
|
||||
@@ -424,6 +425,7 @@ The [Bhote Koshi event pack](public/events/bhote-koshi-2026/README.md), under `p
|
||||
| **Natural Earth disputed areas** (11 of the source's 99 features, hand-picked; [list](src/data/local_data/natural_earth/README.md#disputed-areas-disputed_areasjson)) | `natural_earth/` | **Public domain** | ✅ (no restrictions) | "Made with Natural Earth" (courtesy credit — not legally required) |
|
||||
| **Natural Earth populated places** (7,342 points: name, position, rank) | `natural_earth/` | **Public domain** | ✅ (no restrictions) | "Made with Natural Earth" (courtesy credit — not legally required) |
|
||||
| **Wikidata cities** (31,827 settlements of 15,000 people or more: name, position, population, country) | `wikidata_cities/` | **CC0 1.0** (public domain dedication) | ✅ (no restrictions) | "City, town and village names from Wikidata (CC0)" (courtesy credit — not legally required) |
|
||||
| **Wikidata places** (137,662 settlements of 1,000 to 14,999 people, none in the cities pack, in 732 tiles of 5°: name, position, population, country) | `wikidata_places/` | **CC0 1.0** (public domain dedication) | ✅ (no restrictions) | "City, town and village names from Wikidata (CC0)" (courtesy credit — not legally required) |
|
||||
| **US Census Bureau counties** (3,235 county polygons) | `us_census_counties/` | **Public domain** | ✅ (no restrictions) | "U.S. Census Bureau" (courtesy — not legally required) |
|
||||
| **US Census Bureau places** (32,629 city, town and CDP polygons) | `us_census_places/` | **Public domain** | ✅ (no restrictions) | "U.S. Census Bureau" (courtesy — not legally required) |
|
||||
| **Who's On First neighborhoods** (61,441 polygons) | `wof_neighborhoods/` | Per source: CC BY, ODC-By, Open Government licences, CC0, PDDL, public domain (folder `ATTRIBUTION.md`) | ✅ (attribution) | "Neighborhood boundaries: Who's On First and contributors"; per-source credits in the folder |
|
||||
@@ -537,6 +539,24 @@ CC0; credited "City, town and village names from Wikidata (CC0)" as a courtesy o
|
||||
the pack is shown. Rebuild: `node scripts/build-wikidata-cities.mjs`; provenance in the folder
|
||||
README. The app never calls Wikidata itself.
|
||||
|
||||
### Wikidata places (`wikidata_places/`)
|
||||
|
||||
Smaller settlements below the cities pack's cut-off: 137,662 places of 1,000 to 14,999 people
|
||||
that Wikidata states a population and coordinates for, read once from the Wikidata Query Service
|
||||
(built 2026-11-11), with the same columns as the cities pack. Items the cities pack already holds
|
||||
(1,084 with another stated population of 15,000 or more) are left out, and so are 1,272 second
|
||||
listings of one place (same name and country within 3 km). A lookup also prefers a city of the
|
||||
same name within 3 km over a smaller listing. They are split into 732
|
||||
tiles of 5 x 5 degrees (7,122,797 bytes of JSON, about 7.1 MB, with the index) named by their south-west corner, with an index of row counts.
|
||||
Nothing loads with the app: the Omnibar's "places near" strip, the places under a selected item
|
||||
and a small place found by name near the view read the index once and then only the tiles a
|
||||
lookup touches. CC0; credited "City, town and village names from Wikidata (CC0)" as a courtesy
|
||||
once a name from the packs is shown. Rebuild:
|
||||
`node scripts/build-wikidata-cities.mjs --tiles --min-population 1000 --max-population 15000`;
|
||||
the script that wrote the shipped tiles was not kept, and only the step from rows to files is
|
||||
checked offline (provenance and limits in the folder README). The app never calls Wikidata
|
||||
itself.
|
||||
|
||||
### Sky background (`sky/`)
|
||||
|
||||
Sources, licences, the changes CC BY asks to state, hashes and build commands
|
||||
|
||||
+7
-1
@@ -258,6 +258,12 @@ export function createBrowserViteConfig({
|
||||
mapillaryToken ?? '',
|
||||
),
|
||||
},
|
||||
build: { chunkSizeWarningLimit: 1500 },
|
||||
build: {
|
||||
chunkSizeWarningLimit: 1500,
|
||||
// The places pack's tiles stay files, read only when a lookup touches
|
||||
// them; inlined, the small ones would all load with the first lookup.
|
||||
assetsInlineLimit: (file) =>
|
||||
file.includes('/wikidata_places/') ? false : undefined,
|
||||
},
|
||||
};
|
||||
}
|
||||
@@ -3,10 +3,11 @@
|
||||
heading and HUD (in the page's language, via `getLocale` and
|
||||
`onLocaleChange` from `./i18n`); the camera can follow it without the
|
||||
ground clamp, anchored exactly on it, and a generic HUD adds source rows, a
|
||||
banner, a veil (off under reduced motion) and a bottom progress line. The
|
||||
Rail and Transit layers expose read and hold APIs so a selected train or
|
||||
vehicle can be ridden, and `./layers/rail/paths` is exported; that export
|
||||
and the read APIs are experimental. `docs/APPLICATION.md` shows a minimal
|
||||
provider. GEV itself registers none, and entry to the built-in aircraft,
|
||||
satellite and vessel views is unchanged; a provider's subject takes entry
|
||||
when it was selected after them (Denis Groshev, @ZloyS, #1686).
|
||||
banner, a veil (its light streaks stand still under reduced motion) and a
|
||||
bottom progress line. The Rail and Transit layers expose read and hold APIs
|
||||
so a selected train or vehicle can be ridden, and `./layers/rail/paths` is
|
||||
exported; that export and the read APIs are experimental.
|
||||
`docs/APPLICATION.md` shows a minimal provider. GEV itself registers none,
|
||||
and entry to the built-in aircraft, satellite and vessel views is
|
||||
unchanged; a provider's subject takes entry when it was selected after them
|
||||
(Denis Groshev, @ZloyS, #1686).
|
||||
@@ -0,0 +1,5 @@
|
||||
- Fix application Cockpit rides on Rail trains and Transit vehicles: a held
|
||||
parked vehicle no longer leaves its icon under the view, turning Transit off
|
||||
ends a hold, a view waits for the ground instead of standing on the
|
||||
ellipsoid, and GPS jitter at a platform no longer turns a ride around
|
||||
(German, @gekh, #1786).
|
||||
@@ -0,0 +1,11 @@
|
||||
- Keep an application's Cockpit subject steady. A subject whose entry frame
|
||||
gives a height stands there until a later frame or the floor under it gives
|
||||
another, so the view no longer ends while the floor loads. The camera keeps
|
||||
up when the browser draws few frames: updated every frame at 5 frames a
|
||||
second, it used to fall 700 m behind a 30 m/s subject in a minute. A
|
||||
provider's Live Signals rows change where they stand, their tone included,
|
||||
and rows it drops leave before new ones come in, so a changing ETA or a
|
||||
replaced row no longer pushes a steady warning off the list. Progress labels
|
||||
give CJK, kana and Hangul names the width they need. Labels, entry face and
|
||||
look keep their last good words when a later read fails
|
||||
(German, @gekh, #1787).
|
||||
@@ -0,0 +1 @@
|
||||
- The world timeline's speed control names its real-time speed **Real-time** instead of `1×`, beside `1 min/s`, `1 h/s`, `1 d/s` and `1 wk/s` (Sameh Khamis, @samehkhamis, #1805).
|
||||
@@ -0,0 +1,4 @@
|
||||
- An application can ask the Data Library's catalog with its own fetch
|
||||
(`createApplicationTools({ library: { fetchImpl } })`), for a server that
|
||||
wants the application's credentials on its library routes (samehkhamis,
|
||||
#1810).
|
||||
@@ -0,0 +1,6 @@
|
||||
- The place suggester asks Photon for candidates while a place is typed: at
|
||||
most one request every 500 ms per tab, none for a minute after a refusal
|
||||
or a failed request, and never text that may be private (an email address,
|
||||
long numbers, an IBAN shape, a password, PIN, token or key). An empty
|
||||
`PHOTON_URL` turns it off along with the place search. The search box that
|
||||
uses it follows (manjunath22466, samehkhamis, #1814).
|
||||
@@ -0,0 +1,3 @@
|
||||
- An application built with `createApplicationTools` can leave the Data Library
|
||||
out with `library: false`: no catalog is asked and no Browse button is drawn
|
||||
(samehkhamis, #1815).
|
||||
@@ -0,0 +1,4 @@
|
||||
- Bundle a pack of 137,662 smaller Wikidata settlements (1,000 to 14,999
|
||||
people, CC0) in 5° tiles, read only for the tiles a lookup touches, so
|
||||
nearby places and small places by name can be found without a place
|
||||
service (manjunath22466, samehkhamis, #1816).
|
||||
@@ -0,0 +1,4 @@
|
||||
- An aircraft feed can mark estimated positions (`estimatedByIcao` beside state
|
||||
vectors, `estimated: true` on a readsb-style row). Such a position still
|
||||
places the aircraft, but stands in on the tracked trail only until the next
|
||||
received one, so oceanic trails no longer zigzag (samehkhamis, #1817).
|
||||
@@ -0,0 +1,4 @@
|
||||
- Read a typed search line into places, layers, actions and questions,
|
||||
and pick what Enter runs, ready for the search bar; coordinates after
|
||||
"go to" are flown to, and text that may be private never leaves the
|
||||
app (manjunath22466, samehkhamis, #1818).
|
||||
@@ -0,0 +1,4 @@
|
||||
- Place suggestions keep more private text to the browser (a capital
|
||||
after "@", keys after "=" or in quotes, letter codes after a code label,
|
||||
phone numbers that looked like a postcode), and a house is suggested by
|
||||
its number and street (manjunath22466, samehkhamis, #1819).
|
||||
@@ -0,0 +1,6 @@
|
||||
- The fleet model set and its loader, the aircraft and vessel model
|
||||
resolvers, the icon-to-model handover distances, model lighting and part
|
||||
posing, and the vessel hull sprites are part of the package's public entry
|
||||
points as `gods-eye-view/fleet`, with declarations, so contacts can be drawn
|
||||
exactly as the Flights and Vessels layers draw them (Sameh Khamis,
|
||||
@samehkhamis, #XXXX).
|
||||
@@ -0,0 +1,3 @@
|
||||
- The fire layer module exports the FRP and Confidence filter its markers use
|
||||
(`filterFires`, `DEFAULT_FIRE_FILTER`), so an application that draws the same
|
||||
detections another way can apply the same filter.
|
||||
@@ -0,0 +1,12 @@
|
||||
- Add the Omnibar: one field for places, coordinates, map items, layers
|
||||
and commands, with a strip of nearby places, guided walks through the
|
||||
real controls (found by everyday wording such as "how do I change the
|
||||
map style"), plans such as "go to Austin and show flights", and Ask GEV
|
||||
for questions. On desktop the dock rises to a bar above the bottom with
|
||||
the map credits below it on the Power Up row, World Time hides while
|
||||
suggestions or chat are open, and the dock's Location and Visual trays
|
||||
and the HUD's mode readout give way to the Omnibar and the Visual panel.
|
||||
Phones get the field too, with the HUD readout under it on short
|
||||
screens. The last 20 places you went to from the Omnibar are kept in
|
||||
this browser (`localStorage` `gev:omnibar:recent-places`)
|
||||
(manjunath22466, samehkhamis, #1824).
|
||||
@@ -0,0 +1,10 @@
|
||||
- Remove the Cyber HUD layout and keep its sonar as a visual style. Display >
|
||||
HUD > Sonar turns it on over Tactical or Minimal; it is off by default and
|
||||
ON reveals its five sliders. Share links, scenes and saved views that name
|
||||
Cyber open in Tactical with Sonar on, links and scene shots carry Tactical
|
||||
with Sonar the same way, and the `set_cyber_sonar` voice action works under
|
||||
any layout. A newer Sonar choice takes precedence over a pending share-link
|
||||
restore. From 1200px wide the command dock and World Timeline sit 74px up,
|
||||
the map attribution sits on the Power Up baseline, and the coordinates start
|
||||
level with the bottom-right readout instead of overlapping the attribution
|
||||
and Power Up (manjunath22466, samehkhamis, #1825).
|
||||
@@ -0,0 +1,16 @@
|
||||
- Space Missions moves out of the Context panel into its own right-rail panel,
|
||||
with its own tab on phones, and becomes an ordinary layer. It no longer
|
||||
switches other layers off or refuses them while it runs, and Context leaves
|
||||
it and Satellites alone, so it runs beside Contacts in either order
|
||||
(Contacts no longer switches Satellites off). On desktop, opening Context or
|
||||
Space Missions collapses the other. Mission labels on the globe are
|
||||
clickable and select their mission, even where they sit over aircraft or
|
||||
ships, and picking a mission on the globe opens the panel. The Data Layers
|
||||
row gets previous and next mission controls. Share links keep the panel
|
||||
open or closed (a short link made from an older long link, which does not
|
||||
mention the panel, is two bytes longer), voice can open it, and Cockpit
|
||||
folds it away like the other map panels. An explicit user or voice
|
||||
Satellites off request made after Space Missions was switched on ends it
|
||||
and keeps Satellites off afterwards; scene, story, preset and other
|
||||
programmatic Satellites changes leave Space Missions running
|
||||
(manjunath22466, samehkhamis, #1826).
|
||||
@@ -0,0 +1,6 @@
|
||||
- Space Missions finishes switching off before anything else runs: a launch
|
||||
hovered while the layer is going off shows no preview, and Satellites
|
||||
keeps the state it was saved with when it is still busy. A click on a
|
||||
mission label reaches every layer so each can let go of what it had
|
||||
selected, and none of them selects, turns on, flies to or opens the link
|
||||
of what lies under the label (manjunath22466, samehkhamis, #1829).
|
||||
+3
-1
@@ -396,7 +396,9 @@ their `this`; one that throws or returns a promise is treated as having
|
||||
failed. What a method returns may carry getters: one that throws when read
|
||||
makes a candidate none, a frame malformed (the view ends) and a HUD view keep
|
||||
the last; a worded member (labels, entry face, look) that throws keeps its
|
||||
last good words.
|
||||
last good words. An entry face's `icon` is a Material Symbols name whose glyph
|
||||
the application's page must load (GEV's own `index.html` loads a subset, its
|
||||
`icon_names`); a glyph the page does not load renders as its name.
|
||||
|
||||
```js
|
||||
import { getLocale, onLocaleChange } from 'gods-eye-view/i18n';
|
||||
|
||||
@@ -781,8 +781,7 @@ palettes use `--gev-field-background`, `--gev-field-border-color`,
|
||||
`--gev-field-color` and `--gev-field-disabled-opacity`. Radio retains its own
|
||||
compact density and arrow space. CCTV owns calibration editor width in
|
||||
`cctv.css`; the shared inline density does not impose a feature-specific width.
|
||||
Cyber supplies a shared-field palette explicitly and keeps its legacy native
|
||||
field rules separate, so Radio's palette remains an intentional exception.
|
||||
Radio's palette remains an intentional exception.
|
||||
|
||||
### Read-only status badges
|
||||
|
||||
|
||||
+466
-157
@@ -846,8 +846,7 @@ detection, style parameters, 3D aircraft, Scope and Clean UI; Effects,
|
||||
Celestial, Bloom and Sharpen; and Reset to default at the foot. Each control
|
||||
is a card (`src/ui/styles/visual-panel.css`) whose header row ends in an
|
||||
on/off pill worded in the current language (Clean UI, an action, has none;
|
||||
the buttons carry their state as `aria-pressed`). Under the Cyber HUD the
|
||||
cards keep Cyber's own red skin. The presets and chips call the
|
||||
the buttons carry their state as `aria-pressed`). The presets and chips call the
|
||||
same Display store actions as the dock's Visual Presets tray, which stays on
|
||||
desktop and phone as before, along with Location; voice `Visual Presets`
|
||||
still opens that tray. On a phone the More sheet shows that tray right above
|
||||
@@ -872,8 +871,7 @@ the out-of-the-box look: the Normal style, the first-run post defaults
|
||||
(bloom off, sharpen on at 49%, the HUD shown, Dense detection at 75%
|
||||
with its fade and outside opacity, the celestial ring off), Elastic
|
||||
allocation, Scope on at 100% feather and 100% opacity, and 3D aircraft on in
|
||||
Proximity. The HUD layout follows the Normal style, as choosing it does: the
|
||||
Tactical HUD, except that the Cyber HUD stays Cyber. Inside Contacts, which
|
||||
Proximity. The HUD layout stays as the viewer set it. Inside Contacts, which
|
||||
lends detection for the session, the reset's detection becomes what leaving
|
||||
Contacts puts back and what a share link carries. It leaves the map source, the pinned scope terminus, Sonar's
|
||||
settings, other styles' parameters, the layers and the panels alone.
|
||||
@@ -937,10 +935,10 @@ the header narrows every list. Expanded, Context becomes a full-height
|
||||
column at the right edge (the left edge right to left) and the map credits
|
||||
stop short of it.
|
||||
|
||||
The Contacts and Space Missions modes and the Radio strip stay in the
|
||||
panel's main tab, below the card. When Contacts follows the aircraft the
|
||||
card shows, its list sits inside the card. Turning Radio or Launches on
|
||||
opens Context. The Properties tab holds the Labels and 3D aircraft
|
||||
The Contacts mode and the Radio strip stay in the panel's main tab, below
|
||||
the card. When Contacts follows the aircraft the card shows, its list sits
|
||||
inside the card. Turning Radio on opens Context. Space Missions is not part
|
||||
of Context: turning it on opens its own Space Missions panel. The Properties tab holds the Labels and 3D aircraft
|
||||
settings from Visual while a layer they act on is on.
|
||||
|
||||
Context does its reading only while its panel is open. Weather and news
|
||||
@@ -1013,9 +1011,9 @@ and Radio through the cockpit layout pass, whose floor
|
||||
matches it, so an open panel still stops short of the briefing. Contact and
|
||||
Live Signals are shorter, in the same glass, with the briefing's rows and
|
||||
weather tiles tightened; Regional News stays a briefing page. In a right-to-left language, the rail keeps its
|
||||
physical side as the cockpit's other windows do. The Cyber HUD and the phone
|
||||
keep their own cockpit layouts, with the Display and Radio launchers as
|
||||
before, and edge mode does not apply in the cockpit.
|
||||
physical side as the cockpit's other windows do. The phone keeps its own
|
||||
cockpit layout, with the Display and Radio launchers as before, and edge mode
|
||||
does not apply in the cockpit.
|
||||
|
||||
## God's Eye View in conversations — October 2, 2026
|
||||
|
||||
@@ -1117,73 +1115,79 @@ at 70% opacity behind telemetry, vertical metadata and scene chrome. Original
|
||||
HUD text color, glow and opacity are preserved. Scope OFF brightens the tagline
|
||||
and Active Style label with the shared secondary text color. The title plate
|
||||
covers the eye and title without moving the title or tagline. Scope ON retains
|
||||
the original HUD presentation; Cyber retains its existing skin.
|
||||
the original HUD presentation.
|
||||
|
||||
`node scripts/qa-scope-hud.mjs` checks native input, range, layout persistence,
|
||||
restoration and both Scope presentations. `QA_SCREENSHOT_DIR` saves screenshots.
|
||||
|
||||
## HUD layouts — October 29, 2026
|
||||
|
||||
Display > HUD > Layout offers Tactical, Minimal and Cyber; the `set_hud` voice
|
||||
action accepts the same three. The Operator layout is retired. Share links
|
||||
Display > HUD > Layout offers Tactical and Minimal; the `set_hud` voice
|
||||
action accepts the same two. The Operator layout is retired. Share links
|
||||
keep its enum code so older links still parse, and a link, scene or saved state
|
||||
that names Operator restores the default Tactical layout. Operator was the
|
||||
only layout that showed the HUD's top banner bar, so its markup and styles are
|
||||
removed too.
|
||||
|
||||
## Cyber HUD — September 30, 2026
|
||||
## Sonar visual style — November 18, 2026
|
||||
|
||||
Display > HUD > Layout includes Cyber, also available through the HUD voice
|
||||
action and shared visual state. An explicit first transition into Cyber selects
|
||||
FLIR with Ironbow 0.42. An explicit switch back to another HUD layout restores
|
||||
the visual preset used before Cyber; restored links and scenes remain
|
||||
authoritative. The skin uses shared red/slate panel treatments in map and cockpit,
|
||||
with compact 200px collapsed controls and wider expanded panels. Other HUD
|
||||
layouts retain their existing presentation.
|
||||
Chamfered panel expand/collapse controls use an inset keyboard-focus outline and
|
||||
red hover border in both map and cockpit, so clipping does not hide the highlight.
|
||||
|
||||
Cyber's map-side right rail opens one panel at a time while keeping collapsed
|
||||
launchers available. Display, CCTV and Context scroll their contents inside fixed
|
||||
headers and decorative frames. The narrow-screen rail remains scrollable to reach
|
||||
each panel. Radio retains the shared nested Context player without relocating
|
||||
playback controls on theme changes.
|
||||
|
||||
Voice help/error popups and Location/Visual Presets pins extend beyond their
|
||||
Cyber frames without being clipped: the shapes decorate non-interactive
|
||||
pseudo-elements. The lower-left telemetry card leaves room for attribution's
|
||||
full logo row. New panels can use the [shared surface contract](panel-surfaces.md)
|
||||
for theme tokens, rail input and a fixed header with a bounded scroll body.
|
||||
The contract is intentionally future-facing and opt-in; its first production
|
||||
adopter will land after this change. Existing owners still control disclosure,
|
||||
persistence and placement, while small-screen rail popup clipping and other
|
||||
integration limits remain documented in the contract.
|
||||
|
||||
On desktop, Cyber raises the left rail so it clears the lower coordinate card.
|
||||
`layoutRightPanelRail` reads that rendered top as its measured `baseTop`, which
|
||||
keeps the right rail aligned. Cockpit retains its separate rail placement for
|
||||
its visor layout.
|
||||
The Cyber HUD layout and its shell skin are removed. Its sonar stays as an
|
||||
opt-in visual style over Tactical or Minimal: Display > HUD > Sonar is OFF by
|
||||
default, and ON reveals the Rings, Range, Power, Opacity and Sector sliders.
|
||||
Share links, scenes and saved views that name Cyber keep its enum code and
|
||||
open in Tactical with Sonar on. Links and scene shots record Tactical with
|
||||
Sonar on under that same code, and a restored state that names another layout
|
||||
turns Sonar off; Minimal has no such code, so its Sonar is not carried.
|
||||
An explicit Sonar toggle or validated voice setting takes visual restore
|
||||
authority, so a delayed share-link restore cannot undo the newer choice.
|
||||
Choosing Reset Visual keeps the HUD layout and the Sonar setting.
|
||||
|
||||
Sonar has one contact-highlighting method. Native Cesium points, billboards and
|
||||
labels are treated in GPU draw commands without replacing their positions,
|
||||
identities or pick commands. Model and canvas/DOM overlays retain their own
|
||||
rendering paths. Sonar OFF stops the sweep while retaining Cyber's neutral
|
||||
contact treatment. Reduced motion disables the animated sweep; cockpit and
|
||||
hidden HUD states do not apply the map treatment. If the native shader is not
|
||||
supported, native contacts remain available and Display reports the limitation.
|
||||
No CSS scene-dimming fallback or effect selector is exposed.
|
||||
rendering paths. Sonar runs only while it is on, the HUD is visible and Cockpit
|
||||
is closed. Reduced motion disables the animated sweep. The sweep's repaint
|
||||
timer re-arms only after a drawn frame (postRender) that still shows contacts.
|
||||
If the native shader is not supported, native contacts remain available and
|
||||
Display reports the limitation. No CSS scene-dimming fallback or effect
|
||||
selector is exposed.
|
||||
|
||||
The Sonar controls adjust rings, range, power, opacity and sector. Sweep opacity
|
||||
affects detection painting rather than label cohort admission. Theme exit and
|
||||
renderer teardown release the derived GPU resources and restore owned model
|
||||
colors without replacing newer layer-owned color changes.
|
||||
affects detection painting rather than label cohort admission. Turning Sonar
|
||||
off and renderer teardown release the derived GPU resources and restore owned
|
||||
model colors without replacing newer layer-owned color changes.
|
||||
|
||||
The `set_cyber_sonar` voice action adjusts the same controls without switching
|
||||
themes or enabling omitted settings. State readback distinguishes configured
|
||||
settings from active map/contact effects. Sonar settings are session-only and
|
||||
return to their defaults on reload. Sliders accept integer values matching the
|
||||
The `set_cyber_sonar` voice action keeps its name and adjusts the same
|
||||
controls under any HUD layout, without switching layouts or enabling omitted
|
||||
settings. State readback distinguishes configured settings from active
|
||||
map/contact effects. Sonar settings are session-only and return to their
|
||||
defaults (Sonar off) on reload. Sliders accept integer values matching the
|
||||
action's ranges.
|
||||
|
||||
## Bottom-corner placement — November 18, 2026
|
||||
|
||||
From 1200px the command dock and the World Timeline sit 74px above the
|
||||
bottom edge, and the map attribution row sits on the bottom edge on the Power
|
||||
Up baseline (bottom right when the page runs right to left, where the corner
|
||||
row moves to the bottom left). A credit line too long for the space before the
|
||||
corner row wraps upward instead of running under it. The Tactical bottom-right
|
||||
readout (GSD / ALT / AIS) sits 8px above the Power Up row and the Tactical and
|
||||
Minimal coordinates start level with it; right to left, where the attribution
|
||||
row is under it, the readout sits 1.5rem higher and clears two lines of it. The World Timeline is 44rem narrower
|
||||
than the screen there, so it sits between the corners and they stay put while
|
||||
it shows. Toasts keep 12px above the raised dock, and the chat and voice panel
|
||||
height budgets subtract its rise. Below 1200px the dock reaches the bottom
|
||||
corners, so it keeps to the bottom edge, the attribution row sits above it and
|
||||
the coordinates clear the row's logo line. In the desktop Omnibar layout the
|
||||
Omnibar's own rules (`src/ui/styles/omnibar-dock.css`) place the dock, the
|
||||
World Timeline, the credits and the coordinates; its Tactical bottom-right
|
||||
readout also keeps 8px above the Power Up row. The left rail treats the
|
||||
centered World Timeline and voice control as obstacles only where they reach a
|
||||
laid-out panel, not the stack's transparent gutter. Known limit, unchanged
|
||||
from main: below 1200px with the World Timeline showing, the Tactical
|
||||
bottom-right readout does not rise with the bar and can touch the dock, and a
|
||||
credit line longer than the screen does not wrap.
|
||||
|
||||
Wind appears in the Weather group before Audio. The surface-weather prototype
|
||||
uses keyless NOAA GFS or ECMWF IFS forecasts on an approximately 1° display grid.
|
||||
It defaults to 10 m wind trails over the existing basemap. Speed shading is an explicit choice; earlier v2 links retain their original speed-shading meaning.
|
||||
@@ -2474,7 +2478,7 @@ change still in flight blocks entry until it settles. Double-clicking the
|
||||
selected vessel enters it, and the entry button reads BRIDGE with a ship icon
|
||||
both in Contacts (`#cockpit-entry`) and under the selected vessel's Intel HUD
|
||||
readout in the bottom-right corner (`#cockpit-entry-readout`, shown with the
|
||||
HUD on, in its Tactical and Cyber layouts). Turning Live AIS Vessels off ends
|
||||
HUD on, in its Tactical layout). Turning Live AIS Vessels off ends
|
||||
the bridge: the layer then has no subject (`getCockpitSubject` returns null).
|
||||
The bridge picture uses AIS alone, so no other feed being off makes it partial.
|
||||
Voice (`control_cockpit`) and the selection entry transaction stay aircraft-only;
|
||||
@@ -2784,36 +2788,47 @@ priority; one first seen together with a built-in subject comes after it. The
|
||||
first in that order decides alone: when its gate is shut there is no entry
|
||||
rather than the next subject's.
|
||||
|
||||
A frame places the eye `eye.upM` above `heightM` (the shared floor where the
|
||||
frame gives none, or where it last stood while that floor is cold; with
|
||||
neither, the camera stays where it is and the HUD reads ACQUIRING SURFACE for
|
||||
at most `COCKPIT_GROUND_WAIT_TIMEOUT_MS`, after which the view ends and the
|
||||
subject is released: no height stands in for a floor never read), slews toward `headingDeg` at the provider's rate, and may
|
||||
turn off the floor clamps (`groundClamp: false`, for a subject inside a
|
||||
structure) or keep the anchor exactly on the subject (`anchor: 'exact'`, for a
|
||||
layer that already moves it smoothly; a frame with no `speedMps` is always
|
||||
exact, since an inertial anchor runs on at the frame's speed); `cameraIntervalMs: 0` updates the
|
||||
camera every rendered frame. A frame that is null, malformed or for another
|
||||
subject ends the view (`restoreTracking: false`), as an aircraft tracked
|
||||
meanwhile and the provider's layer turning off do; the exit control asks the
|
||||
provider to restore its subject. The generic HUD shows the provider's kicker,
|
||||
title, meta line, speed with its unit and tag, readout cards, always-visible
|
||||
source rows, banner, route card and Live Signals rows, a veil that darkens the
|
||||
picture under the HUD (with passing light streaks, which stop under reduced
|
||||
motion), arrow-key look-around when the provider asks for it, and a progress
|
||||
line along the bottom edge (`src/cockpitProgress.js`: close ticks merge,
|
||||
labels never overlap). Core translates none of the provider's text: a host
|
||||
words it for the page's language (`gods-eye-view/i18n`:
|
||||
`getLocale`, `onLocaleChange`). Its entry face, labels and look may be
|
||||
functions, read again when they are shown and on a change of language, as the
|
||||
HUD view is.
|
||||
A frame places the eye `eye.upM` above `heightM`. With no `heightM` the eye
|
||||
stands on the shared floor; while that floor is cold, at the last height it
|
||||
stood at (at first the entry frame's). With neither, the camera stays where it
|
||||
is and the HUD reads ACQUIRING SURFACE for at most
|
||||
`COCKPIT_GROUND_WAIT_TIMEOUT_MS`, after which the view ends and the subject is
|
||||
released: no height stands in for a floor never read. The view slews toward
|
||||
`headingDeg` at the provider's rate. A frame may turn off the floor clamps
|
||||
(`groundClamp: false`, for a subject inside a structure) or keep the anchor
|
||||
exactly on the subject (`anchor: 'exact'`, for a layer that already moves it
|
||||
smoothly; a frame with no `speedMps` is always exact, since an inertial anchor
|
||||
runs on at the frame's speed); `cameraIntervalMs: 0` updates the camera every
|
||||
rendered frame. Each update turns the view, eases its lift and moves an inertial
|
||||
anchor by the time since the last one, at most a second past the interval
|
||||
(`cockpitSubjectStepSec`); an exact anchor stands where the frame is. The first
|
||||
update after entry (after any floor wait) stands its anchor on the subject; the
|
||||
first height to replace the entry frame's moves the anchor to that height where
|
||||
it stands. A frame that is null, malformed or for another subject ends the view
|
||||
(`restoreTracking: false`), as an aircraft tracked meanwhile and the provider's
|
||||
layer turning off do; the exit control asks the provider to restore its subject.
|
||||
The generic HUD shows the provider's kicker, title, meta line, speed with its
|
||||
unit and tag, readout cards, always-visible source rows, banner, route card and
|
||||
Live Signals rows (each changes in place, its tone included, and keeps its time
|
||||
while it stays listed; one pushed off comes back as the newest row; rows the
|
||||
view no longer lists leave before new ones come in), a veil that darkens the
|
||||
picture under the HUD (with passing light streaks, which stand still under
|
||||
reduced motion), arrow-key look-around when the provider asks for it, and a
|
||||
progress line along the bottom edge (`src/cockpitProgress.js`: close ticks
|
||||
merge, labels never overlap and are sized for CJK, kana and Hangul). Core
|
||||
translates none of the provider's text: a host words it for the page's language
|
||||
(`gods-eye-view/i18n`: `getLocale`, `onLocaleChange`). Its entry face, labels
|
||||
and look may be functions, read again when they are shown and on a change of
|
||||
language, as the HUD view is; a read that throws or is malformed keeps the last
|
||||
good words, at first those checked when the provider was registered.
|
||||
|
||||
The Rail layer offers a read API for such a view: `getSelectedTrain()` and
|
||||
`getCockpitSubject()` (a snapshot of the train: where it is along its line,
|
||||
which way it runs (`pathBinding.js` learns it), its rail height, speed as
|
||||
reported or derived, position source, feed credit and stops, and
|
||||
`selectedAtMs`, when the user last selected it by a click or `focusTrain`,
|
||||
even again; null after a deselection and for a train only a hold selected),
|
||||
which way it runs (`pathBinding.js` learns it), its rail height (null while
|
||||
no floor is known), speed as reported or derived, position source, feed
|
||||
credit and stops, and `selectedAtMs`, when the user last selected it by a
|
||||
click or `focusTrain`, even again; null after a deselection and for a train
|
||||
only a hold selected),
|
||||
`setCockpitSubject(key)` (its marker, 3D model and card hidden, the selection kept, its
|
||||
feed held, clicks and Escape left to the view; the held copy stays the one
|
||||
drawn of its train while held, another feed's copy hidden, and it keeps
|
||||
@@ -2826,24 +2841,43 @@ offers the same for a vehicle (`getSelectedVehicle`, `getCockpitSubject`,
|
||||
`setCockpitSubject`, `focusVehicle`): a held vehicle keeps playing when it is
|
||||
out of the camera's view, and its sprite, 3D model, card, trail and detection
|
||||
box are hidden; released, it is out of play until a visibility sweep finds it in
|
||||
view. Its snapshot's `position.groundHeightM` is the floor where playback draws
|
||||
it (the drawn marker's height while it is placed, else its segment's two
|
||||
reports' floors at the playback fraction), not the newest report's, and null while that floor is unknown. Rail's `path.direction` is the
|
||||
way the drawn train runs: once playback has placed it, a report that runs back
|
||||
turns it only when playback reaches that report. `docs/APPLICATION.md` (Cockpit subjects) shows a minimal provider. `src/ui/cockpitSubjectView.test.mjs`,
|
||||
`src/cockpitSubjectProviders.test.mjs`, `src/cockpitProgress.test.mjs`,
|
||||
`src/layers/rail/cockpitSubject.test.mjs` and the Transit lifecycle tests
|
||||
cover them.
|
||||
view. Turning the layer off ends the hold. Its snapshot's
|
||||
`position.groundHeightM` is the floor where playback draws it (the drawn
|
||||
marker's height while it is placed, else its segment's two reports' floors at
|
||||
the playback fraction), not the newest report's, and null while either of
|
||||
those two floors is unknown. Rail's `path.direction` is the way the drawn
|
||||
train runs: once playback has told its direction, a report that runs back
|
||||
turns it only when playback starts the segment to that report. A train turns
|
||||
once it is more than a standing train's GPS jitter back from the last place a
|
||||
longer move took it, however slowly it backs, so jitter on either side of
|
||||
where it stands keeps its direction, and so does playback's jump to a
|
||||
corrected position (a break, or a new clock epoch). While movement gives no
|
||||
direction, the snapshot uses the operator's last reported bearing.
|
||||
`docs/APPLICATION.md` (Cockpit subjects) shows a minimal provider.
|
||||
`src/ui/cockpitSubjectView.test.mjs`, `src/cockpitSubjectProviders.test.mjs`,
|
||||
`src/cockpitProgress.test.mjs`, `src/layers/rail/cockpitSubject.test.mjs`,
|
||||
`src/layers/rail/pathBinding.test.mjs` and the Transit lifecycle tests cover
|
||||
them.
|
||||
|
||||
## Context coordination
|
||||
|
||||
Context controls own Contacts/Space Missions state, entry and exit transactions,
|
||||
layer snapshots and restoration. The application supplies the existing manager,
|
||||
Context controls own Contacts state, entry and exit transactions, layer
|
||||
snapshots and restoration. Space Missions is an ordinary layer outside this
|
||||
owner: the launches layer keeps its own Satellites dependency
|
||||
(`src/layers/launches/satelliteIntents.js`), and `SpaceMissionsControls`
|
||||
(`src/ui/spaceMissionsControls.js`) connects it to its panel and store. The application supplies the existing manager,
|
||||
installations search and camera/panel actions. Tab listeners and pending
|
||||
presentation work stop during disposal; layer restoration retains its existing
|
||||
compensation and latest-intent rules. Clear Selected Layers shares this owner,
|
||||
so an older restore cannot replay over a newer Clear action.
|
||||
|
||||
Contacts leaves Satellites on. Contacts is being removed, so no new Contacts
|
||||
behavior is added here. Only an explicit user or voice Satellites OFF requested
|
||||
after Space Missions ON ends Space Missions. A scene, story, preset or other
|
||||
programmatic Satellites OFF leaves Space Missions running: an automatic change
|
||||
must not undo the user’s explicit choice, and the mission lifecycle remains
|
||||
independent of Satellites.
|
||||
|
||||
## Camera panel ownership
|
||||
|
||||
CCTV controls receive the existing camera port and explicit application actions.
|
||||
@@ -2860,7 +2894,7 @@ The panel opens when a camera becomes active and collapses when the layer is
|
||||
switched off, from its own switch or anywhere else. The panel chrome applies
|
||||
the collapse, so a panel the desktop accordion only folded has its saved and
|
||||
shared state closed too. Clear selected data layers and Context isolation
|
||||
(Contacts, Space Missions) switch the layer off without the user asking: the
|
||||
(Contacts) switch the layer off without the user asking: the
|
||||
panel and its share preference stay as they are, and the layer comes back to an
|
||||
open panel. Only the switch-off isolation makes counts (`suspendsLayer`, true
|
||||
while `_clearLayersOutsideContextMode` switches the layer off): the user
|
||||
@@ -3190,9 +3224,8 @@ owns surrounding layout and context-specific sizing. CCTV's calibration editor
|
||||
width lives in `ui/styles/cctv.css`, while the shared inline field variant owns
|
||||
only density and spinner treatment. Radio supplies its field palette and disabled
|
||||
opacity through the `--gev-field-*` variables, retaining compact typography and
|
||||
arrow space locally. Cyber supplies shared-field palette variables explicitly;
|
||||
its legacy native-field palette rules exclude `.gev-field`. These ownership
|
||||
boundaries preserve the current Tactical/Cyber appearance and native behavior.
|
||||
arrow space locally. These ownership boundaries preserve the current Tactical
|
||||
appearance and native behavior.
|
||||
|
||||
## Ordinary status badges
|
||||
|
||||
@@ -3333,8 +3366,7 @@ and military aircraft and vessels share this rule; fine pointers stay exact.
|
||||
|
||||
Manually opening Context with a tracked civilian or military aircraft enters
|
||||
the existing Contacts mode when Context is off. Contacts adopts that aircraft
|
||||
without restarting its tracking; an active or entering Space Missions mode is
|
||||
left alone. Programmatic sheet changes and closing the tab do not activate a mode.
|
||||
without restarting its tracking. Programmatic sheet changes and closing the tab do not activate a mode.
|
||||
|
||||
Sheets borrow panels. Opening one expands its panels without persisting them or
|
||||
claiming a user choice, and share links keep reporting each borrowed panel's
|
||||
@@ -3817,9 +3849,9 @@ they do not reduce the materialized entity count or establish an FPS gain.
|
||||
- Display controls and shader-parameter sliders show keyboard focus in both
|
||||
the map panel and Cockpit Display. Arrow keys retain native range adjustment.
|
||||
The enabled CCTV camera dropdown shows keyboard focus as well.
|
||||
- Tab reaches both Contacts and Space Missions in sequence in every Context
|
||||
state. Left/Right arrows also switch them; the focused tab has a distinct ring
|
||||
even when selected.
|
||||
- Tab reaches the Contacts control in Context and the separate Space Missions
|
||||
rail button when launches are enabled. Both keep a visible focus ring when
|
||||
active.
|
||||
- Keyboard focus on a Space Missions roster item uses the same temporary globe
|
||||
rotation and mission-marker highlight as pointer hover. Focus alone does not
|
||||
select the mission; Enter or Space performs selection. Keyboard and pointer
|
||||
@@ -4523,16 +4555,10 @@ a number`, exactly `(0,0,0)` returns undefined, and a near-center value such
|
||||
> cannot slip through by not matching the older spelling. CCTV's
|
||||
> `selectedCameraId` is the one recorded keep: it raises a monitor plane and
|
||||
> never writes `viewer.trackedEntity` or the camera.
|
||||
> (4) An **isolating Context mode is exited before a shot's layers apply**.
|
||||
> Space Missions refuses every enable outside its replay bundle, so with it
|
||||
> left dirty all five recipes were refused (or, for Orbital Watch, composed
|
||||
> over a replay they never declared). The verdict is read off the shared guard
|
||||
> (`contextLayerEnableBlockReason`), not a mode name, so a future isolating
|
||||
> mode is covered — the probe id `SCENE_EXCLUSIVITY_PROBE_LAYER_ID` is
|
||||
> reserved by a test against the real layer registry. The exit itself is the
|
||||
> ordinary `setContextMode('off')` exact-restore path and is deliberately NOT
|
||||
> abortable: leaving the mode IS the restore to the operator's pre-mode state,
|
||||
> and tearing that transaction in half would strand Context. A refused
|
||||
> (4) Playback leaves every Context mode alone. No mode isolates the globe
|
||||
> any more (Space Missions is an ordinary layer), so the former exit of an
|
||||
> isolating mode before a shot's layers apply, and its probe layer id, were
|
||||
> removed with it. A refused
|
||||
> `setEnabled` is surfaced in the status line and a `shot_layers_refused`
|
||||
> telemetry event instead of being reported as success. **Mixed accepted /
|
||||
> refused layers are reported honestly, not rolled back** — a shot whose
|
||||
@@ -4675,10 +4701,8 @@ isCurrent })` gates BOTH halves of the map-stack switch, which is its only
|
||||
> each wing shows only its icon. `CommandDockView.vue` still gives the toggles
|
||||
> their "Expand/Collapse …" `aria-label` and `title` (`trayWords`), so the
|
||||
> browser tooltip is the only visible name on hover.
|
||||
> The Cyber HUD layout is excluded: it sets `--dock-side-compact` to
|
||||
> 9–9.75rem, which fits its labels. The former ≤620px ellipsis clip is gone:
|
||||
> the phone shell takes over at 720px, so it never applied to a visible
|
||||
> dock.
|
||||
> The former ≤620px ellipsis clip is gone: the phone shell takes over at
|
||||
> 720px, so it never applied to a visible dock.
|
||||
> - **LOCATION mini-status is data-only today (2026-08-20):** the collapsed
|
||||
> readout now follows a free-text geocode search as well as preset pills
|
||||
> (`src/locationStatus.js` owns the copy for both), and every other camera
|
||||
@@ -4855,10 +4879,10 @@ down | auth-failed` (plus the unchanged `missing-key`/`unsupported`) with
|
||||
> selected manager-owned data layers, including an active Context choice,
|
||||
> while retaining visual, HUD, map, and panel settings. A disabled layer may
|
||||
> still release camera work that it owns through its normal teardown.
|
||||
> Direct Data Layers entry into Space Missions excludes the new mission ON
|
||||
> intent from its pre-entry snapshot. Its OFF control therefore leaves Space
|
||||
> Missions off and restores Satellites to their exact pre-entry visibility
|
||||
> and parameter state.
|
||||
> Space Missions is an ordinary layer and opens no Context session. Its OFF
|
||||
> control leaves Space Missions off and restores Satellites to their
|
||||
> pre-mission visibility and parameter state, keeping an explicit Satellites
|
||||
> action taken while it ran.
|
||||
> The title and loading logos use a blue 10 px outer-eye stroke with a
|
||||
> translucent slate fill, while the globe-and-cage gaze travels up to 34 SVG
|
||||
> units toward the pointer for clearer feedback at the compact title size.
|
||||
@@ -4866,11 +4890,12 @@ down | auth-failed` (plus the unchanged `missing-key`/`unsupported`) with
|
||||
> clock goes live and the camera flies to the view the app started from (the
|
||||
> host's `homeView`, else its `startView`, else the whole planet), letting go
|
||||
> of whatever it follows as Reset Globe does (`returnToStart()`).
|
||||
> - **Context, Cockpit, and Radio interaction contract:** explicit Contacts,
|
||||
> Space Missions, and successful Cockpit actions reveal the Context panel, while
|
||||
> restoration and replay preserve its prior collapsed state. Contacts uses the
|
||||
> dedicated right-side chooser; the underlying Global Context coordinator is
|
||||
> registered for lifecycle and restoration but is not duplicated in Data Layers.
|
||||
> - **Context, Cockpit, and Radio interaction contract:** explicit Contacts and
|
||||
> Radio actions and successful Cockpit actions can reveal Context. Contacts
|
||||
> uses the dedicated right-side chooser. Space Missions has its own rail
|
||||
> button and panel while launches are enabled.
|
||||
> Mission teardown clears the selection shown in the panel before restoring
|
||||
> the Satellites layer, so a failed restore leaves no stale mission details.
|
||||
> Inside Cockpit, the focused summary card is titled Contact in both visible
|
||||
> copy and its accessible control labels.
|
||||
> The top-center Cockpit vision cycle is the fixed, duplicate-free sequence
|
||||
@@ -4918,7 +4943,7 @@ down | auth-failed` (plus the unchanged `missing-key`/`unsupported`) with
|
||||
> corridor). Its minimal Display popover exposes Intel HUD,
|
||||
> Detection, Parameters, and 3D aircraft. During Cockpit, those existing
|
||||
> standard Display controls move into the Cockpit popover and retain their normal
|
||||
> nested interaction: HUD plus Tactical/Minimal/Cyber layout, Detection plus
|
||||
> nested interaction: HUD plus Tactical/Minimal layout and Sonar, Detection plus
|
||||
> Density/Allocation/Fade/Outside tuning, and 3D plus Proximity/All mode. The
|
||||
> same nodes and state return to the map Display on exit, so Cockpit does not
|
||||
> maintain a second control state. **Detection is owned by the CONTACTS
|
||||
@@ -5564,9 +5589,14 @@ activeCameraCardEnabled: true })` may publish it through the retained
|
||||
> pitch/heading instruments, altitude/speed tapes, and the signal window.
|
||||
> Topline vision and exit controls retain the highest in-cockpit layer.
|
||||
> - **Space Missions dependency shutdown:** disabling a mission dependency or
|
||||
> leaving the mode closes mission context and restores the exact pre-entry
|
||||
> Satellite enabled state and presentation parameters. Restored parameters
|
||||
> never re-show primitives while the Satellite layer is disabled.
|
||||
> switching Space Missions off restores the pre-mission Satellite enabled
|
||||
> state and presentation parameters, except that an explicit Satellites action
|
||||
> taken while it ran is kept. Restored parameters never re-show primitives
|
||||
> while the Satellite layer is disabled. When Satellites is still busy after
|
||||
> the 30 s limit, the restore changes nothing and keeps the saved state, so
|
||||
> switching Space Missions off again finishes it. While Space Missions goes
|
||||
> off, its panel's roster and controls select, focus, preview and replay
|
||||
> nothing, so no camera move starts that nothing would end.
|
||||
> - **Flights 3D/cockpit hardening:** the destination-direction cue is an
|
||||
> inline SVG rather than a remotely loaded Material Icons ligature, so a
|
||||
> blocked or late font can no longer expand the literal word `navigation`
|
||||
@@ -5607,17 +5637,13 @@ activeCameraCardEnabled: true })` may publish it through the retained
|
||||
> only for the synchronous selection window, history survives same-layer
|
||||
> reselection, and NEXT availability uses the same UNKNOWN-cohort gate as the
|
||||
> navigation action. Contacts entry does not wait for unrelated serialized
|
||||
> layer teardown; Space Missions waits for every incompatible live/current
|
||||
> layer to settle off before replay data starts. A rejected teardown keeps
|
||||
> that layer authoritatively enabled, restores any siblings already stopped,
|
||||
> and aborts replay entry; the isolation
|
||||
> guard remains active until Rocket Launches finishes enabling. Manually enabling
|
||||
> layer teardown. (Space Missions isolation, which waited for incompatible
|
||||
> layers to settle off, was later removed: Space Missions is now an ordinary
|
||||
> layer.) Manually enabling
|
||||
> another Data Layer is additive in both an active mode and the neutral shell:
|
||||
> it does not exit Context, and the added layer joins the pre-entry snapshot
|
||||
> when the session is eventually restored. Manually disabling a required mode
|
||||
> dependency still exits and restores that union.
|
||||
> While Space Missions is active, direct incompatible enables are refused
|
||||
> before initialization or polling and explain that the mode must be exited.
|
||||
> User entry alone owns the pre-entry snapshot; programmatic dependencies do
|
||||
> not replace it, and rapid re-entry snapshots the pending settled restore
|
||||
> target rather than partial manager state.
|
||||
@@ -5673,10 +5699,8 @@ activeCameraCardEnabled: true })` may publish it through the retained
|
||||
> enabled-layer set and every runtime parameter it changes, then clears
|
||||
> unrelated active Data Layers. Mode switches, required-dependency disables, direct
|
||||
> disable, and teardown restore that pre-entry state before control leaves
|
||||
> Context. Directly switching between Flights and Space Missions remains
|
||||
> supported without losing the original snapshot. Contacts waits for the
|
||||
> dependency releases it owns before restoring that snapshot, so the first
|
||||
> Space Missions selection completes without a stale teardown superseding it.
|
||||
> Context. Contacts waits for the dependency releases it owns before
|
||||
> restoring that snapshot.
|
||||
> - **Space Mission horizon occlusion:** mission dots and hover reticles apply
|
||||
> their surface-anchor horizon state before Cesium draws or picks the frame,
|
||||
> while shared-host labels use the same hidden-globe horizon contract. Rear-side
|
||||
@@ -6398,9 +6422,9 @@ start where the label would round to 10.0 km, so a 9.96 km route displays as
|
||||
**Keys needed: none.** Directions works on a keyless boot, and the layer is off
|
||||
until the operator turns it on.
|
||||
|
||||
**Context behavior.** Directions is not a Context layer: neither Contacts nor
|
||||
Space Missions reads it, depends on it, or lists it as a companion. It is
|
||||
therefore one of the layers an exclusive Context mode switches off on entry
|
||||
**Context behavior.** Directions is not a Context layer: Contacts does not
|
||||
read it, depend on it, or list it as a companion. It is therefore one of the
|
||||
layers the exclusive Contacts mode switches off on entry
|
||||
(`_clearLayersOutsideContextMode`) and restores on exit, like every other
|
||||
non-participating layer — the route and both endpoints are cleared with it, and
|
||||
placing them again is the way back. Cockpit does not touch the layer either,
|
||||
@@ -6726,8 +6750,8 @@ Required empty or unexercised checks fail acceptance. The passing final line is
|
||||
cannot claim full acceptance.
|
||||
|
||||
**Lifecycle and proxy.** Contacts temporarily disables Transit and restores its
|
||||
prior state on exit; Space Missions refuses enablement while isolating replay
|
||||
data. Cockpit does not need Contacts and does not independently enable Transit.
|
||||
prior state on exit; Space Missions, an ordinary layer, leaves Transit as it
|
||||
is. Cockpit does not need Contacts and does not independently enable Transit.
|
||||
The proxy fetches registered URLs only, validates redirect origins, bounds
|
||||
responses and decoding, caches successful snapshots, and backs off after failed
|
||||
refreshes. A 304 confirms contact without appending history. Missing vehicles
|
||||
@@ -7307,19 +7331,19 @@ silently demoting every later lookup for the session.
|
||||
### Context / Contacts coordinator (July 2026)
|
||||
|
||||
- The internal Context coordinator is available in every visual style. Its dedicated right-side `CONTEXT` chooser exposes the neutral shell; the coordinator is not duplicated in Data Layers and does not enable a live-data dependency until a mode is selected.
|
||||
- The expanded `CONTEXT` view offers mutually exclusive `CONTACTS` and `SPACE MISSIONS` modes. Selecting `CONTACTS` enables the context-owned Flights, Military Flights, AIS Vessels, and Mapped Installations dependencies only when they are not already user-enabled; selecting `SPACE MISSIONS` enables the recent-launch layer and its Satellite dependency. `CONTACTS` cycles the nearest supported contact of whatever type is selected. Satellites are deliberately excluded from those Awareness cohorts and keep their own tracking UX. Selecting the active mode again returns to the neutral chooser and releases only mode-owned dependencies.
|
||||
- The expanded `CONTEXT` view offers the `CONTACTS` mode. Selecting `CONTACTS` enables the context-owned Flights, Military Flights, AIS Vessels, and Mapped Installations dependencies only when they are not already user-enabled. Space Missions is not a Context mode: it is the ordinary recent-launch layer with its own panel, and it runs beside Contacts. `CONTACTS` cycles the nearest supported contact of whatever type is selected. Satellites are deliberately excluded from those Awareness cohorts and keep their own tracking UX. Selecting the active mode again returns to the neutral chooser and releases only mode-owned dependencies.
|
||||
- If a civilian or military aircraft is already tracked when `CONTACTS` becomes operational, that source-owned track is adopted as the Context subject before nearest-contact autofocus. Context rechecks the tracker after its dependencies settle, so a newer selection wins, while an explicit clear during activation prevents fallback from silently selecting a replacement. Cockpit entry remains unavailable until that Context transaction has settled, so its camera takeover cannot clear Cesium tracking before adoption. Adoption does not recreate tracking or transfer camera ownership; it initializes the normal 250 km ring, history, proximity results, and Cockpit Previous/Next state for the original aircraft. With no tracked aircraft, an AIS vessel already selected (the vessel layer's `getSelectedInfo()`) becomes the subject, at activation and again when a deferred dependency settles, exactly as a vessel selected while `CONTACTS` is on; no nearest flight is picked and the camera is not moved.
|
||||
- `SEARCH NEARBY SITES` retains the bounded OSM results and makes one user-initiated, view-biased Google Maps Places text search for “military installation.” Google results are source-stamped, deduplicated against OSM by rounded location/name, and remain mapped context rather than operational claims. If Places is unavailable or the API is not enabled for the supplied key, OSM context remains available. A view across the antimeridian is searched around its own centre, with a radius from its real width.
|
||||
- The Context header holds only its title and collapse control. It no longer carries a Radio shortcut or a compact Radio player: Radio is the `RADIO` section inside the panel, with its own disclosure and the single `ENABLE` power control. Cockpit keeps its own compact Radio utility.
|
||||
- Context is set for reading in every theme: mode, standby and action labels are 10 px, and the panel draws no glow halo. Outside Cyber, the two modes form one segmented control, the standby guidance is plain left-aligned text rather than a dashed placeholder, and the panel's section titles share the side panels' dock-label colour. Cyber keeps its separately framed mode buttons, its red panel titles, and in layout-focus a framed, centred standby card over its radar art.
|
||||
- Context is set for reading in every theme: mode, standby and action labels are 10 px, and the panel draws no glow halo. The two modes form one segmented control, the standby guidance is plain left-aligned text rather than a dashed placeholder, and the panel's section titles share the side panels' dock-label colour.
|
||||
- The expanded desktop header omits the redundant `ON` label; the active mode button carries state. Expanded Contact results also omit the duplicate `GLOBAL CONTEXT` / `CONTEXT ONLY` status row and begin with the selected subject and its 250 km scope. Global Context does not fabricate a selected-entity model preview: the provisional hand-authored aircraft wireframe was removed because it was not geometry extracted from the selected entity's actual asset.
|
||||
- Dependency ownership is reversible: disabling Global Context releases only dependencies it enabled, while user-enabled layers remain on. This also removes the Military-layer suppression handoff when Global Context owned Military, allowing an already-enabled civilian Flights layer to resume its normal mixed rendering. If OpenSky is unavailable and has no last-good cache, Flights requests a capped 250 nm adsb.lol point snapshot around the current view anchor and labels that provenance explicitly; it never relabels military-feed rows as civilian data. If both inputs fail, Flights remains `UNKNOWN`.
|
||||
- Space Missions is replay-isolated: Rocket Launches and Satellites are the only Data Layers permitted while the mode is active. Direct UI and voice entry capture the same pre-entry snapshot; internal dependency and restoration enables do not create a user-owned Context session. Entry waits for incompatible layers to shut down, direct incompatible enables are blocked before lifecycle work, and the entry gate remains active through the complete Rocket Launches enable. That enable includes the first mission-index load: an HTTP error, timeout, network failure or malformed payload before any index has loaded fails the enable, so Context rolls back to the pre-entry layers instead of committing an empty, isolating mode; the camera returns to its pre-entry view unless navigation took it, and a toast says the mission index could not load. A valid empty index still enters, and a refresh failure after an index loaded keeps its records and the mode. Exiting cancels the layer's own camera flights but never one navigation started. A newer same-target ON request takes ownership of the pending entry without releasing its isolation snapshot, including when it arrives while the prior request is awaiting the adoption guard. A caller abort, resource cancellation, newer OFF, or layer teardown waits for exact manager settlement and restores that snapshot without resurrecting Rocket Launches. If an abort lands after only part of a restore settles, Context completes the same exact target without the stale caller signal and then replays newer explicit layer intent. Dedicated Voice Context cancellation reports a stable cancelled result plus the current Context state; generic layer visibility additionally exposes manager phase, reason, successor, and lifecycle details. Once an exact voice visibility intent commits, a newer voice turn cannot relabel it as cancelled while Context settlement completes; pre-commit aborts remain cancellable and final lifecycle mismatches remain failures. Clear Selected Layers reserves its complete captured OFF set before sequential teardown; a newer absolute request of any origin supersedes only its layer reservation and remains authoritative. A rejected layer teardown retains the truthful enabled state, rolls already-stopped siblings back to the captured pre-entry set, and aborts replay; rapid exit/re-entry serializes the full Satellite enabled-state and parameter restore before a new snapshot is taken. Contacts remains additive and restores user-enabled layers normally.
|
||||
- Space Missions is an ordinary layer, not a Context mode. It neither isolates the globe nor refuses other layers, opens no Context session, and runs beside Contacts. Turning it on enables its Satellites dependency in the temporary dense/hidden mode and turning it off restores Satellites' exact prior visibility and parameters; an explicit Satellites action taken while it runs (by the person or by voice) is kept through that restore, and such a Satellites OFF asked for after the newest Space Missions ON ends Space Missions (request order, not settle order, decides; `src/layers/launches/satelliteIntents.js`). A scene, story, preset or other programmatic Satellites change does neither (owner decision). Contacts leaves Satellites as it is. The first mission-index load is part of the enable: an HTTP error, timeout, network failure or malformed payload before any index has loaded fails the enable, the camera returns to its pre-entry view unless navigation took it, and a toast says the mission index could not load. A valid empty index still enables, and a refresh failure after an index loaded keeps its records. Turning the layer on by hand, choosing it at first run, asking for it by voice (`set_context_mode` still accepts `space-missions` and switches the layer), or picking a mission on the globe opens the Space Missions panel; on desktop, opening it closes Context and the other right-rail panels, and opening Context closes it. Voice `set_panel_open` refuses to open the panel while the layer is off and says to turn Space Missions on first.
|
||||
- Enabled Data Layer controls report normalized feed health on the button (`LOADING`, `DEGRADED`, `STALE`, `FALLBACK`, or `UNAVAILABLE`) while the metadata line retains the source and reason. A partial CelesTrak group failure keeps the usable catalog and reports `DEGRADED`; a total outage keeps last-good catalog data visible but reports `UNAVAILABLE`.
|
||||
- On activation it focuses the nearest currently observed aircraft across the civilian and military feeds, with military winning an exact distance tie; if none are available, it focuses an observed AIS vessel. The aircraft search is deliberately uncapped and one refresh-tick retry handles initially empty feeds. This is an attention-priority navigation shortcut, not a high-risk, affiliation, or threat classification.
|
||||
- A selected aircraft, AIS vessel, or mapped installation gets a 250 km **context window** with nearby cohort counts, nearest examples, source labels, and stale/unavailable reasons. It emits `NEARBY` or `UNKNOWN`; no detection, engagement, affiliation, or sensor-activity conclusion is calculated.
|
||||
- Contacts rows and the Cockpit Contact counts name each cohort's provider: the source of the last snapshot, marked `FALLBACK` or `STALE` as its layer row would be. A poll in flight keeps the mark, where the layer row shows `LOADING`. A flight snapshot from the adsb.lol regional fallback reads `adsb.lol · FALLBACK`, not `OpenSky`.
|
||||
- The window's edge is drawn on the globe as a 250 km range ring: a 4 px polyline whose outer 1 px, half a pixel on each side, is a dark halo around a 3 px Context-blue core, 2.5 km above the ellipsoid (`AWARENESS_RANGE_RING_STYLE` in `src/layers/awareness/policy.js`). The halo keeps it legible over bright desert and snow, dark ocean and forest, and under the FLIR, NVG and CRT styles, where the earlier 1 px ellipse outline disappeared. It is one outlined line in an unpickable draw-port line set (`src/layers/awareness/rangeRing.js`), so a click or tap on its edge reaches the contact underneath; the halo is the line's own outline, so the translucent core and halo never darken where they meet; it moves when the subject moves. Three dim sonar pulses (3 px with a dark edge half a pixel wide on each side, same colours, at most 60% opacity), each an outlined line in the same set, grow slowly from the subject at constant speed, one every 3 s and each taking 9 s, and arrive at the ring at about a third of that. Behind each pulse a radial gradient in the same blue fades inward over 35% of the radius: one unpickable flat ellipse 2.5 km up with 270 km semi-axes, filled with a 256-pixel canvas painted with the band (two canvases in turn, each under a new key). The ellipse stands until the subject has moved 20 km from where it was built, the canvas keeping the band concentric with the subject meanwhile, and not at all while the pulses rest. Fronts and band are fixed in the world, so they step every 80 ms however many frames are drawn and look the same whether the camera moves or not; crossing the 2.5 km rim height shows or hides them at once. While the camera is below the band's 2.5 km height, where it would sweep across the sky, the pulses rest: the band and fronts are hidden and there is no ring flash, no echo and no frame request. Terrain or 3D tiles higher than 2.5 km (the Alps, Andes, Rockies) still cut through the band and the ring when seen from above, as the ring alone already did; the height check uses the camera's height above the ellipsoid, not above the ground. While pulses run, the ring dims to 40% and flashes to full strength as each pulse reaches it, fading over 1.8 s. As a pulse front crosses a flight, military aircraft or AIS vessel, the detection overlay draws a second bracket around that contact's own bracket, in the pulse blue on the default detection style and in the style's own line colour under NVG, FLIR and CRT, which spreads outward as it fades over 1.4 s (`AWARENESS_RANGE_ECHO`, read through `src/awarenessEcho.js`; no layer's icon is restyled, and mapped installations have no detection bracket). Pulses are born 5 km out, so the subject itself and anything nearer never echo. Pulses run for 9 s (three ring flashes) after a selection or a camera move, fading in and out over 1.2 s, then rest: the ring stays on screen at full strength, the pulses, gradient and echoes are hidden, and nothing asks for frames, so a parked Contacts view is quiet again. Only a camera move within 1.5 s of the user handling the map (pointer, wheel or touch on the Cesium canvas, which covers a drag's inertia, and a drag or touch begun there keeps counting until its last finger or button lifts, even outside the canvas, unless the window loses focus or the page is hidden first; keys typed elsewhere do not count, nor does input while Cesium's camera controls are off, as in the cockpit view, and a gesture still pending when the cockpit or another owner takes the camera is dropped) wakes them; a moving subject and the app's own camera moves (a tracked aircraft, the cockpit view, an orbit, a fly-to) do not, since they move on every refresh. While they run they never hold continuous rendering: each drawn frame arms one step 80 ms later (the Cyber sonar cadence, `CYBER_SONAR_RENDER_INTERVAL_MS`) whose changes ask for the frame that draws them, so a parked view repaints at about 12.5 fps, one frame a step, and never beats the detection lane's 80 ms gate. Under `prefers-reduced-motion`, or on a renderer without frame hooks, there are no pulses or echoes and the ring stays on screen; changing the preference mid-session rebuilds the ring. The ring follows a moving subject once it has moved 250 m.
|
||||
- The window's edge is drawn on the globe as a 250 km range ring: a 4 px polyline whose outer 1 px, half a pixel on each side, is a dark halo around a 3 px Context-blue core, 2.5 km above the ellipsoid (`AWARENESS_RANGE_RING_STYLE` in `src/layers/awareness/policy.js`). The halo keeps it legible over bright desert and snow, dark ocean and forest, and under the FLIR, NVG and CRT styles, where the earlier 1 px ellipse outline disappeared. It is one outlined line in an unpickable draw-port line set (`src/layers/awareness/rangeRing.js`), so a click or tap on its edge reaches the contact underneath; the halo is the line's own outline, so the translucent core and halo never darken where they meet; it moves when the subject moves. Three dim sonar pulses (3 px with a dark edge half a pixel wide on each side, same colours, at most 60% opacity), each an outlined line in the same set, grow slowly from the subject at constant speed, one every 3 s and each taking 9 s, and arrive at the ring at about a third of that. Behind each pulse a radial gradient in the same blue fades inward over 35% of the radius: one unpickable flat ellipse 2.5 km up with 270 km semi-axes, filled with a 256-pixel canvas painted with the band (two canvases in turn, each under a new key). The ellipse stands until the subject has moved 20 km from where it was built, the canvas keeping the band concentric with the subject meanwhile, and not at all while the pulses rest. Fronts and band are fixed in the world, so they step every 80 ms however many frames are drawn and look the same whether the camera moves or not; crossing the 2.5 km rim height shows or hides them at once. While the camera is below the band's 2.5 km height, where it would sweep across the sky, the pulses rest: the band and fronts are hidden and there is no ring flash, no echo and no frame request. Terrain or 3D tiles higher than 2.5 km (the Alps, Andes, Rockies) still cut through the band and the ring when seen from above, as the ring alone already did; the height check uses the camera's height above the ellipsoid, not above the ground. While pulses run, the ring dims to 40% and flashes to full strength as each pulse reaches it, fading over 1.8 s. As a pulse front crosses a flight, military aircraft or AIS vessel, the detection overlay draws a second bracket around that contact's own bracket, in the pulse blue on the default detection style and in the style's own line colour under NVG, FLIR and CRT, which spreads outward as it fades over 1.4 s (`AWARENESS_RANGE_ECHO`, read through `src/awarenessEcho.js`; no layer's icon is restyled, and mapped installations have no detection bracket). Pulses are born 5 km out, so the subject itself and anything nearer never echo. Pulses run for 9 s (three ring flashes) after a selection or a camera move, fading in and out over 1.2 s, then rest: the ring stays on screen at full strength, the pulses, gradient and echoes are hidden, and nothing asks for frames, so a parked Contacts view is quiet again. Only a camera move within 1.5 s of the user handling the map (pointer, wheel or touch on the Cesium canvas, which covers a drag's inertia, and a drag or touch begun there keeps counting until its last finger or button lifts, even outside the canvas, unless the window loses focus or the page is hidden first; keys typed elsewhere do not count, nor does input while Cesium's camera controls are off, as in the cockpit view, and a gesture still pending when the cockpit or another owner takes the camera is dropped) wakes them; a moving subject and the app's own camera moves (a tracked aircraft, the cockpit view, an orbit, a fly-to) do not, since they move on every refresh. While they run they never hold continuous rendering: each drawn frame arms one step 80 ms later (the sonar cadence, `CYBER_SONAR_RENDER_INTERVAL_MS`) whose changes ask for the frame that draws them, so a parked view repaints at about 12.5 fps, one frame a step, and never beats the detection lane's 80 ms gate. Under `prefers-reduced-motion`, or on a renderer without frame hooks, there are no pulses or echoes and the ring stays on screen; changing the preference mid-session rebuilds the ring. The ring follows a moving subject once it has moved 250 m.
|
||||
- For a selected live aircraft or vessel, the context window refreshes from the existing tracker/feed position every 750 ms, so nearest distances and cohort counts follow the subject without introducing a duplicate poll loop.
|
||||
- Aircraft cohort membership uses every locally loaded, selectable contact inside the 250 km window, including a plane hidden only by horizon culling or because its 3D model owns the visual. Counts and navigation therefore do not change with the current camera angle or billboard/model handoff.
|
||||
- Nearby examples in the context panel are focus controls: they use their owning layer's existing selection/tracking path, then frame that contact. Static-installation distances use ellipsoidal surface distance so the count matches the ground-projected context disk.
|
||||
@@ -7471,8 +7495,8 @@ silently demoting every later lookup for the session.
|
||||
protected-card path. Disable tears the tier down completely.
|
||||
Coverage/viewshed semantics unchanged.
|
||||
- **Satellites**: every point moves every frame. Each satellite's SGP4 sample (position, velocity, gravity and its rate of change; `src/layers/satellites/motion.js`) is reckoned forward or back to the world time and turned into the Earth-fixed frame, so points glide at any play speed instead of stepping once a second. Core satellites take a fresh sample every second, or as soon as the world time is 30 s from their sample (fast play, a seek), which keeps every point within about 10 m of SGP4; Starlink extras are sampled round-robin, more per frame the faster time plays, and a point more than two minutes from its sample waits for the next one. Hidden points are not moved until shown. Orbit rings rotate about Earth's Z by ΔGMST every ~1s (exact inertial→ECEF compensation; no SGP4 re-runs); the tracked satellite propagates per frame with one shared epoch for dot/label/camera. Verified: ISS holds <1km perpendicular to its ring while tracked. Pass prediction (`src/data/satellitePass.js`; `getNextSatellitePass`, `getNextIssPass`) scans at 20s, bisects rise/set to ~0.2s, fits the peak with a parabola, and marks a pass visible when the satellite is outside a cylindrical Earth shadow while the observer's Sun is at or below −6°. `next_iss_pass` preserves its geometric-pass ordering and appends visibility metadata. General `next_satellite_pass` accepts a loaded NORAD ID or unambiguous name, searches 24 hours and optionally requires estimated visibility. These estimates do not account for weather or satellite brightness.
|
||||
- **Space Missions (30d)**: recent launches render as bounded shared-host, horizon-occluded mission markers using Launch Library 2 v2.3 detailed records. Enabling the layer selects the unified right-side Context panel's Space Missions mode and enables the required satellite layer. Before applying its temporary dense/hidden Satellite mode, Space Missions snapshots the complete standalone Satellite parameter set and exact enabled-layer set. Disabling Space Missions from either Context or the left Data Layers rail restores those parameters and the exact prior enabled state, so a Satellite layer that was already on stays on while a mode-owned dependency returns off; enabling Satellites by itself remains independent. Selecting a mission isolates its launch-to-orbit transfer and dashed satellite orbit, fills that same panel with navigation/details, and animates a small phase-colored marker along the exact displayed Cartesian samples. Marker hit testing drill-picks through photorealistic tiles so the depth-test-free tactical dot remains reliably selectable; its text is non-interactive shared-host presentation. The selected pad is the camera's zoom pivot: the overview remains centered on its launch site, wheel zoom approaches that site instead of drifting elsewhere, and camera pitch progressively changes from global nadir to an oblique close 3D view. Its protected shared-host callout remains visible and expands to include both mission and launch-site names. `FOCUS` flies directly to a 12 km oblique frame around the selected launch site and retains the same anchored zoom/orbit behavior. `REPLAY ASCENT` resets the selected marker at the pad, frames it from an oblique third-person angle, and follows it through the mission-specific compressed ascent directly into one orbital lap at the default `1×` rate. A live `0.25×`–`4×` slider changes ascent and orbit playback speed; adjusting it mid-replay preserves the current path position and historical mission timestamp. Re-entry/recovery cannot be inserted into replay. At orbit insertion the camera smoothly pulls back over the first fifth of the orbital replay and pitches to a globe-scale nadir view while continuing to target the moving replay point. Replay Cancel, mission navigation, deselection, layer disable, and data refresh all release camera ownership. Reconstructed paths are one continuous 128-sample geodetic curve: horizontal departure begins near zero while altitude rises quickly, then the climb progressively bends toward insertion without the former hard 120 km corner. Unmatched orbit fallbacks are smooth planar inclined rings rather than longitude/latitude ground-track curves. The panel lists disclosed payload names, types, operators/manufacturers, mass, multiplicity, and destination when supplied; an empty LL2 payload collection is shown as `CLASSIFIED / MULTI-PAYLOAD`. Launcher, spacecraft, and recoverable payload stages appear in a compact stage table with serial/flight/reuse details, recovery outcome/type, destination, and final coordinates when those records exist; an empty recovery collection omits the section. Stage recoveries with confirmed coordinates use those coordinates; return-to-launch-site records use the pad; downrange-only records receive an explicitly labeled estimated endpoint along the ascent azimuth. Available endpoints render as static 2 px dashed descent/recovery paths with a fixed final-position dot and an estimated atmospheric-interface segment when applicable. The ascent is geodetically densified above the ellipsoid toward the orbit's nearest insertion point, then rendered with `ArcType.NONE`, so it neither cuts through Earth nor separates from the marker. Because LL2 does not normally supply continuous ascent telemetry, pad-to-insertion paths without upstream trajectory samples are labeled `RECONSTRUCTED ESTIMATE` / `ASCENT ESTIMATE`; only supplied trajectory samples receive the replay wording. Selected-orbit framing fits the complete ring, rear-side linework uses normal scene depth occlusion, and current distance, speed, and callout data come only from a launch-year-validated satellite match. Both the loaded-catalog and active-TLE lookups read the launch year from the TLE international designator through one parser (`src/sources/tle.js`); a blank or malformed designator is an unknown year, which skips the year check rather than rejecting the match. Speed is the magnitude of the SGP4 inertial velocity vector at the same propagation epoch as position, displayed in km/s with km/h available as hover detail. Unavailable operator, site, launch-time, orbit, current-altitude, and speed values omit their detail rows instead of reserving panel space with placeholders. Newly launched payloads absent from the core operational groups use CelesTrak's cached active TLE feed as a lookup-only fallback; weak constellation-name matches are rejected. The replay callout maps compressed animation progress onto Launch Library's mission-relative timeline,Line truncated
|
||||
When no mission is selected, the Context panel presents a scrollable newest-first roster of every launch in the rolling window, including the smaller 5 px operator-colored marker, provider, and launch date. Hovering or keyboard-focusing a row shows four compact cyan corner brackets on both that roster row and its corresponding globe dot, rotates the globe at the current zoom to center it, and gives its label declutter priority without selecting it; the globe label remains unbracketed. Selecting a roster row invokes the same mission isolation and full-orbit framing as clicking its globe marker. The replay vehicle is one screen-space SVG/CSS HUD overlay rather than separate Cesium billboard, label, and reticle graphics. It is hidden during ordinary Focus and manual close views, where the standard selected launch-site label remains visible, and exists only while ascent replay is active. Its fixed pixel scale is shared by ascent and insertion, so camera range never resizes the rocket on screen before the phase boundary. Generic Launch Library pad names are reduced to their identifying suffix, and replay timestamps use a cyan state title over unprefixed white UTC date/time values. `REPLAY ASCENT` holds the unframed cyan/white rocket at the pad for a real-time `T−10` countdown, transitions through `LIFTOFF`, and attaches six tapered cyan/white ellipse waves directly below it from liftoff through insertion to convey thrust without adding scene geometry. While replay is active, the single start button is replaced by compact Play, Pause, and Cancel icon controls. Pause freezes countdown or mission time, vehicle/stage positions, camera target, labels, and thrust-wave animation; Play resumes from that exact frame, and Cancel releases replay camera ownership. The rocket and thrust group rotates from the path's live screen-space tangent, so its nose follows the visible ascent curve while the adjacent text remains upright. The camera begins as a close oblique launch chase, then smoothly widens between roughly 120 and 420 km vehicle altitude into a higher oblique context view that keeps the moving rocket targeted while exposing the ascent bend and orbit connection. At insertion the rocket/thrust glyph is replaced by the fixed-size cyan orbit dot, which the camera follows through the existing globe-scale orbit pullback. The chase camera limits per-frame yaw changes across heading wraps so it cannot abruptly cross in front of the vehicle and make ascent read in reverse; the replay-speed slider affects mission playback but not countdown duration.
|
||||
- **Space Missions (30d)**: recent launches render as bounded shared-host, horizon-occluded mission markers using Launch Library 2 v2.3 detailed records. Enabling the layer reveals its own right-rail button and roster and enables the required satellite layer; it does not touch Context. Before applying its temporary dense/hidden Satellite mode, Space Missions snapshots the complete standalone Satellite parameter set and exact enabled-layer set. Disabling Space Missions from Data Layers hides its rail button and panel and restores those parameters and the exact prior enabled state, so a Satellite layer that was already on stays on while a mode-owned dependency returns off; enabling Satellites by itself remains independent. An explicit user or voice Satellites OFF requested after Space Missions ON exits Space Missions, including after returning from Stories; scene, story, preset and other programmatic Satellites changes do not. The controls under the Space Missions row cycle through available launches. Selecting a mission isolates its launch-to-orbit transfer and dashed satellite orbit, fills the Space Missions panel with details, navigation, and replay controls, and animates a small phase-colored marker along the exact displayed Cartesian samples. Marker hit testing drill-picks through photorealistic tiles so the depth-test-free tactical dot remains reliably selectable. Clicking the launch name on the globe selects and focuses the same mission as its dot; what is drawn beneath the name is not picked, and the other layers still hear the click as one on the name, so they close their cards or let go of their selection as for any other click, but never select, turn on, focus or open the link of a contact, card or camera that lies under the name. The selected pad is the camera's zoom pivot: the overview remains centered on its launch site, wheel zoom approaches that site instead of drifting elsewhere, and camera pitch progressively changes from global nadir to an oblique close 3D view. Its protected shared-host callout remains visible and expands to include both mission and launch-site names. `FOCUS` flies directly to a 12 km oblique frame around the selected launch site and retains the same anchored zoom/orbit behavior. `REPLAY ASCENT` resets the selected marker at the pad, frames it from an oblique third-person angle, and follows it through the mission-specific compressed ascent directly into one orbital lap at the default `1×` rate. A live `0.25×`–`4×` slider changes ascent and orbit playback speed; adjusting it mid-replay preserves the current path position and historical mission timestamp. Re-entry/recovery cannot be inserted into replay. At orbit insertion the camera smoothly pulls back over the first fifth of the orbital replay and pitches to a globe-scale nadir view while continuing to target the moving replay point. Replay Cancel, mission navigation, deselection, layer disable, and data refresh all release camera ownership. Reconstructed paths are one continuous 128-sample geodetic curve: horizontal departure begins near zero while altitude rises quickly, then the climb progressively bends toward insertion without the former hard 120 km corner. Unmatched orbit fallbacks are smooth planar inclined rings rather than longitude/latitude ground-track curves. The panel lists disclosed payload names, types, operators/manufacturers, mass, multiplicity, and destination when supplied; an empty LL2 payload collection is shown as `CLASSIFIED / MULTI-PAYLOAD`. Launcher, spacecraft, and recoverable payload stages appear in a compact stage table with serial/flight/reuse details, recovery outcome/type, destination, and final coordinates when those records exist; an empty recovery collection omits the section. Stage recoveries with confirmed coordinates use those coordinates; return-to-launch-site records use the pad; downrange-only records receive an explicitly labeled estimated endpoint along the ascent azimuth. Available endpoints render as static 2 px dashed descent/recovery paths with a fixed final-position dot and an estimated atmospheric-interface segment when applicable. The ascent is geodetically densified above the ellipsoid toward the orbit's nearest insertion point, then rendered with `ArcType.NONE`, so it neither cuts through Earth nor separates from the marker. Because LL2 does not normally supply continuous ascent telemetry, pad-to-insertion paths without upstream trajectory samples are labeled `RECONSTRUCTED ESTIMATE` / `ASCENT ESTIMATE`; only supplied trajectory samples receive the replay wording. Selected-orbit framing fits the complete ring, rear-side linework uses normal scene depth occlusion, and current distance, speed, and callout data come only from a launch-year-validated satellite match. Both the loaded-catalog and active-TLE lookups read the launch year from the TLE international designator through one parser (`src/sources/tle.js`); a blank or malformed designator is an unknown year, whichLine truncated
|
||||
When no mission is selected, the Space Missions panel presents a scrollable newest-first roster of every launch in the rolling window, including the smaller 5 px operator-colored marker, provider, and launch date. Hovering or keyboard-focusing a row shows four compact cyan corner brackets on both that roster row and its corresponding globe dot, rotates the globe at the current zoom to center it, and gives its label declutter priority without selecting it; the globe label remains unbracketed. Selecting a roster row invokes the same mission isolation and full-orbit framing as clicking its globe marker. The replay vehicle is one screen-space SVG/CSS HUD overlay rather than separate Cesium billboard, label, and reticle graphics. It is hidden during ordinary Focus and manual close views, where the standard selected launch-site label remains visible, and exists only while ascent replay is active. Its fixed pixel scale is shared by ascent and insertion, so camera range never resizes the rocket on screen before the phase boundary. Generic Launch Library pad names are reduced to their identifying suffix, and replay timestamps use a cyan state title over unprefixed white UTC date/time values. `REPLAY ASCENT` holds the unframed cyan/white rocket at the pad for a real-time `T−10` countdown, transitions through `LIFTOFF`, and attaches six tapered cyan/white ellipse waves directly below it from liftoff through insertion to convey thrust without adding scene geometry. While replay is active, the single start button is replaced by compact Play, Pause, and Cancel icon controls. Pause freezes countdown or mission time, vehicle/stage positions, camera target, labels, and thrust-wave animation; Play resumes from that exact frame, and Cancel releases replay camera ownership. The rocket and thrust group rotates from the path's live screen-space tangent, so its nose follows the visible ascent curve while the adjacent text remains upright. The camera begins as a close oblique launch chase, then smoothly widens between roughly 120 and 420 km vehicle altitude into a higher oblique context view that keeps the moving rocket targeted while exposing the ascent bend and orbit connection. At insertion the rocket/thrust glyph is replaced by the fixed-size cyan orbit dot, which the camera follows through the existing globe-scale orbit pullback. The chase camera limits per-frame yaw changes across heading wraps so it cannot abruptly cross in front of the vehicle and make ascent read in reverse; the replay-speed slider affects mission playback but not countdown duration.
|
||||
Mission world text has no native `LabelGraphics`: overview launch markers publish at most 48 ambient candidates for a 24-winner budget, while selecting a mission clears that overview source and publishes its launch-site callout, stage re-entry annotations, live/estimated payload-position readout, and orbit annotation as protected selected-lane entries. The source retains the exact former strings and colors. Static anchors reuse the Cartesian values used to build their mission geometry; the moving payload entry reads the layer's per-frame live-position cache; catalog-backed orbit annotation positions are cached in the same one-second matrix update that realigns the orbit primitive. Keyhole edge fade, horizon culling, final collision placement, and UI exclusion are owned by the shared host. Deselect restores the bounded overview, and refresh, disable, and destroy replace or clear both mission sources.
|
||||
A selected mission renders its orbit as four repeating tactical sectors, each containing one prominent cyan dot followed by one hundred thin translucent dashes. The bright dots act as orbit anchors while the subdued dash field remains depth-tested against the globe and is shown only for the selected mission.
|
||||
Close selected-pad views add one static 500 m-radius cyan launch-zone ring with a low-opacity translucent fill over the sampled photoreal launch-site surface. The single scene primitive is created only for the visible selected site and is otherwise dormant. It appears during Focus, sufficiently close manual zoom, and the replay countdown, but is suppressed above 120 km camera altitude, beyond 180 km direct camera-to-pad range, for unselected missions, and whenever Space Missions is inactive. Focus establishes a launch-site-centered camera transform once; subsequent manual heading and pitch changes remain centered on that site without an automated per-frame correction. Surface mission markers and labels use an additional conservative globe-limb margin before the exact ellipsoid occluder boundary, preventing near-horizon visibility from alternating between frames.
|
||||
@@ -7794,6 +7818,291 @@ and unreachable upstream (502/504) separately from road geometry.
|
||||
- `partial` is a feed state of its own, ranked between `fallback` and `nominal`, so one partial layer, or partial plus nominal, reads partial, not off or nominal (HUD, voice view state, `analyst_query`, `brief`, the agent world packet). Its narration note says coverage is incomplete rather than not live.
|
||||
- A summary asked for before the camera starts moving never paints over the next view: `moveStart` marks the summary dirty and bumps its revision, as `moveEnd` does, aborts the request in flight and stops a reply still typing; neither a reply nor a fallback line (on an error, the 5 s timeout, the abort, or a failed context build) paints once the revision has moved. A dropped request forgets its signature and a timeout counts as a failure, so the next 15 s tick asks again even over the same place. An interrupted typewriter reply also forgets its signature; fully displayed answers remain reusable.
|
||||
|
||||
### Omnibar
|
||||
|
||||
The desktop Omnibar sits above the footer with the existing mic and chat
|
||||
buttons on either side. Suggestions open upward. On phones the Omnibar is
|
||||
a field near the top, beside the Search sheet, and opens downward. While voice is on, the desktop field shows
|
||||
three audio traces in place of the search text and icon. The thinking dots
|
||||
sit on the field's top edge. World Time appears immediately above the dock
|
||||
and hides while suggestions, chat, or voice settings are visible. `/`
|
||||
focuses search from outside a text field, as do Cmd+K on macOS and Ctrl+K
|
||||
elsewhere (Ctrl+K on macOS is left alone); none of them takes focus from an
|
||||
open modal dialog or from inside a dialog such as the guide. While voice is
|
||||
on, the suggestions give way to the waveform but an error stays shown. The map credits stay on the
|
||||
Power Up row in the ordinary desktop layout, and the Tactical bottom-right
|
||||
readout sits 8px above that row.
|
||||
|
||||
Pending owner decision: in the desktop Omnibar layout
|
||||
(`src/ui/styles/omnibar-dock.css`) the legacy Location and Visual trays of
|
||||
the command dock are hidden (`#command-dock > :is(#location-bar,
|
||||
#control-panel)`), as is the tactical and minimal HUD's mode readout
|
||||
(`.hud-readout:has(> #hud-mode)`). Search moves to the Omnibar and presets to
|
||||
the Visual rail; the phone shell and exclusive modes keep their layouts.
|
||||
|
||||
The field offers places, latitude/longitude and grid coordinates, named map
|
||||
entities, and layer controls. The strip can show cities and landmarks,
|
||||
nearby small places from the bundled Wikidata packs, selected items and
|
||||
drawing shapes. The cities of a state or country are those inside its
|
||||
extent and in its country (by the ISO code Photon returns); with only one of
|
||||
the two known, that one decides. Selecting a
|
||||
guided result highlights the existing app controls. "Show me how", "how do
|
||||
I …" and "how to …" find a walk by the words people use: a layer's name
|
||||
("how to turn on flights"), or a feature's (`FEATURE_TOPICS` in
|
||||
`src/ui/omnibarRows.js`): the style or look ("change the map style"), the
|
||||
map underneath ("change the map", "switch to OpenStreetMap"), the HUD,
|
||||
north or the compass, tilt, the globe or a reset ("get back to the globe"),
|
||||
sharing, clearing all layers, and drawing and measuring ("how to measure
|
||||
distance": open Utilities, press Draw, pick Line for a distance or Area for
|
||||
its size). A leading `>` opens the
|
||||
command menu; use it for exact layer commands such as `> show flights`.
|
||||
|
||||
The rows come from one pure pipeline, `createOmnibar` in
|
||||
`src/ui/omnibarRows.js`: the line is normalised once (`normalizeLine` in
|
||||
`src/ui/omnibarIntent.js`, through `readLine` in `src/ui/omnibarRows.js`:
|
||||
full-width forms folded, curly apostrophes made straight, a closing full
|
||||
stop or "!" dropped (an initial's kept, as in "Washington D.C."), and a
|
||||
"please" before or after a request dropped, never one in a name ("Please
|
||||
Touch Museum", "Pretty Please")), read once (`parseOmnibar`), turned into
|
||||
rows, and ordered by the Enter rule; the same reader decides what may go
|
||||
to Photon and what is a count request. A whole line searched as a place is
|
||||
searched as typed ("Paris, Texas.", "Yahoo!"). The
|
||||
component (`Omnibar.vue`) supplies the layers, Photon's answers, the map's
|
||||
items and the selection, and runs the chosen row; the strip of chips under
|
||||
the field (landmarks, cities of a region, villages, recent places, draw
|
||||
shapes) is built in the component from the same normalised line. What Enter does with no
|
||||
row chosen follows one rule, in `src/ui/omnibarEnter.js` (`enterDefault`),
|
||||
pinned by an input-to-outcome table in `src/ui/omnibarRows.test.mjs` and
|
||||
by the mounted table in `src/ui/commandDock.test.mjs`. Only the first row can be the default; an
|
||||
empty field and a bare `>` have none; the pointer never chooses a row
|
||||
(hovering then pressing Enter runs the default, a click runs the row), and
|
||||
the arrow keys choose any row. Enter performs an action (a plan, a layer
|
||||
switch, a command, Ask GEV) only when the line asks for it outright:
|
||||
|
||||
- the action's own clause starts with a verb from the one list
|
||||
(`ACTION_VERB` in `src/ui/omnibarIntent.js`, read in any letter case by
|
||||
`hasActionVerb`): show, hide, turn, switch, toggle, enable, disable, add,
|
||||
remove, display (with something after it), play, start, open, close,
|
||||
enter, listen, tune, mute, unmute, follow, track, draw, measure, share,
|
||||
copy, reset, silence, pause, "nearest plane" and the like, or a clause
|
||||
ending in "on" or "off" ("radio off"). A style, map, camera move, HUD or
|
||||
layer followed by "on" or "off" reads as that switch ("noir off" and
|
||||
"turn off noir" go back to the normal style, "orbit off" stops the camera,
|
||||
"osm off" runs nothing), never as a place called "off"; words that also start names count
|
||||
only alone or before what they act on ("clear the map", "zoom in",
|
||||
"tilt", "orbit", "stop the radio", "kill the radio", "face north"). Verbs
|
||||
are read per clause, so a verb inside a place's name asks for nothing
|
||||
("radio near Clear Lake", "radio in Show Low", "radio near Stop,
|
||||
Arkansas" search the place). A layer is asked for only by a switch (show,
|
||||
display, add, enable, turn or switch on, hide, remove, disable, turn or
|
||||
switch off) right before its word: "Show Low radio" and "Kill Devil Hills
|
||||
radio" name places, and a verb with a name left beside its keywords asks
|
||||
for nothing else in its clause ("Show Low noir", "Start Point noir",
|
||||
"Track Hill noir"). A clause joined to a "go to"
|
||||
clause by "and" or "then" counts as asked ("go to Paris, Texas and
|
||||
noir");
|
||||
- or it is a command's exact label, alone or after `>` ("North up", "Noir",
|
||||
"> Clear all layers"). A command row runs on nothing else: a bare switch
|
||||
verb ("hide", "turn off", "disable") only lists what it could switch;
|
||||
- or a data layer's whole shown name or synonym alone, which names that
|
||||
layer as a command's label does ("flights", "earthquakes", "Satellite");
|
||||
- or, for Ask GEV, it is a real question: it ends with "?" (full-width
|
||||
"?" and Arabic "؟" too), has a word of two letters or more, and has a
|
||||
question's form (below), or two words in a
|
||||
non-Latin script; or five Han, Kana or Hangul characters ("what?", "??",
|
||||
"N Y?", "New York?", "Truth or Consequences?" and "東京都?" are not:
|
||||
Ask GEV is offered first and Enter runs nothing; small talk such as "what's up" or "how's it going" is never one); or, without "?", it
|
||||
starts with
|
||||
what/where/when/who/why/how/which followed by is, are, was, do, does,
|
||||
did, can, could, should, would, will, 's, many, much, far, long or to,
|
||||
then has a word about something ("what is here", "how far is paris"; not
|
||||
"what is", "how to", "who is it"), and is not written as a name (three
|
||||
words or more, each capitalised: "Where Is My Mind"). A line starting
|
||||
with an auxiliary and a pronoun or determiner (is it, can you, do it…)
|
||||
asks only with "?": without it, Ask GEV is offered first and Enter runs
|
||||
nothing ("can you show me", "is it raining in tokyo"), and with a capital
|
||||
after its first two words it is a name and searches the place ("Can You
|
||||
Imagine", "Do it Best Hardware"). "Can Tho City" and "Is Kinabalu Park"
|
||||
are places. A line
|
||||
with a comma and no "?" is a place ("Why, Arizona"), never a question.
|
||||
Any other line, small talk and question words included ("why", "help",
|
||||
"what cheer", "List"), still offers the place row first, with Ask GEV
|
||||
after it.
|
||||
|
||||
A whole layer name with a place after near, in, around, over, across or
|
||||
above ("flights near Tokyo", "earthquakes above m5 in japan") asks outright
|
||||
too; after "of" or "at" the line may be a name and the whole line is
|
||||
offered as a place first ("Planes of Fame Air Museum", "Boats at Sea"). Keywords without a
|
||||
verb ask for nothing, however many clauses they fill ("New York City
|
||||
noir", "Fire and Rain", "noir and cctv near austin, north up"): with a
|
||||
place after near or in that place is searched, and otherwise the whole
|
||||
line is offered as a place first ("Storm Lake and Spencer", "Thermal and
|
||||
Indio"), the plan after it. Draw opens on Enter only for "draw" itself or a
|
||||
draw verb with something to draw ("draw a line"; not "Draw Bridge"), and a
|
||||
guided walk found by forgiving a typo, or on a line written as a title
|
||||
("How To Train Your Dragon"), is offered, never run. A switch verb before
|
||||
a capitalised name that names no layer is a place ("Remove Island",
|
||||
"Toggle Inn"). A
|
||||
layer row runs only when the line names that layer before any other, by a
|
||||
whole word of its shown or English name (never its id, and not a word of
|
||||
kind such as local, global, live, world, new, open, data, map, view or
|
||||
level) or a synonym, with a plural "s" allowed from four letters
|
||||
("flights" yes; "a", "display", "Local", "Global", "new" no). "show
|
||||
flights" with Live Flights already on offers Live Flights, which then
|
||||
switches nothing; Military Flights, which also has the word, is only
|
||||
offered after it. Words about a layer after a switch are no place ("show radio
|
||||
stations", "show flights here"); without the switch the line may be a name
|
||||
("Train Station"). A line of more than six words left over as a
|
||||
place (ten with a number in it), or of more than eight words that asks for
|
||||
nothing outright, is a sentence (pasted text, a remark): it is never sent to
|
||||
Photon, Ask GEV is offered, and so is a row that searches the whole line as a
|
||||
place when picked ("San Miguel de las Piedras Primera Sección"); Enter runs
|
||||
neither. A word that is
|
||||
both a bundled place's name and, alone, a command, style or layer word
|
||||
(`PLACE_WORDS` in `src/ui/omnibarEnter.js`: Bike, Hurricane, Normal, Rain,
|
||||
Ski, Street, Thermal) searches the place first and offers the switch
|
||||
second. The list comes from sweeping every bundled name (139,502), alone
|
||||
and with " radio" and " noir" after it, through the mounted Omnibar; after
|
||||
it, none defaults to anything but a place. A test samples about 2,000 of
|
||||
them. Some actions need more: sound (the Radio layer and command),
|
||||
clearing the map, closing panels and the cockpit need a verb or their exact
|
||||
label ("turn on radio", "close all panels", "enter cockpit"; not "radio near
|
||||
tokyo" or "Radio, Tokyo"), and the microphone, sharing the view, resetting
|
||||
it and the globe view need their exact label ("Talk to GEV", "Share this
|
||||
view", "Reset view", "Globe view"; not "mic", "share", "home" or "start
|
||||
over").
|
||||
Otherwise the place row is the default and moves first ("Thermal,
|
||||
California", "radio near tokyo" searches Tokyo), and any plan or command is
|
||||
offered after it; a line with neither ("hi", "NY", "?") runs nothing. "hide everything near tokyo" clears the layers and flies to
|
||||
Tokyo. Following needs a callsign or ICAO address (letters and a digit), a
|
||||
nine-digit MMSI or the name of something loaded on the map, so "Track
|
||||
Hill" and "Track 29" are places; "nearest plane" counts alone or before a
|
||||
place ("Nearest Plane Crash Site" is a name), and "goto" only with a place
|
||||
after it ("Goto" is a town). A row chosen with the arrow keys is kept by its key while rows
|
||||
arrive above it, and the default comes back if it goes away. After a row
|
||||
runs with Enter, the field empties and keeps focus for the next line on
|
||||
desktop; a tapped or clicked row lets go of it, and on the phone shell any
|
||||
row does (so the keyboard does not stay over the map), and so do Ask GEV, the mic, the cockpit, following, a guided
|
||||
walk, and any row while drawing is on (the draw tool reads Enter, Backspace
|
||||
and Esc). Escape closes the list, and on an empty, closed field lets go of
|
||||
it, so the app's own keys work again. While voice
|
||||
is on, the list is closed (not expanded) and Enter runs nothing. Text that
|
||||
may be private is never looked up or searched while typed or on Enter: only
|
||||
things already loaded on the map may match it, locally, and when only a
|
||||
long run of digits makes it look private and it has words (an address can:
|
||||
"Москва, ул. Тверская, д. 13, 125009") one row searches it as a place only
|
||||
when picked (see below).
|
||||
|
||||
After "go to" (or "fly to" and the like) the rest of the clause, and a
|
||||
following part after a comma that has no verb, is the place, read before
|
||||
any keyword in it: "go to Thermal, California" only searches there. A
|
||||
request ending that clause is peeled off and offered as a plan after the
|
||||
place: "in", "with" or "at" and a style, map or layer ("go to tokyo in
|
||||
noir", "go to London with flights"), a switch and a layer ("go to tokyo show
|
||||
flights"), or a comma part that is exactly a style, map, camera move or
|
||||
layer ("go to Tokyo, north up"). A line with one keyword and no verb beside
|
||||
the rest of a name ("Tilt Cove", "tokyo traffic", "Hurricane, Utah") offers
|
||||
the whole line as a place first and the plan second. Further places joined
|
||||
with "and" are offered as their own rows. Things loaded on the map that
|
||||
match the line are offered too: a callsign, tail number or transponder
|
||||
code puts them first, and otherwise the place row keeps the top, so
|
||||
"Hamburg" goes to the city before the ship HAMBURG. An unrecognized explicit command
|
||||
stays in search. Questions can be sent through Ask GEV, which uses the
|
||||
existing typed chat.
|
||||
|
||||
Han, Hangul and Kana names are looked up from two characters (東京), others
|
||||
from three.
|
||||
|
||||
Plans run step by step, and a layer step reads the layer's state when it
|
||||
runs, not when the line was read. A step the app refuses (an action
|
||||
answering `ok: false`, a layer switch answering `false`, a globe action no
|
||||
connected owner answers, a panel to open with no rail button) stops the
|
||||
plan and shows the same error under the field as a single action, with
|
||||
the action's own short spoken reason (`say`) when it gives one and the
|
||||
interface is in English (the runner speaks English, so other languages
|
||||
get the translated message alone); a flight cancelled by a newer
|
||||
one stops the plan quietly. A running plan is superseded, and none of its
|
||||
later steps run, when the field's text changes, another row or chip is
|
||||
chosen, Escape is pressed, the field is reset after a finished choice, or the
|
||||
Omnibar unmounts. Focus leaving the field (a click on the map, the mic, the
|
||||
search shortcut) does not cancel it. The guide's placement check pauses
|
||||
while the tab is hidden.
|
||||
A place search on its own runs through Location and shares its cancellation
|
||||
and errors, keeping the separate Location draft intact.
|
||||
|
||||
While typing, a short line (six words or fewer, no `?`, not a command,
|
||||
coordinates, a hex code, a callsign such as UAL2110 or N123AB, and nothing
|
||||
that may be private) is sent to
|
||||
Photon for place suggestions: at most one request every 500 ms per tab,
|
||||
and none for a minute after a refusal. Photon is the keyless geocoder the
|
||||
place search already uses; a submitted search is not part of this spacing.
|
||||
A line that may be one name ("Satellite Beach") is looked up whole. While
|
||||
its suggestions show, or a recent-place chip that came from them, the
|
||||
OpenStreetMap credit shows too; recent chips from the bundled packs credit
|
||||
Wikidata. Private text, by `mayBePrivate` in
|
||||
`src/search/placeSuggestions.js`, is never sent to Photon, offered as a
|
||||
place, searched or sent to GEV; only things already loaded on the map may
|
||||
match it, locally. The line is read after NFKC, so full-width letters,
|
||||
digits and "@" count, and digits of any script count as digits. It is
|
||||
any line with: an "@" with something right on both sides, ending a word,
|
||||
starting a lowercase handle ("@jdoe"), or spaced before a domain ("john @
|
||||
gmail.com") (an email address or a handle, also while it is typed; spaced, as in "Nanjampeta @
|
||||
Chandambylu", it is part of a name); seven digits or more with nothing but spaces,
|
||||
punctuation, symbols or format characters between them (a phone, card,
|
||||
SSN or account number or its start: "+1 415 555", "4111 1111", "123 45
|
||||
6789", "123456789", "4111.1111.1111.1111", "123–45–6789"; a street address's house number
|
||||
and its postcode are read apart: five digits, or between the street and
|
||||
the city "00-950", "111 21", "125009", "1100-053", or four digits after a
|
||||
comma ("Straße 120, 1070 Wien"); and so are a US ZIP+4 after a word,
|
||||
a Brazilian CEP, a Japanese postcode after "〒" or before the address, and
|
||||
digits on either side of "#", so "Hauptstrasse 12 10115 Berlin", "DC
|
||||
20500-0003", "〒100-0001 東京都千代田区" and "Calle 100 # 19-61" are places,
|
||||
while a seven-digit postcode alone such as "Tel Aviv 6100000" still reads
|
||||
as private); a phone number written with dots; two letters, two
|
||||
digits and ten more letters or digits (an IBAN's shape); "password",
|
||||
"passcode", "passwd", "ssn", "pw", "pwd" or "bearer" followed by anything,
|
||||
"token", "secret", "api key", "key" or "pass" followed by ":" or "=", a
|
||||
door, access, gate, alarm, entry or security code followed by a digit, "api
|
||||
key", "access token" or "secret key" followed by a word of six characters
|
||||
or more, the word for "password" in the interface's languages
|
||||
(contraseña, Passwort, mot de passe, пароль…) followed by anything, or "pin"
|
||||
(also "pin code", "pin number", "pin is") followed by a digit; a word
|
||||
starting `sk_`, `sk-`, `rk_`, `pk_live`, `ghp_` or a Slack token's `xoxb-` and the like (any case) or
|
||||
`AIza`, `eyJ` or `AKIA`; or a word that may be a password or key, with letters and digits mixed
|
||||
within one run (a number beside a word, as in "Yanino-1", "2-chōme" or
|
||||
"Route-66", is a name): eight characters or more, six or more with four
|
||||
letters and a digit ("hunter22", "Area51"), or six or more with letters,
|
||||
digits and a symbol ("Tr0ub4dor&3"). The password words match whole words
|
||||
only ("Sachsenhausen" is a place). Over the bundled names (139,502), five
|
||||
read as private: two with stray digits ("Maliga0N", "Jerónim67") and three
|
||||
with number lists or codes. When the text may be private the field says
|
||||
so ("Looks private, so nothing is searched or sent"), and a line whose
|
||||
only private sign is an address-sized run of digits (no group over six
|
||||
digits, nine at most in all, counted as they fold, and no word such as
|
||||
card, code, key, phone or account beside them, in English and some other
|
||||
European languages; compounds such as "Kreditkartennummer" and words in
|
||||
other scripts are not read), with words beside it, gets a row
|
||||
to search it as a place on purpose ("Search … as a place anyway"), which
|
||||
runs the ordinary place search and its online services only when picked; a
|
||||
bare number, an email or handle, a password, key, code or IBAN gets none.
|
||||
A nine-digit number or a short phone number written with no such word
|
||||
still gets the row: only picking it sends anything. One-time and verification codes,
|
||||
OTP, 2FA, MFA, CVV and CVC values, "card ending" digits, passphrases,
|
||||
recovery or seed phrases, "my secret is …" and an email spelled out ("john
|
||||
at example dot com") are private too. Text that parses as coordinates or a
|
||||
grid reference is not private. A place's name is six words at most, or ten
|
||||
when it has a number in it (an address: "1600 Pennsylvania Ave NW
|
||||
Washington DC 20500"). The places picked from the Omnibar's rows and chips that carry a position
|
||||
(a typed name searched as a place, or a plan's place, is not kept; the last 20:
|
||||
name, position and where the name came from) are kept in this browser's
|
||||
`localStorage` under `gev:omnibar:recent-places` for the strip; nothing
|
||||
clears them but the browser's own site data. Setting `PHOTON_URL`
|
||||
empty turns the suggestions off along with it. Small places come from the
|
||||
bundled Wikidata packs and are never looked up online; a small place with
|
||||
the name of a city within 3 km in the same country is that city, and only
|
||||
the city is listed. At most 64 detail tiles are kept in memory, the least
|
||||
recently used dropped first.
|
||||
|
||||
### Place-search providers
|
||||
|
||||
Coordinate input requires exactly two nonempty components; extra comma or semicolon separators decline to geocoding rather than silently choosing a location.
|
||||
@@ -8196,7 +8505,7 @@ apply to `public/` assets or built-preview serving.
|
||||
- Panel POSITION keys are versioned `v8` (`godsEyeView.v8.panelPos.<id>`); collapsed-state keys remain `v6`. The one-time position reset clears stale DISPLAY placements that could overlap the Context rail.
|
||||
- Map Source lives in the bottom Visual Presets tray. The left accordion contains no MAP STACK panel, and the `k` panel token that addressed it is gone from the share registry, so legacy `ui=k...` state takes the ordinary unknown-token skip.
|
||||
- A dock popover (Visual Presets, Location) auto-dismisses on mouse-away unless pinned. Focus inside the tray defers that dismissal only when the browser reports `:focus-visible` — keyboard focus and typed-into fields hold the tray open; a mouse-clicked tile does not, because Chromium focuses a `<button>` on press.
|
||||
- The voice and chat panels share the left panels' glass surface (`--glass-bg`, `--glass-border`, blur(24px) saturate(1.4); `src/ui/styles/ai-chat.css`). The docked voice control draws its own blur on a layer behind it, so the panels inside it still blur the map. Cyber keeps its own surfaces.
|
||||
- The voice and chat panels share the left panels' glass surface (`--glass-bg`, `--glass-border`, blur(24px) saturate(1.4); `src/ui/styles/ai-chat.css`). The docked voice control draws its own blur on a layer behind it, so the panels inside it still blur the map.
|
||||
- The desktop right rail (`#right-context-rail`) owns `DISPLAY`, `CCTV`, its active parameter controls, and `GLOBAL CONTEXT` as one fixed responsive stack in that order. Its compact buttons use the same 176 px width as the left accordion and one consistent 50 px height, share the left stack's 52 px edge inset and measured top baseline across HUD variants, then constrain themselves against visible HUD/chrome rectangles and the remaining vertical corridor. `DISPLAY` is no longer draggable and legacy saved coordinates are ignored.
|
||||
- The right rail is labeled **DISPLAY** (formerly "MOVE") and groups, in order, HUD, DETECT, Bloom, Sharpen, 3D, Clean-UI (HUD + DETECT promoted to the top). Its expanded controls retain the same compact 176 px width as the right-side tabs instead of growing to the wider Context detail-card width. It starts expanded on first run and respects the user's later `v6` collapse choice. Collapses/expands with directional chevrons (`◀` collapsed, `▶` expanded).
|
||||
- Display and Context use matching 330 px expanded widths and matching compact tab dimensions. The parameter panel is part of Display's expanded content. One right-rail panel is open at a time in every HUD layout and collapsed launchers are hidden; the panel rail beside the stack switches between them (see Panel rails). The most recently opened right-rail panel owns the lane even when it appears later in DOM order; passive restoration and automatic disclosure do not replace that explicit owner. When the open panel exceeds the measured corridor, it scrolls internally.
|
||||
@@ -8277,11 +8586,11 @@ apply to `public/` assets or built-preview serving.
|
||||
The ship bridge and the orbital view have their own own-layer gates
|
||||
(`bridgeEntryAllowed`, `orbitEntryAllowed`; see
|
||||
[Ship bridge view](#ship-bridge-view) and [Orbital view](#orbital-view)).
|
||||
- **Aircraft cockpit view:** selecting a commercial or military aircraft reveals a `COCKPIT` action once that aircraft's own layer is on; Contacts is not required. The action shows in Contacts (`#cockpit-entry`) and under the Intel HUD's bottom-right readout (`#cockpit-entry-readout`, with the HUD on, in its Tactical and Cyber layouts), so entry needs no Contacts panel. Turning off the ridden aircraft's layer ends the view (the layer clears its tracking). When an air feed the surrounding picture uses is off, the Cockpit says so instead of blocking: Live Signals leads with `MILITARY FEED OFF · PARTIAL PICTURE` or `FLIGHTS FEED OFF · PARTIAL PICTURE`, and the Contact card shows that line in place of its inputs status, so a partial picture is never presented as complete. `control_cockpit` refuses entry with `entryBlockedReason` `contacts-starting` (a Context change in flight), `subject-layer-off` (the aircraft's layer, or with none tracked any aircraft layer, is off) or `no-tracked-aircraft`. Cockpit mode temporarily releases Cesium's orbit-follow transform and drives a first-person camera from the tracked aircraft's existing smoothed display position and course. Its concave helmet-visor HUD shows callsign, UTC time, coordinates, curved roll/pitch guides, and a seven-division heading tape. Ambient commercial and military AIR contacts use a Cockpit near/far band selected by the shared Display 3D mode: Proximity admits at 150 km and retains to 185 km; All admits at 400 km and retains to 450 km. The shared 3D toggle now applies in Cockpit: Off keeps in-range contacts as rotating 2D aircraft silhouettes, while On lets a ready admitted glTF take over without a drawing gap. The Cockpit model cap remains 60 and can only lower the map budget; in-range contacts that are capped or still loading remain 2D silhouettes instead of degrading to out-of-range dots. Contacts outside the selected band use small rotation-free cyan-white pips for civilian aircraft and amber pips for military. The pilot's own airframe is not drawn in first person, and exiting clears the Cockpit band and restores normal map silhouettes/models. The normal left accordion remains available for Layers and Authoring and keeps the same 26vh HUD-aligned anchor used in map mode, independent of whether the bottom-left Contact card is expanded or collapsed; the right-rail CCTV and Context chooser are hidden to avoid duplicating or overlapping the cockpit presentation. When the intelligence HUD is enabled, its classification, scene summary, collection/orbit metadata, coordinates, and imaging-status text remain visible as reduced peripheral cockpit telemetry; the optical center and flight instruments stay clear, and turning the HUD off still hides it. Ground speed, exact heading, and rendered altitude form one compact lower-center instrument cluster, keeping the horizon and peripheral view open. A second live altitude tape hugs the inside-right visor rim: its rail and nine moving ticks are derived from the same responsive keyhole radius, remain 20 px inside the circular edge even on wide displays, fade deeply at both vertical ends, and move continuously behind a fixed current-altitude pointer; its interval tightens automatically near the surface and it is suppressed on narrow screens. Cockpit mode also has a weather-backed transparent volumetric-cloud pass derived from the supplied FBM/domain-warped R&D shader. It renders at no more than 520×320, uses 24 ray steps/three FBM octaves at 12 FPS, is clipped to the visor, fails clear when Open-Meteo is unavailable, and stops its animation completely on cockpit exit. It does not restore the prior CPU weather canvases, precipitation, scene fog, or any map-mode effect. When Contacts is active for the tracked aircraft, the compact `CONTACT` rail adds the 250 km subject window, four cohort counts, nearest observed/mapped example with relative bearing and distance, freshness, explicit uncertainty, and Previous and Next controls plus its own collapse control. The mirrored right rail is a three-page **cockpit briefing carousel**: source-backed live signals, location-matched regional headlines, and physical-region/current-weather context from bundled Natural Earth polygons and Open-Meteo. It is manual-first: Previous, Next, and direct page controls are always available, and the visible `CYCLE OFF` / `CYCLE ON` control starts or stops the nine-second page cycle. The cycle pauses on hover or keyboard focus and stops while collapsed, hidden, or outside cockpit mode; live signal data continues refreshing either way. Regional News holds its list to the last 24 hours (`newsWindowHours` in the brief; the client drops anything older or undated even if a server sends it) and shows four distinct states: fresh results with no banner and a `{SOURCE} · LAST 24 H` footer; earlier results kept after a failed refresh under `CACHED · REFRESH FAILED` with the cached age in the footer; `NO NEWS IN THE LAST 24 H` when a source answered wiLine truncated
|
||||
- **Aircraft cockpit view:** selecting a commercial or military aircraft reveals a `COCKPIT` action once that aircraft's own layer is on; Contacts is not required. The action shows in Contacts (`#cockpit-entry`) and under the Intel HUD's bottom-right readout (`#cockpit-entry-readout`, with the HUD on, in its Tactical layout), so entry needs no Contacts panel. Turning off the ridden aircraft's layer ends the view (the layer clears its tracking). When an air feed the surrounding picture uses is off, the Cockpit says so instead of blocking: Live Signals leads with `MILITARY FEED OFF · PARTIAL PICTURE` or `FLIGHTS FEED OFF · PARTIAL PICTURE`, and the Contact card shows that line in place of its inputs status, so a partial picture is never presented as complete. `control_cockpit` refuses entry with `entryBlockedReason` `contacts-starting` (a Context change in flight), `subject-layer-off` (the aircraft's layer, or with none tracked any aircraft layer, is off) or `no-tracked-aircraft`. Cockpit mode temporarily releases Cesium's orbit-follow transform and drives a first-person camera from the tracked aircraft's existing smoothed display position and course. Its concave helmet-visor HUD shows callsign, UTC time, coordinates, curved roll/pitch guides, and a seven-division heading tape. Ambient commercial and military AIR contacts use a Cockpit near/far band selected by the shared Display 3D mode: Proximity admits at 150 km and retains to 185 km; All admits at 400 km and retains to 450 km. The shared 3D toggle now applies in Cockpit: Off keeps in-range contacts as rotating 2D aircraft silhouettes, while On lets a ready admitted glTF take over without a drawing gap. The Cockpit model cap remains 60 and can only lower the map budget; in-range contacts that are capped or still loading remain 2D silhouettes instead of degrading to out-of-range dots. Contacts outside the selected band use small rotation-free cyan-white pips for civilian aircraft and amber pips for military. The pilot's own airframe is not drawn in first person, and exiting clears the Cockpit band and restores normal map silhouettes/models. The normal left accordion remains available for Layers and Authoring and keeps the same 26vh HUD-aligned anchor used in map mode, independent of whether the bottom-left Contact card is expanded or collapsed; the right-rail CCTV and Context chooser are hidden to avoid duplicating or overlapping the cockpit presentation. When the intelligence HUD is enabled, its classification, scene summary, collection/orbit metadata, coordinates, and imaging-status text remain visible as reduced peripheral cockpit telemetry; the optical center and flight instruments stay clear, and turning the HUD off still hides it. Ground speed, exact heading, and rendered altitude form one compact lower-center instrument cluster, keeping the horizon and peripheral view open. A second live altitude tape hugs the inside-right visor rim: its rail and nine moving ticks are derived from the same responsive keyhole radius, remain 20 px inside the circular edge even on wide displays, fade deeply at both vertical ends, and move continuously behind a fixed current-altitude pointer; its interval tightens automatically near the surface and it is suppressed on narrow screens. Cockpit mode also has a weather-backed transparent volumetric-cloud pass derived from the supplied FBM/domain-warped R&D shader. It renders at no more than 520×320, uses 24 ray steps/three FBM octaves at 12 FPS, is clipped to the visor, fails clear when Open-Meteo is unavailable, and stops its animation completely on cockpit exit. It does not restore the prior CPU weather canvases, precipitation, scene fog, or any map-mode effect. When Contacts is active for the tracked aircraft, the compact `CONTACT` rail adds the 250 km subject window, four cohort counts, nearest observed/mapped example with relative bearing and distance, freshness, explicit uncertainty, and Previous and Next controls plus its own collapse control. The mirrored right rail is a three-page **cockpit briefing carousel**: source-backed live signals, location-matched regional headlines, and physical-region/current-weather context from bundled Natural Earth polygons and Open-Meteo. It is manual-first: Previous, Next, and direct page controls are always available, and the visible `CYCLE OFF` / `CYCLE ON` control starts or stops the nine-second page cycle. The cycle pauses on hover or keyboard focus and stops while collapsed, hidden, or outside cockpit mode; live signal data continues refreshing either way. Regional News holds its list to the last 24 hours (`newsWindowHours` in the brief; the client drops anything older or undated even if a server sends it) and shows four distinct states: fresh results with no banner and a `{SOURCE} · LAST 24 H` footer; earlier results kept after a failed refresh under `CACHED · REFRESH FAILED` with the cached age in the footer; `NO NEWS IN THE LAST 24 H` when a source answered with nothing Line truncated
|
||||
- **Cockpit left-panel clearance:** the Cockpit Contact card and peripheral HUD participate in the adaptive left accordion's live obstacle measurements, including live viewport-height changes. Expanding Layers or Authoring keeps the active panel in the available upper-left corridor with internal scrolling; it does not cover the Contact card, lower Cockpit controls, or Cesium credit line. Outside Cockpit the hidden card does not alter the normal corridor.
|
||||
- **Cockpit Context scope:** the 250 km radius applies to the air/sea proximity cohorts. Installation counts come only from the currently loaded viewport and are labeled `CURRENT VIEWPORT ONLY` in the cockpit as well as the normal Context panel; neither surface presents them as a complete 250 km installation survey.
|
||||
- **Cockpit camera anchor:** first-person mode does not write feed-boundary corrections directly into the camera. A cockpit-only inertial anchor advances from the selected aircraft's displayed course and speed, then converges toward the authoritative delayed track with correction capped below forward motion. The displayed kinematics are derived from the same consecutive fix segment as the rendered position, with raw feed speed/course used only as fallback; a transient zero/missing feed speed therefore cannot freeze a visibly moving aircraft after layer enable or a map/cockpit handoff. Rendered altitude continues to come from that interpolated track position. Late ADS-B fixes and short render stalls can remove drift without accelerating or reversing the view. Camera placement runs before scene update/culling at a bounded 20 Hz so a moving cockpit does not force Photoreal 3D Tiles to retraverse on every display frame; textual instruments update at 10 Hz and context/layout work at 4 Hz. Every far Cockpit contact pip shares one stable Cesium texture-atlas entry and skips unused screen-projected course calculations, while only in-range 2D aircraft silhouettes pay the screen-projected rotation cost; ambient glTF collections are hidden/retained rather than synchronously destroyed at cockpit entry, and context rails lay out only on explicit content/state changes and viewport resize. The deliberate 15/30-second layer interpolation delays and per-Cesium-frame position caches remain unchanged.
|
||||
- **Cockpit route, vision, and view controls:** visible on-screen `COCKPIT`, `RESET`, and `EXIT COCKPIT` controls are the way in and out; Cockpit claims no `C` shortcut, so `C` keeps toggling CCTV, also inside a first-person view. RESET uses the same canonical globe route as the map and voice actions, exits Cockpit, and releases its camera ownership rather than exposing the hidden map-style top action. When the tracked commercial flight has a plausible ADSBDB route, the top of the right briefing rail shows a compact `FROM → TO` airport strip and the visor shows a centered estimated-destination chevron with its relative bearing; its destination label rounds to whole degrees in 000–359, wrapping rounded north to 000° while the chevron continues to use the relative bearing independently of label rounding; absent or implausible route data hides the strip and cue rather than guessing. The cockpit-local vision control is an interactive `PREV / CURRENT / NEXT` carousel over `NORMAL`, `CRT`, `NVG`, `FLIR`, `ANIME`, and `NOIR`; its previous/next actions wrap, and activating the current value advances to the next style. Cockpit enters on the active map preset, so a Cyber FLIR map opens Cockpit on FLIR while Normal remains a distinct option instead of producing a second FLIR entry. Cockpit choices temporarily activate the existing Cesium post-process stages, while exiting Cockpit through either EXIT or RESET restores the pre-entry map style. The regional-news page uses a free Google News RSS locality query for the last day (`when:1d`) first, with the existing GDELT query (24 h timespan) retained only as a fail-soft fallback; both keep only articles published in the last 24 hours, newest first; linked headlines remain reporting, not verified incidents or risk intelligence.
|
||||
- **Cockpit route, vision, and view controls:** visible on-screen `COCKPIT`, `RESET`, and `EXIT COCKPIT` controls are the way in and out; Cockpit claims no `C` shortcut, so `C` keeps toggling CCTV, also inside a first-person view. RESET uses the same canonical globe route as the map and voice actions, exits Cockpit, and releases its camera ownership rather than exposing the hidden map-style top action. When the tracked commercial flight has a plausible ADSBDB route, the top of the right briefing rail shows a compact `FROM → TO` airport strip and the visor shows a centered estimated-destination chevron with its relative bearing; its destination label rounds to whole degrees in 000–359, wrapping rounded north to 000° while the chevron continues to use the relative bearing independently of label rounding; absent or implausible route data hides the strip and cue rather than guessing. The cockpit-local vision control is an interactive `PREV / CURRENT / NEXT` carousel over `NORMAL`, `CRT`, `NVG`, `FLIR`, `ANIME`, and `NOIR`; its previous/next actions wrap, and activating the current value advances to the next style. Cockpit enters on the active map preset, so a FLIR map opens Cockpit on FLIR while Normal remains a distinct option instead of producing a second FLIR entry. Cockpit choices temporarily activate the existing Cesium post-process stages, while exiting Cockpit through either EXIT or RESET restores the pre-entry map style. The regional-news page uses a free Google News RSS locality query for the last day (`when:1d`) first, with the existing GDELT query (24 h timespan) retained only as a fail-soft fallback; both keep only articles published in the last 24 hours, newest first; linked headlines remain reporting, not verified incidents or risk intelligence.
|
||||
- Cockpit wind-direction labels wrap after rounding to whole degrees, so a direction of 359.5° displays as `N · 0°` rather than `N · 360°`.
|
||||
- The transit, ALPR, vessel, CCTV, Local ADS-B, flight and military context, awareness, Cockpit and Street Level heading readouts, and the query tools' vessel `course_deg` and `heading_deg`, aircraft `course_deg`, transit `bearing_deg`, camera `heading_deg` and satellite `rise_azimuth_deg` and `azimuth_deg`, round through `roundHeadingDegrees` in `src/data/headingDegrees.js` (whole degrees 0–359, `null` when not finite, so each caller keeps its own placeholder); `normalizeHeading` lives there too and `cockpitMath.js` re-exports it. The Cockpit's `TRACK ACQUIRED` signal uses `formatHeadingReadout`, so a 359.6° track reads `COURSE 000°`.
|
||||
- **Cockpit missing observations:** missing local weather observations remain unknown rather than being converted to zero or clear skies, in the briefing and in the cloud effects; a missing temperature drops the whole local weather record, including its wind and condition.
|
||||
@@ -9249,7 +9558,7 @@ when their footprints touch or contain one another, never across a seam toleranc
|
||||
outside this change.
|
||||
- `scripts/qa-form-fields.mjs` exercises native selections, number validity,
|
||||
calibration commit/cancel and stale-camera/disposal guards against an installed
|
||||
controller with fixture ports, plus default/Cyber and narrow translated layouts.
|
||||
controller with fixture ports, plus default and narrow translated layouts.
|
||||
|
||||
## Docker health reporting
|
||||
|
||||
|
||||
@@ -28,7 +28,12 @@ own `.d.ts`:
|
||||
- `gods-eye-view/render/recession`: how a set that recedes shrinks and
|
||||
fades its items toward the limb;
|
||||
- `gods-eye-view/render/windStreamlines`: the wind field's streamlines;
|
||||
- `gods-eye-view/geo/screenCluster`: screen-space clustering.
|
||||
- `gods-eye-view/geo/screenCluster`: screen-space clustering;
|
||||
- `gods-eye-view/fleet`: fleet contacts as the Flights and Vessels layers
|
||||
draw them: the fleet model set and its loader, which model and size an
|
||||
aircraft or a vessel takes, the distances a contact's icon hands over to
|
||||
its model at, how a model is lit, tinted and posed, and the vessel hull
|
||||
sprites.
|
||||
|
||||
`src/render/neutralExports.test.mjs` checks that each is declared, that its
|
||||
names match what it exports, that it type-checks under strict TypeScript and
|
||||
|
||||
@@ -134,7 +134,7 @@ probability of about 255 in 256 (many of them already fail as base64url).
|
||||
| 13 | thing | LEN | none | sub-message, see thing views |
|
||||
| 14 | `style` | enum | `normal` | normal, retro, surveillance, thermal, anime, noir, snow (retired) |
|
||||
| 15 | `mapStack` | enum | `photoreal` | photoreal, bing-aerial, bing-labels, esri-imagery, osm |
|
||||
| 16 | `hudVariant` | enum | style | tactical, operator (retired), minimal, cyber |
|
||||
| 16 | `hudVariant` | enum | style | tactical, operator (retired), minimal, cyber (Tactical + Sonar) |
|
||||
| 17 | `bloomIntensity` | uint | style | |
|
||||
| 18 | `bloomVersion` | uint | 2 | |
|
||||
| 19 | `sharpenIntensity` | uint | style | |
|
||||
@@ -282,6 +282,7 @@ reserved: a decoder ignores that entry, as for collapsed 0.
|
||||
| 8 | `global-context-panel` | `g` | collapsed |
|
||||
| 9 | `pp-toggles` | `p` | collapsed |
|
||||
| 10 | `param-slider-panel` | `m` | expanded |
|
||||
| 11 | `space-missions-panel` | `n` | collapsed |
|
||||
|
||||
### Style parameters (field 27)
|
||||
|
||||
|
||||
@@ -92,8 +92,7 @@ a functional component would not render again.
|
||||
|
||||
Controls share one skin, so every panel reads the same. Every scrolling
|
||||
surface carries the kit's `.ui-scroll`, which draws the thin
|
||||
themed scrollbar from `--scroll-thumb` and `--scroll-track`; the Cyber theme
|
||||
sets those two tokens, and Cockpit's HUD windows keep their accent tint. A
|
||||
themed scrollbar from `--scroll-thumb` and `--scroll-track`, and Cockpit's HUD windows keep their accent tint. A
|
||||
surface without it would draw the platform's light scrollbar, because the
|
||||
page declares no dark `color-scheme`. Selects and number fields are
|
||||
`.gev-field`, which draws its own chevron in place of the platform's arrow
|
||||
@@ -338,8 +337,8 @@ a feature supplying only its accent.
|
||||
records surface by surface; [Building UI](../CONTRIBUTING.md#building-ui)
|
||||
now requires the pattern for new UI. The page-level markup tests read
|
||||
`renderApplicationHtml()`, the real views rendered on the server, and new
|
||||
tests mount components; three tests still read a `.vue` file's source
|
||||
(`cyberTheme`, `panelStorageDocs`, `geoFileImport`). The views translate with `t()`
|
||||
tests mount components; two tests still read a `.vue` file's source
|
||||
(`panelStorageDocs`, `geoFileImport`). The views translate with `t()`
|
||||
while rendering, and vue-i18n holds the locale they read; the attribute
|
||||
translation pass is left for static page markup (the loading screen and a
|
||||
host's own markup). An explicit API for hosts to register panels and rail items is
|
||||
@@ -361,7 +360,7 @@ a feature supplying only its accent.
|
||||
- Panels lifted out of a view keep its verbatim markup in
|
||||
`src/ui/views/panels/`, which Prettier leaves alone like the views.
|
||||
- Visual parity: before/after screenshots of every panel at desktop and phone
|
||||
widths, in the default and Cyber themes, with the rail as the only expected
|
||||
widths, in the default theme, with the rail as the only expected
|
||||
difference.
|
||||
- Browser QA: the selector-based `scripts/qa-*.mjs` suites keep passing.
|
||||
- `npm run format:check`, `npm run check:boundaries`, `npm run i18n` and
|
||||
|
||||
+9
-11
@@ -1,9 +1,8 @@
|
||||
# Panel surface contract
|
||||
|
||||
`src/ui/styles/panel-surfaces.css` supplies an opt-in visual surface for new
|
||||
panels. It uses the application's default color, font, border and radius tokens;
|
||||
Cyber supplies its existing red/slate palette, monospace typography and shaped
|
||||
frame. This is CSS shared by the existing panel system, not a panel registry or
|
||||
panels. It uses the application's default color, font, border and radius tokens.
|
||||
This is CSS shared by the existing panel system, not a panel registry or
|
||||
a controller. A panel ID does not need a new theme selector.
|
||||
|
||||
## Markup
|
||||
@@ -57,13 +56,12 @@ fit when those contents should instead scroll.
|
||||
| Mount | Shared contract | Owner responsibilities |
|
||||
| ------------------------------------- | --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Direct child of `#left-panel-stack` | An owner with a direct `[data-panel-surface]` child receives relative positioning and allocated height; inner surface/body skin | Add the wrapper shown above, use the existing layout/disclosure owners, and retain left-rail focus/auto-collapse rules. |
|
||||
| Direct child of `#right-context-rail` | The same hooks with right-rail allocation and intrinsic measurement | Keep `data-rail-scroller` on the body so measurement preserves its scroll position. Respect Cyber's one-expanded-panel policy. |
|
||||
| Direct child of `#right-context-rail` | The same hooks with right-rail allocation and intrinsic measurement | Keep `data-rail-scroller` on the body so measurement preserves its scroll position. |
|
||||
| Surface inside `#command-dock` | Surface, controls, popup decoration and inherited dock concealment | Supply geometry, stacking, disclosure, pin behavior if wanted, safe viewport bounds and dismissal. This CSS does not extend the existing Location/Visual Presets tray stack manager to arbitrary panels. |
|
||||
| `dialog[data-panel-surface]` | The same surface/body skin; a closed dialog remains hidden | Set width/max-height, use `showModal()` or `show()` and `close()`, and own labels, initial/return focus and dismissal. Do not put `panel-collapsible` on a dialog. |
|
||||
|
||||
For rails, `--panel-expanded-width` and `--panel-collapsed-width` customize
|
||||
the desired widths within the rail; otherwise Cyber uses its existing left,
|
||||
right and collapsed panel widths. `--left-panel-allocated-height` and
|
||||
the desired widths within the rail. `--left-panel-allocated-height` and
|
||||
`--right-panel-allocated-height` belong
|
||||
to the existing layout owner, not to individual panels. The surface must be
|
||||
the wrapper's first non-glow child because left-rail intrinsic measurement
|
||||
@@ -121,9 +119,9 @@ dismiss open popups/dialogs and restore focus before removing a dynamic panel.
|
||||
|
||||
## Decoration, popups and visibility
|
||||
|
||||
The shared surface reserves `::before` for its non-interactive background. The
|
||||
Cyber frame clips this pseudo-element only; the surface stays unclipped with
|
||||
visible overflow. This follows the existing Display and Global Context pattern.
|
||||
The shared surface reserves `::before` for its non-interactive background; the
|
||||
surface stays unclipped with visible overflow. This follows the existing
|
||||
Display and Global Context pattern.
|
||||
Putting the shape on an interactive ancestor clips all descendant popups even
|
||||
if their `z-index` is high. A scrolling body also clips descendants by design,
|
||||
so outward popups must be siblings of the body, or use an explicitly owned
|
||||
@@ -148,8 +146,8 @@ visible.
|
||||
|
||||
## Check an addition
|
||||
|
||||
Use the real application with the default and Cyber themes. Check open,
|
||||
collapsed, hidden, disabled/error, theme round trips, clean UI/recording and
|
||||
Use the real application with the Tactical and Minimal HUD layouts. Check open,
|
||||
collapsed, hidden, disabled/error, layout round trips, clean UI/recording and
|
||||
the intended Cockpit behavior. Exercise keyboard focus, Escape, pointer input,
|
||||
the last scrolling item, resize without reload and any pin/unpin controls.
|
||||
For an outward popup, test visible pixels and pointer hit-testing outside the
|
||||
|
||||
@@ -65,7 +65,6 @@ The `many` form is the `other` text with «de» after the number: «{count} de c
|
||||
| detection overlay | superposición de detección |
|
||||
| pin (Draw tool) | marcador |
|
||||
| Bloom / Glow (visual effect) | resplandor |
|
||||
| Cyber (HUD layout, effect) | Ciber |
|
||||
| heading, course / altitude / ground speed | rumbo / altitud / velocidad respecto al suelo (short: VEL. SUELO) |
|
||||
| HDG / BRG / CRS / FOV / DEST / SPD / RANGE | HDG / BRG / CRS / FOV / DEST / SPD / RANGE (unchanged) |
|
||||
| PREV / NEXT | ANT. / SIG. |
|
||||
|
||||
@@ -82,7 +82,6 @@ The `many` form is the `other` text with « de » (« d' » before a vowel) afte
|
||||
| Recent Imagery / box | imagerie récente / zone |
|
||||
| Daily overview / overview (Recent Imagery VIIRS product) | vue quotidienne (one name for the product, not « vue d'ensemble ») |
|
||||
| pin (Draw tool) / pin (Recent Imagery) | épingle / épingler |
|
||||
| Cyber (HUD layout, effect) | Cyber |
|
||||
| heading / course (ground track) / altitude / ground speed | cap / route / altitude / vitesse sol |
|
||||
| HDG / BRG / CRS / FOV / DEST / SPD / ALT | unchanged |
|
||||
| RANGE / PITCH / HGT (CCTV calibration chips) | PORTÉE / INCL. / HAUT. |
|
||||
|
||||
@@ -82,7 +82,7 @@ The `many` form is the `other` text with «di» after the number when a noun fol
|
||||
| briefing / panel / dock | briefing / pannello / dock |
|
||||
| cockpit | cockpit |
|
||||
| preset / visual preset | preset / preset visivo |
|
||||
| Tactical / Minimal / Cyber | Tattico / Minimale / Cyber |
|
||||
| Tactical / Minimal | Tattico / Minimale |
|
||||
| Scope (circular viewport mask) / keyhole | scope / foro |
|
||||
| feather / fade | sfumatura / dissolvenza |
|
||||
| detection overlay | overlay di rilevamento |
|
||||
|
||||
@@ -61,7 +61,7 @@ Translation source: abiyeenzo (#913).
|
||||
| scene / shot | シーン / ショット |
|
||||
| briefing / panel / dock | ブリーフィング / パネル / ドック |
|
||||
| preset / visual preset | プリセット / ビジュアルプリセット |
|
||||
| Tactical / Minimal / Cyber | タクティカル / ミニマル / サイバー |
|
||||
| Tactical / Minimal | タクティカル / ミニマル |
|
||||
| Scope (circular viewport mask) / keyhole | スコープ / キーホール |
|
||||
| Clean UI | クリーンUI |
|
||||
| cockpit | コックピット |
|
||||
|
||||
@@ -91,7 +91,6 @@ The `many` form is the `other` text with «de» after the number: «{count} de c
|
||||
| feather / fade | suavização / esmaecimento |
|
||||
| detection overlay | sobreposição de detecção |
|
||||
| pin (Draw tool) / box (Recent Imagery) | marcador / área |
|
||||
| Cyber (HUD layout, effect) | Ciber |
|
||||
| heading / course / altitude / ground speed | rumo / curso (a ship's course: rumo) / altitude / velocidade solo (VELOC. SOLO) |
|
||||
| map heading / bearing (compass, north up) | orientação (do mapa) |
|
||||
| HDG / BRG / CRS / FOV / DEST / SPD / RANGE | HDG / BRG / CRS / FOV / DEST / SPD / RANGE (unchanged) |
|
||||
|
||||
@@ -43,7 +43,7 @@ Translation sources: abiyeenzo (#914) and EDIT-Aeterna (#979).
|
||||
| briefing / panel / dock | 简报 / 面板 / 停靠栏 |
|
||||
| preset / visual preset | 预设 / 视觉预设 |
|
||||
| Display / HUD layout | 显示 / HUD 布局 |
|
||||
| Tactical / Minimal / Cyber | 战术 / 精简 / 赛博 |
|
||||
| Tactical / Minimal | 战术 / 精简 |
|
||||
| Scope (circular viewport mask) / keyhole | 视域 |
|
||||
| Clean UI | 纯净界面 |
|
||||
| cockpit | 座舱 |
|
||||
|
||||
@@ -350,6 +350,7 @@
|
||||
"./render/weather": "./src/render/weather.js",
|
||||
"./weather/effects": "./src/weatherEffectsMath.js",
|
||||
"./geo/screenCluster": "./src/geo/screenCluster.js",
|
||||
"./fleet": "./src/fleet/index.js",
|
||||
"./layers/wildlife-sightings": "./src/layers/wildlifeSightings/index.js",
|
||||
"./layers/wildlife-sightings/source": "./src/layers/wildlifeSightings/source.js"
|
||||
}
|
||||
|
||||
@@ -20,13 +20,29 @@
|
||||
* request runs at a time, with a pause between requests, and a refusal's
|
||||
* Retry-After is honoured.
|
||||
*
|
||||
* With `--tiles`, the same query between `--min-population` and
|
||||
* `--max-population` (1,000 and 15,000 by default) builds the detail tiles
|
||||
* instead, and writes only to:
|
||||
*
|
||||
* src/data/local_data/wikidata_places/
|
||||
*
|
||||
* replacing that folder's tiles, `index.json` and `files.js` (see
|
||||
* scripts/wikidataPlaceTiles.mjs). The checks that well-known cities are
|
||||
* present apply to the cities pack only.
|
||||
*
|
||||
* Usage:
|
||||
* node scripts/build-wikidata-cities.mjs [--min-population 15000]
|
||||
* node scripts/build-wikidata-cities.mjs --tiles [--min-population 1000] [--max-population 15000]
|
||||
*/
|
||||
|
||||
import { mkdir, writeFile } from 'node:fs/promises';
|
||||
import { mkdir, readdir, readFile, rm, writeFile } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
import {
|
||||
placeTileFiles,
|
||||
withoutCities,
|
||||
withoutNearTwins,
|
||||
} from './wikidataPlaceTiles.mjs';
|
||||
|
||||
const ENDPOINT = 'https://query.wikidata.org/sparql';
|
||||
const USER_AGENT =
|
||||
@@ -37,10 +53,20 @@ const LABEL_BATCH = 400;
|
||||
|
||||
const args = process.argv.slice(2);
|
||||
const flag = (name) =>
|
||||
args.includes(name) ? Number(args[args.indexOf(name) + 1]) : NaN;
|
||||
const minPopulation = flag('--min-population') || 15000;
|
||||
args.includes(name) ? Number(args[args.indexOf(name) + 1]) : undefined;
|
||||
const tilesMode = args.includes('--tiles');
|
||||
const minPopulation = flag('--min-population') ?? (tilesMode ? 1000 : 15000);
|
||||
const maxPopulation =
|
||||
flag('--max-population') ?? (tilesMode ? 15000 : Infinity);
|
||||
if (!(maxPopulation > minPopulation))
|
||||
throw new Error('--max-population must be above --min-population');
|
||||
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
const outDir = path.join(root, 'src/data/local_data/wikidata_cities');
|
||||
const outDir = path.join(
|
||||
root,
|
||||
tilesMode
|
||||
? 'src/data/local_data/wikidata_places'
|
||||
: 'src/data/local_data/wikidata_cities',
|
||||
);
|
||||
|
||||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
const qid = (uri) => uri.slice(uri.lastIndexOf('/') + 1);
|
||||
@@ -222,7 +248,7 @@ const grouped = new Set();
|
||||
const settled = new Set();
|
||||
|
||||
const places = new Map();
|
||||
for (const [low, high] of bands(minPopulation, Infinity)) {
|
||||
for (const [low, high] of bands(minPopulation, maxPopulation)) {
|
||||
console.log(`Population ${low}–${Number.isFinite(high) ? high : '∞'}…`);
|
||||
const rows = await bandRows(low, high);
|
||||
let kept = 0;
|
||||
@@ -434,7 +460,7 @@ if (intruders.length) {
|
||||
`Groupings got in: ${intruders.map(([id, name]) => `${name} (${id})`).join(', ')}`,
|
||||
);
|
||||
}
|
||||
if (missing.length) {
|
||||
if (missing.length && !tilesMode) {
|
||||
throw new Error(
|
||||
`Expected cities are missing: ${missing.map(([id, name]) => `${name} (${id})`).join(', ')}`,
|
||||
);
|
||||
@@ -450,6 +476,40 @@ const meta = {
|
||||
};
|
||||
|
||||
await mkdir(outDir, { recursive: true });
|
||||
if (tilesMode) {
|
||||
// Places the cities pack already has stay out of the tiles: an item with
|
||||
// one stated population under the cut-off and another over it is in both
|
||||
// query ranges. Build the cities pack first.
|
||||
const citiesFile = path.join(
|
||||
root,
|
||||
'src/data/local_data/wikidata_cities/cities.json',
|
||||
);
|
||||
const cityIds = JSON.parse(await readFile(citiesFile, 'utf8')).rows.map(
|
||||
(row) => row[5],
|
||||
);
|
||||
const outsideCities = withoutCities(rows, cityIds);
|
||||
console.log(
|
||||
`${rows.length - outsideCities.length} places left to the cities pack`,
|
||||
);
|
||||
// One place listed twice nearby under one name keeps its larger listing.
|
||||
const tileRows = withoutNearTwins(outsideCities);
|
||||
console.log(`${outsideCities.length - tileRows.length} near twins left out`);
|
||||
const files = placeTileFiles(tileRows, {
|
||||
...meta,
|
||||
count: tileRows.length,
|
||||
maxPopulation,
|
||||
});
|
||||
// Tiles from an earlier build that this one has no rows for go.
|
||||
for (const name of await readdir(outDir))
|
||||
if (/^-?\d+_-?\d+\.json$/.test(name) && !files.has(name))
|
||||
await rm(path.join(outDir, name));
|
||||
for (const [name, text] of files)
|
||||
await writeFile(path.join(outDir, name), text);
|
||||
console.log(
|
||||
`Wrote ${tileRows.length} places in ${files.size - 2} tiles to ${path.relative(root, outDir)}`,
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
const file = path.join(outDir, 'cities.json');
|
||||
await writeFile(file, `${JSON.stringify({ meta, rows })}\n`);
|
||||
console.log(`Wrote ${rows.length} places to ${path.relative(root, file)}`);
|
||||
@@ -227,6 +227,7 @@
|
||||
"src/ui/panelMeasurement.js",
|
||||
"src/ui/panelRailGeometry.js",
|
||||
"src/ui/panelRails.test.mjs",
|
||||
"src/ui/hudSonarStyle.test.mjs",
|
||||
"src/panelStackLayout.js",
|
||||
"src/ui/applicationShortcuts.js",
|
||||
"src/ui/styleParameters.js",
|
||||
@@ -296,6 +297,9 @@
|
||||
"src/ui/contextControls.js",
|
||||
"src/ui/contextControls.test.mjs",
|
||||
"src/ui/contextLayerChanges.js",
|
||||
"src/ui/spaceMissionsControls.js",
|
||||
"src/ui/spaceMissionsControls.test.mjs",
|
||||
"src/ui/stores/spaceMissions.js",
|
||||
"src/ui/contextPresentation.js",
|
||||
"src/ui/contextSession.js",
|
||||
"src/ui/contextSubscriptions.js",
|
||||
@@ -520,6 +524,10 @@
|
||||
"src/layers/launches/source.test.mjs",
|
||||
"src/layers/launches/ingestion.test.mjs",
|
||||
"src/layers/launches/failedEntry.test.mjs",
|
||||
"src/layers/launches/labelClick.test.mjs",
|
||||
"src/layers/launches/missionCycler.test.mjs",
|
||||
"src/layers/launches/satelliteIntents.js",
|
||||
"src/layers/launches/satelliteIntents.test.mjs",
|
||||
"src/layers/installations/lifecycle.js",
|
||||
"src/layers/installations/viewport.js",
|
||||
"src/layers/installations/controls.js",
|
||||
@@ -652,6 +660,7 @@
|
||||
"src/layers/alpr/model.js",
|
||||
"src/layers/alpr/policy.js",
|
||||
"src/layers/alpr/presentation.js",
|
||||
"src/layers/alpr/presentation.test.mjs",
|
||||
"src/layers/alpr/visuals.js",
|
||||
"src/layers/alpr/overlay.js",
|
||||
"src/layers/alpr/overlay.test.mjs",
|
||||
@@ -1476,7 +1485,7 @@
|
||||
"src/overlays/worldOverlayDraw.test.mjs",
|
||||
"src/sources/rateLimit.js",
|
||||
"src/ui/layerNames.js",
|
||||
"src/ui/styles/cyber.css",
|
||||
"src/ui/styles/sonar.css",
|
||||
"src/voice/layerManifest.js",
|
||||
"src/worldFocus.js",
|
||||
"src/worldFocus.test.mjs",
|
||||
@@ -1583,5 +1592,15 @@
|
||||
"src/ui/layerFinder.test.mjs",
|
||||
"src/data/wikidataCities.js",
|
||||
"src/data/wikidataCities.test.mjs",
|
||||
"scripts/build-wikidata-cities.mjs"
|
||||
"scripts/build-wikidata-cities.mjs",
|
||||
"src/search/placeSuggestions.test.mjs",
|
||||
"scripts/wikidataPlaceTiles.mjs",
|
||||
"src/tooling/wikidataPlaceTiles.test.mjs",
|
||||
"src/ui/omnibarIntent.test.mjs",
|
||||
"src/ui/omnibarRows.test.mjs",
|
||||
"src/ui/styles/omnibar-dock.css",
|
||||
"src/ui/styles/guide.css",
|
||||
"src/ui/commandDock.test.mjs",
|
||||
"src/layers/firms/selection.test.mjs",
|
||||
"src/layers/vessels/selection.test.mjs"
|
||||
]
|
||||
@@ -130,6 +130,7 @@
|
||||
"src/ui/radioTunerModel.js",
|
||||
"src/ui/views/panels/MissionDetail.vue",
|
||||
"src/ui/views/panels/MissionRoster.vue",
|
||||
"src/ui/views/panels/SpaceMissionsPanel.vue",
|
||||
"src/ui/views/panels/AwarenessPanel.vue",
|
||||
"src/ui/views/panels/AwarenessNames.vue",
|
||||
"src/ui/views/DisplayControlsView.vue",
|
||||
@@ -163,6 +164,7 @@
|
||||
"src/ui/stores/cctv.js",
|
||||
"src/ui/stores/radio.js",
|
||||
"src/ui/stores/context.js",
|
||||
"src/ui/stores/spaceMissions.js",
|
||||
"src/ui/stores/cockpit.js",
|
||||
"src/ui/stores/locale.js",
|
||||
"src/ui/stores/providerSettings.js",
|
||||
@@ -287,7 +289,25 @@
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/fleetModels.js",
|
||||
"src/render/modelParts.js",
|
||||
"src/ui/views/panels/AircraftModelHero.vue"
|
||||
"src/ui/views/panels/AircraftModelHero.vue",
|
||||
"src/data/retryableLoad.js",
|
||||
"src/data/local_data/wikidata_places/files.js",
|
||||
"src/ui/views/panels/Omnibar.vue",
|
||||
"src/exclusiveSurfaces.js",
|
||||
"src/geoDistance.js",
|
||||
"src/ui/omnibarGuide.js",
|
||||
"src/cityPois.js",
|
||||
"src/search/photonSetting.js",
|
||||
"src/sources/requestDeadline.js",
|
||||
"src/ui/omnibarEnter.js",
|
||||
"src/ui/omnibarIntent.js",
|
||||
"src/data/placeNames.js",
|
||||
"src/search/plusCode.js",
|
||||
"src/keylessGeocoder.js",
|
||||
"src/ui/omnibarRows.js",
|
||||
"src/search/gridReference.js",
|
||||
"src/search/coordinateParser.js",
|
||||
"src/search/placeSuggestions.js"
|
||||
],
|
||||
"external": ["vue", "pinia", "vue-i18n"]
|
||||
},
|
||||
@@ -818,7 +838,6 @@
|
||||
"exports": ["./ui/layout"],
|
||||
"modules": [
|
||||
"src/ui/panelRails.js",
|
||||
"src/ui/displayPanelScroll.js",
|
||||
"src/ui/leftPanelRail.js",
|
||||
"src/ui/rightPanelRail.js",
|
||||
"src/ui/panelMeasurement.js",
|
||||
@@ -1193,7 +1212,6 @@
|
||||
"src/ui/cockpitController.js",
|
||||
"src/data/followed.js",
|
||||
"src/ui/cockpitDisplayPortal.js",
|
||||
"src/ui/displayPanelScroll.js",
|
||||
"src/ui/cockpitInput.js",
|
||||
"src/ui/cockpitInstruments.js",
|
||||
"src/cockpitSubjectProviders.js",
|
||||
@@ -1416,7 +1434,6 @@
|
||||
"src/ui/cockpitContext.js",
|
||||
"src/ui/cockpitController.js",
|
||||
"src/ui/cockpitDisplayPortal.js",
|
||||
"src/ui/displayPanelScroll.js",
|
||||
"src/ui/cockpitInput.js",
|
||||
"src/ui/cockpitInstruments.js",
|
||||
"src/cockpitSubjectProviders.js",
|
||||
@@ -1434,6 +1451,7 @@
|
||||
"src/ui/contextSession.js",
|
||||
"src/ui/contextSubscriptions.js",
|
||||
"src/ui/contextTransactions.js",
|
||||
"src/ui/spaceMissionsControls.js",
|
||||
"src/ui/displayControls.js",
|
||||
"src/ui/effects.js",
|
||||
"src/ui/frameRateMonitor.js",
|
||||
@@ -1562,6 +1580,7 @@
|
||||
"src/ui/stores/cctv.js",
|
||||
"src/ui/stores/radio.js",
|
||||
"src/ui/stores/context.js",
|
||||
"src/ui/stores/spaceMissions.js",
|
||||
"src/ui/stores/cockpit.js",
|
||||
"src/ui/stores/locale.js",
|
||||
"src/ui/stores/providerSettings.js",
|
||||
@@ -1655,7 +1674,8 @@
|
||||
"src/ui/entityContextBridge.js",
|
||||
"src/data/trackingClickGesture.js",
|
||||
"src/ui/stores/sceneSharing.js",
|
||||
"src/maps/attribution.js"
|
||||
"src/maps/attribution.js",
|
||||
"src/data/dataCredits.js"
|
||||
],
|
||||
"external": [
|
||||
"cesium",
|
||||
@@ -1888,6 +1908,7 @@
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/fleetModelDraw.js",
|
||||
"src/data/modelPartDrivers.js",
|
||||
"src/data/headingDegrees.js",
|
||||
"src/i18n/marker.js",
|
||||
@@ -2039,6 +2060,7 @@
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/fleetModelDraw.js",
|
||||
"src/data/modelPartDrivers.js",
|
||||
"src/data/headingDegrees.js",
|
||||
"src/i18n/marker.js",
|
||||
@@ -2222,6 +2244,7 @@
|
||||
"src/data/aircraftClass.js",
|
||||
"src/i18n/marker.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/fleetModelDraw.js",
|
||||
"src/data/modelPartDrivers.js",
|
||||
"src/data/aircraftModelLighting.js",
|
||||
"src/data/modelEligibility.js",
|
||||
@@ -2856,6 +2879,7 @@
|
||||
"src/data/entityRecords.js",
|
||||
"src/render/cesium/follow.js",
|
||||
"src/layers/launches/ingestion.js",
|
||||
"src/layers/launches/satelliteIntents.js",
|
||||
"src/layers/launches/launchPad.js",
|
||||
"src/layers/launches/lifecycle.js",
|
||||
"src/layers/launches/model.js",
|
||||
@@ -4118,6 +4142,7 @@
|
||||
"src/render/modelParts.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/fleetModelDraw.js",
|
||||
"src/app/layers/fleetModels.js",
|
||||
"src/sources/adsbFields.js",
|
||||
"src/data/headingDegrees.js",
|
||||
@@ -4514,6 +4539,7 @@
|
||||
"src/layers/launches/controls.js",
|
||||
"src/layers/launches/index.js",
|
||||
"src/layers/launches/ingestion.js",
|
||||
"src/layers/launches/satelliteIntents.js",
|
||||
"src/layers/launches/launchPad.js",
|
||||
"src/layers/launches/lifecycle.js",
|
||||
"src/layers/launches/model.js",
|
||||
@@ -4727,7 +4753,6 @@
|
||||
"src/ui/cockpitContext.js",
|
||||
"src/ui/cockpitController.js",
|
||||
"src/ui/cockpitDisplayPortal.js",
|
||||
"src/ui/displayPanelScroll.js",
|
||||
"src/ui/cockpitInput.js",
|
||||
"src/ui/cockpitInstruments.js",
|
||||
"src/cockpitSubjectProviders.js",
|
||||
@@ -4746,6 +4771,7 @@
|
||||
"src/ui/contextSession.js",
|
||||
"src/ui/contextSubscriptions.js",
|
||||
"src/ui/contextTransactions.js",
|
||||
"src/ui/spaceMissionsControls.js",
|
||||
"src/ui/displayControls.js",
|
||||
"src/ui/effects.js",
|
||||
"src/ui/frameRateMonitor.js",
|
||||
@@ -5308,6 +5334,7 @@
|
||||
"src/ui/stores/cctv.js",
|
||||
"src/ui/stores/radio.js",
|
||||
"src/ui/stores/context.js",
|
||||
"src/ui/stores/spaceMissions.js",
|
||||
"src/ui/stores/cockpit.js",
|
||||
"src/ui/stores/locale.js",
|
||||
"src/ui/stores/providerSettings.js",
|
||||
@@ -5519,6 +5546,7 @@
|
||||
"src/data/fleetModels.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/fleetModelDraw.js",
|
||||
"src/app/layers/fleetModels.js",
|
||||
"src/data/feedState.js",
|
||||
"src/loadingFeedback.js",
|
||||
@@ -5795,6 +5823,7 @@
|
||||
"src/layers/launches/controls.js",
|
||||
"src/layers/launches/index.js",
|
||||
"src/layers/launches/ingestion.js",
|
||||
"src/layers/launches/satelliteIntents.js",
|
||||
"src/layers/launches/launchPad.js",
|
||||
"src/layers/launches/lifecycle.js",
|
||||
"src/layers/launches/model.js",
|
||||
@@ -6674,7 +6703,6 @@
|
||||
"ui-panel-chrome": {
|
||||
"exports": ["./ui/panel-chrome"],
|
||||
"modules": [
|
||||
"src/ui/displayPanelScroll.js",
|
||||
"src/ui/radioPanelPlacement.js",
|
||||
"src/panelStackLayout.js",
|
||||
"src/ui/leftPanelRail.js",
|
||||
@@ -7260,6 +7288,7 @@
|
||||
"src/data/aircraftClass.js",
|
||||
"src/i18n/marker.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/fleetModelDraw.js",
|
||||
"src/data/modelPartDrivers.js",
|
||||
"src/data/modelEligibility.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
@@ -7413,6 +7442,7 @@
|
||||
"src/render/modelParts.js",
|
||||
"src/data/vesselTypes.js",
|
||||
"src/data/fleetModelInstances.js",
|
||||
"src/data/fleetModelDraw.js",
|
||||
"src/data/modelPartDrivers.js",
|
||||
"src/data/aircraftClass.js",
|
||||
"src/data/aircraftModelLighting.js",
|
||||
@@ -8190,6 +8220,28 @@
|
||||
],
|
||||
"external": []
|
||||
},
|
||||
"fleet": {
|
||||
"exports": ["./fleet"],
|
||||
"modules": [
|
||||
"src/fleet/index.js",
|
||||
"src/data/fleetModels.js",
|
||||
"src/data/aircraftClass.js",
|
||||
"src/i18n/marker.js",
|
||||
"src/render/modelParts.js",
|
||||
"src/data/fleetTrailAnchors.js",
|
||||
"src/data/vesselTypes.js",
|
||||
"src/layers/flights/modelSpec.js",
|
||||
"src/layers/flights/policy.js",
|
||||
"src/data/aircraftEmergency.js",
|
||||
"src/render/color.js",
|
||||
"src/data/aircraftModelLighting.js",
|
||||
"src/data/modelPartDrivers.js",
|
||||
"src/data/modelEligibility.js",
|
||||
"src/data/fleetModelDraw.js",
|
||||
"src/data/vesselSprites.js"
|
||||
],
|
||||
"external": []
|
||||
},
|
||||
"sky": {
|
||||
"exports": ["./sky"],
|
||||
"modules": [
|
||||
|
||||
+108
-382
@@ -193,41 +193,74 @@ try {
|
||||
});
|
||||
const contactMissionHandoff = await page.evaluate(async () => {
|
||||
const { styleManager, dataManager } = window.__godsEyeView;
|
||||
// Launch Library is not contacted: the layer's own work is stubbed so the
|
||||
// check covers only how Space Missions sits beside Context.
|
||||
const stubMissions = (rocketEntry) => {
|
||||
const original = {
|
||||
initialized: rocketEntry.initialized,
|
||||
lifecycleState: rocketEntry.lifecycleState,
|
||||
init: rocketEntry.module.init,
|
||||
enable: rocketEntry.module.enable,
|
||||
update: rocketEntry.module.update,
|
||||
disable: rocketEntry.module.disable,
|
||||
};
|
||||
rocketEntry.initialized = true;
|
||||
rocketEntry.module.init = async () => true;
|
||||
rocketEntry.module.enable = async () => true;
|
||||
rocketEntry.module.update = async () => true;
|
||||
rocketEntry.module.disable = async () => true;
|
||||
return () => {
|
||||
rocketEntry.initialized = original.initialized;
|
||||
rocketEntry.lifecycleState = original.lifecycleState;
|
||||
rocketEntry.module.init = original.init;
|
||||
rocketEntry.module.enable = original.enable;
|
||||
rocketEntry.module.update = original.update;
|
||||
rocketEntry.module.disable = original.disable;
|
||||
};
|
||||
};
|
||||
const originalShowToast = styleManager._showToast;
|
||||
const toasts = [];
|
||||
styleManager._showToast = (message) => { toasts.push(String(message)); };
|
||||
const restoreMissions = stubMissions(dataManager.layers.get('rocket-launches'));
|
||||
try {
|
||||
if (styleManager._contextControls._contextMode) await styleManager._contextControls._selectContextMode(null);
|
||||
const contactsResult = await styleManager._contextControls._selectContextMode('flights');
|
||||
const missionResult = await styleManager._contextControls._selectContextMode('space-missions');
|
||||
const switched = {
|
||||
const missionResult = await dataManager.setEnabled('rocket-launches', true, { origin: 'user' });
|
||||
await styleManager._waitForContextLayerSettlement();
|
||||
const together = {
|
||||
contactsResult,
|
||||
missionResult,
|
||||
mode: styleManager._contextControls._contextMode,
|
||||
missionsEnabled: dataManager.isEnabled('rocket-launches'),
|
||||
toasts: [...toasts],
|
||||
};
|
||||
const missionOff = await dataManager.setEnabled('rocket-launches', false, { origin: 'user' });
|
||||
await styleManager._waitForContextLayerSettlement();
|
||||
const modeAfterMissions = styleManager._contextControls._contextMode;
|
||||
const exitResult = await styleManager._contextControls._selectContextMode(null);
|
||||
return {
|
||||
...switched,
|
||||
...together,
|
||||
missionOff,
|
||||
modeAfterMissions,
|
||||
exitResult,
|
||||
modeAfterExit: styleManager._contextControls._contextMode,
|
||||
missionsOffAfterExit: !dataManager.isEffectivelyEnabled('rocket-launches'),
|
||||
};
|
||||
} finally {
|
||||
restoreMissions();
|
||||
styleManager._showToast = originalShowToast;
|
||||
}
|
||||
});
|
||||
check(
|
||||
'Contacts hands off to Space Missions on the first request without a failure toast',
|
||||
'Space Missions runs beside Contacts, and switching it off leaves Contacts on',
|
||||
contactMissionHandoff.contactsResult === true
|
||||
&& contactMissionHandoff.missionResult === true
|
||||
&& contactMissionHandoff.mode === 'space-missions'
|
||||
&& contactMissionHandoff.mode === 'flights'
|
||||
&& contactMissionHandoff.missionsEnabled
|
||||
&& contactMissionHandoff.toasts?.length === 0
|
||||
&& contactMissionHandoff.missionOff === true
|
||||
&& contactMissionHandoff.modeAfterMissions === 'flights'
|
||||
&& contactMissionHandoff.exitResult === true
|
||||
&& contactMissionHandoff.modeAfterExit === null
|
||||
&& contactMissionHandoff.missionsOffAfterExit,
|
||||
&& contactMissionHandoff.modeAfterExit === null,
|
||||
JSON.stringify(contactMissionHandoff),
|
||||
);
|
||||
const cancelledMissionEntry = await page.evaluate(async () => {
|
||||
@@ -330,7 +363,7 @@ try {
|
||||
}
|
||||
});
|
||||
check(
|
||||
'cancelled direct Space Missions entry restores its exact isolated sibling state',
|
||||
'a cancelled Space Missions start leaves its sibling layer on and opens no Context session',
|
||||
cancelledMissionEntry.exercised
|
||||
&& cancelledMissionEntry.transitionResult === false
|
||||
&& !cancelledMissionEntry.timedOut
|
||||
@@ -341,214 +374,45 @@ try {
|
||||
JSON.stringify(cancelledMissionEntry),
|
||||
);
|
||||
check(
|
||||
'successful Space Missions cancellation rollback stays silent',
|
||||
'a cancelled Space Missions start stays silent',
|
||||
cancelledMissionEntry.exercised && cancelledMissionEntry.toasts?.length === 0,
|
||||
JSON.stringify(cancelledMissionEntry.toasts || []),
|
||||
);
|
||||
const replacementMissionEntry = await page.evaluate(async () => {
|
||||
const styleManager = window.__godsEyeView.styleManager;
|
||||
const dataManager = window.__godsEyeView.dataManager;
|
||||
const rocketEntry = dataManager.layers.get('rocket-launches');
|
||||
if (!rocketEntry || dataManager.isEffectivelyEnabled('rocket-launches')) {
|
||||
return { exercised: false, reason: 'Space Missions was not in a clean OFF state' };
|
||||
}
|
||||
const siblingId = 'qa-cockpit-replacement-sibling';
|
||||
window.__gevQaRegisterLayer(dataManager, {
|
||||
id: siblingId,
|
||||
name: 'QA replacement sibling',
|
||||
icon: 'science',
|
||||
source: 'QA',
|
||||
updateInterval: -1,
|
||||
async init() { return true; },
|
||||
async enable() { return true; },
|
||||
async update() { return true; },
|
||||
async disable() { return true; },
|
||||
async destroy() {},
|
||||
getStats() { return { count: 1, status: 'live' }; },
|
||||
});
|
||||
await dataManager.setEnabled(siblingId, true, { origin: 'programmatic' });
|
||||
const original = {
|
||||
siblingInitialized: dataManager.layers.get(siblingId)?.initialized,
|
||||
initialized: rocketEntry.initialized,
|
||||
lifecycleState: rocketEntry.lifecycleState,
|
||||
init: rocketEntry.module.init,
|
||||
enable: rocketEntry.module.enable,
|
||||
update: rocketEntry.module.update,
|
||||
disable: rocketEntry.module.disable,
|
||||
showToast: styleManager._showToast,
|
||||
};
|
||||
let firstUpdate = true;
|
||||
let releaseUpdate;
|
||||
let markUpdateStarted;
|
||||
const updateStarted = new Promise((resolve) => { markUpdateStarted = resolve; });
|
||||
const updateGate = new Promise((resolve) => { releaseUpdate = resolve; });
|
||||
const toasts = [];
|
||||
rocketEntry.initialized = true;
|
||||
rocketEntry.module.enable = async () => true;
|
||||
rocketEntry.module.update = async () => {
|
||||
if (!firstUpdate) return true;
|
||||
firstUpdate = false;
|
||||
markUpdateStarted();
|
||||
await updateGate;
|
||||
return true;
|
||||
};
|
||||
rocketEntry.module.disable = async () => true;
|
||||
styleManager._showToast = (message) => { toasts.push(String(message)); };
|
||||
try {
|
||||
const entry = styleManager._contextControls._selectContextMode('space-missions');
|
||||
await updateStarted;
|
||||
const replacement = dataManager.setEnabled('rocket-launches', true, { origin: 'programmatic' });
|
||||
releaseUpdate();
|
||||
const [entryResult, replacementResult] = await Promise.all([entry, replacement]);
|
||||
const committed = {
|
||||
entryResult,
|
||||
replacementResult,
|
||||
mode: styleManager._contextControls._contextMode,
|
||||
entering: styleManager._contextControls._contextModeEntering,
|
||||
snapshotRetained: Boolean(styleManager._contextControls._contextSessionSnapshot),
|
||||
siblingIsolated: !dataManager.isEffectivelyEnabled(siblingId),
|
||||
missionEnabled: dataManager.isEnabled('rocket-launches'),
|
||||
missionEffective: dataManager.isEffectivelyEnabled('rocket-launches'),
|
||||
toasts: [...toasts],
|
||||
};
|
||||
const exitResult = await styleManager._contextControls._selectContextMode(null);
|
||||
return {
|
||||
exercised: true,
|
||||
...committed,
|
||||
exitResult,
|
||||
siblingRestored: dataManager.isEnabled(siblingId),
|
||||
missionRestoredOff: !dataManager.isEffectivelyEnabled('rocket-launches'),
|
||||
};
|
||||
} finally {
|
||||
styleManager._showToast = original.showToast;
|
||||
rocketEntry.module.init = original.init;
|
||||
rocketEntry.module.enable = original.enable;
|
||||
rocketEntry.module.update = original.update;
|
||||
rocketEntry.module.disable = original.disable;
|
||||
rocketEntry.initialized = original.initialized;
|
||||
rocketEntry.lifecycleState = original.lifecycleState;
|
||||
await dataManager.setEnabled(siblingId, false, { origin: 'programmatic' });
|
||||
await window.__gevQaUnregisterLayer(dataManager, siblingId);
|
||||
}
|
||||
});
|
||||
check(
|
||||
'right-rail Space Missions adopts a newer authoritative ON without stale restoration',
|
||||
replacementMissionEntry.exercised
|
||||
&& replacementMissionEntry.entryResult === true
|
||||
&& replacementMissionEntry.replacementResult === true
|
||||
&& replacementMissionEntry.mode === 'space-missions'
|
||||
&& replacementMissionEntry.entering === null
|
||||
&& replacementMissionEntry.snapshotRetained
|
||||
&& replacementMissionEntry.siblingIsolated
|
||||
&& replacementMissionEntry.missionEnabled
|
||||
&& replacementMissionEntry.missionEffective
|
||||
&& replacementMissionEntry.toasts?.length === 0
|
||||
&& replacementMissionEntry.exitResult === true
|
||||
&& replacementMissionEntry.siblingRestored
|
||||
&& replacementMissionEntry.missionRestoredOff,
|
||||
JSON.stringify(replacementMissionEntry),
|
||||
);
|
||||
const supersededMissionEntry = await page.evaluate(async () => {
|
||||
const styleManager = window.__godsEyeView.styleManager;
|
||||
const dataManager = window.__godsEyeView.dataManager;
|
||||
const rocketEntry = dataManager.layers.get('rocket-launches');
|
||||
if (!rocketEntry || dataManager.isEffectivelyEnabled('rocket-launches')) {
|
||||
return { exercised: false, reason: 'Space Missions was not in a clean OFF state' };
|
||||
}
|
||||
const siblingId = 'qa-cockpit-superseded-sibling';
|
||||
window.__gevQaRegisterLayer(dataManager, {
|
||||
id: siblingId,
|
||||
name: 'QA superseded sibling',
|
||||
icon: 'science',
|
||||
source: 'QA',
|
||||
updateInterval: -1,
|
||||
async init() { return true; },
|
||||
async enable() { return true; },
|
||||
async update() { return true; },
|
||||
async disable() { return true; },
|
||||
async destroy() {},
|
||||
getStats() { return { count: 1, status: 'live' }; },
|
||||
});
|
||||
await dataManager.setEnabled(siblingId, true, { origin: 'programmatic' });
|
||||
const original = {
|
||||
initialized: rocketEntry.initialized,
|
||||
lifecycleState: rocketEntry.lifecycleState,
|
||||
init: rocketEntry.module.init,
|
||||
enable: rocketEntry.module.enable,
|
||||
update: rocketEntry.module.update,
|
||||
disable: rocketEntry.module.disable,
|
||||
showToast: styleManager._showToast,
|
||||
};
|
||||
let releaseUpdate;
|
||||
let markUpdateStarted;
|
||||
const updateStarted = new Promise((resolve) => { markUpdateStarted = resolve; });
|
||||
const updateGate = new Promise((resolve) => { releaseUpdate = resolve; });
|
||||
const toasts = [];
|
||||
rocketEntry.initialized = true;
|
||||
rocketEntry.module.enable = async () => true;
|
||||
rocketEntry.module.update = async () => {
|
||||
markUpdateStarted();
|
||||
await updateGate;
|
||||
return true;
|
||||
};
|
||||
rocketEntry.module.disable = async () => true;
|
||||
styleManager._showToast = (message) => { toasts.push(String(message)); };
|
||||
try {
|
||||
const entry = styleManager._runUserFacingContextAction(
|
||||
(notificationToken) => styleManager._contextControls._selectContextMode(
|
||||
'space-missions',
|
||||
{ notificationToken },
|
||||
),
|
||||
'Space Missions could not complete the requested transition; try again',
|
||||
);
|
||||
await updateStarted;
|
||||
const supersedingOff = dataManager.setEnabled('rocket-launches', false, {
|
||||
origin: 'programmatic',
|
||||
});
|
||||
releaseUpdate();
|
||||
const [entryResult, offResult] = await Promise.all([entry, supersedingOff]);
|
||||
return {
|
||||
exercised: true,
|
||||
entryResult,
|
||||
offResult,
|
||||
mode: styleManager._contextControls._contextMode,
|
||||
entering: styleManager._contextControls._contextModeEntering,
|
||||
snapshotRetained: Boolean(styleManager._contextControls._contextSessionSnapshot),
|
||||
siblingRestored: dataManager.isEnabled(siblingId),
|
||||
missionEffective: dataManager.isEffectivelyEnabled('rocket-launches'),
|
||||
toasts,
|
||||
};
|
||||
} finally {
|
||||
styleManager._showToast = original.showToast;
|
||||
rocketEntry.module.init = original.init;
|
||||
rocketEntry.module.enable = original.enable;
|
||||
rocketEntry.module.update = original.update;
|
||||
rocketEntry.module.disable = original.disable;
|
||||
rocketEntry.initialized = original.initialized;
|
||||
rocketEntry.lifecycleState = original.lifecycleState;
|
||||
await dataManager.setEnabled(siblingId, false, { origin: 'programmatic' });
|
||||
await window.__gevQaUnregisterLayer(dataManager, siblingId);
|
||||
}
|
||||
});
|
||||
check(
|
||||
'right-rail Space Missions superseded by OFF restores exactly without a failure toast',
|
||||
supersededMissionEntry.exercised
|
||||
&& supersededMissionEntry.entryResult === null
|
||||
&& supersededMissionEntry.mode === null
|
||||
&& supersededMissionEntry.entering === null
|
||||
&& !supersededMissionEntry.snapshotRetained
|
||||
&& supersededMissionEntry.siblingRestored
|
||||
&& !supersededMissionEntry.missionEffective
|
||||
&& supersededMissionEntry.toasts?.length === 0,
|
||||
JSON.stringify(supersededMissionEntry),
|
||||
);
|
||||
const voiceMissionEntry = await page.evaluate(async () => {
|
||||
const ordinaryMissionLayer = await page.evaluate(async () => {
|
||||
const { dataManager, styleManager } = window.__godsEyeView;
|
||||
const siblingId = '__qa_voice_context_sibling__';
|
||||
const rocketEntry = dataManager.layers.get('rocket-launches');
|
||||
if (!rocketEntry || dataManager.isEffectivelyEnabled('rocket-launches')) {
|
||||
return { exercised: false, reason: 'Space Missions was not in a clean OFF state' };
|
||||
}
|
||||
// Launch Library is not contacted: the layer's own work is stubbed so the
|
||||
// check covers only how Space Missions sits beside Context.
|
||||
const stubMissions = (rocketEntry) => {
|
||||
const original = {
|
||||
initialized: rocketEntry.initialized,
|
||||
lifecycleState: rocketEntry.lifecycleState,
|
||||
init: rocketEntry.module.init,
|
||||
enable: rocketEntry.module.enable,
|
||||
update: rocketEntry.module.update,
|
||||
disable: rocketEntry.module.disable,
|
||||
};
|
||||
rocketEntry.initialized = true;
|
||||
rocketEntry.module.init = async () => true;
|
||||
rocketEntry.module.enable = async () => true;
|
||||
rocketEntry.module.update = async () => true;
|
||||
rocketEntry.module.disable = async () => true;
|
||||
return () => {
|
||||
rocketEntry.initialized = original.initialized;
|
||||
rocketEntry.lifecycleState = original.lifecycleState;
|
||||
rocketEntry.module.init = original.init;
|
||||
rocketEntry.module.enable = original.enable;
|
||||
rocketEntry.module.update = original.update;
|
||||
rocketEntry.module.disable = original.disable;
|
||||
};
|
||||
};
|
||||
const siblingId = '__qa_space_missions_sibling__';
|
||||
window.__gevQaRegisterLayer(dataManager, {
|
||||
id: siblingId,
|
||||
name: 'QA voice Context sibling',
|
||||
name: 'QA Space Missions sibling',
|
||||
icon: 'science',
|
||||
source: 'QA',
|
||||
updateInterval: -1,
|
||||
@@ -559,94 +423,48 @@ try {
|
||||
async destroy() {},
|
||||
getStats() { return { count: 1, status: 'live' }; },
|
||||
});
|
||||
const original = {
|
||||
initialized: rocketEntry.initialized,
|
||||
lifecycleState: rocketEntry.lifecycleState,
|
||||
init: rocketEntry.module.init,
|
||||
enable: rocketEntry.module.enable,
|
||||
update: rocketEntry.module.update,
|
||||
disable: rocketEntry.module.disable,
|
||||
};
|
||||
const siblingLayerEntry = dataManager.layers.get(siblingId);
|
||||
siblingLayerEntry.initialized = true;
|
||||
await dataManager.setEnabled(siblingId, true, { origin: 'programmatic' });
|
||||
rocketEntry.initialized = true;
|
||||
rocketEntry.module.init = async () => true;
|
||||
rocketEntry.module.enable = async () => true;
|
||||
rocketEntry.module.update = async () => true;
|
||||
rocketEntry.module.disable = async () => true;
|
||||
const restoreMissions = stubMissions(rocketEntry);
|
||||
try {
|
||||
const voiceOn = await dataManager.setEnabled('rocket-launches', true, { origin: 'voice' });
|
||||
await new Promise((resolve) => setTimeout(resolve, 80));
|
||||
const voiceState = {
|
||||
voiceOn,
|
||||
mode: styleManager._contextControls._contextMode,
|
||||
entering: styleManager._contextControls._contextModeEntering,
|
||||
snapshotRetained: Boolean(styleManager._contextControls._contextSessionSnapshot),
|
||||
siblingIsolated: !dataManager.isEffectivelyEnabled(siblingId),
|
||||
};
|
||||
const snapshotBeforeOff = [...(styleManager._contextControls._contextSessionSnapshot?.enabledLayerIds || [])];
|
||||
const voiceOff = await dataManager.setEnabled('rocket-launches', false, { origin: 'voice' });
|
||||
const reactionCountAfterOff = styleManager._contextControls._contextLayerReactionPromises.size;
|
||||
await styleManager._waitForContextLayerSettlement();
|
||||
const restoredSiblingEntry = dataManager.layers.get(siblingId);
|
||||
const voiceExit = {
|
||||
voiceOff,
|
||||
snapshotBeforeOff,
|
||||
reactionCountAfterOff,
|
||||
mode: styleManager._contextControls._contextMode,
|
||||
entering: styleManager._contextControls._contextModeEntering,
|
||||
snapshotRetained: Boolean(styleManager._contextControls._contextSessionSnapshot),
|
||||
siblingRestored: dataManager.isEffectivelyEnabled(siblingId),
|
||||
siblingEnabled: restoredSiblingEntry?.enabled,
|
||||
siblingLifecycle: restoredSiblingEntry?.lifecycleState,
|
||||
restoreActive: Boolean(styleManager._contextControls._contextRestoreState),
|
||||
};
|
||||
|
||||
await dataManager.setEnabled('rocket-launches', true, { origin: 'programmatic' });
|
||||
await new Promise((resolve) => setTimeout(resolve, 40));
|
||||
const internalState = {
|
||||
mode: styleManager._contextControls._contextMode,
|
||||
entering: styleManager._contextControls._contextModeEntering,
|
||||
snapshotRetained: Boolean(styleManager._contextControls._contextSessionSnapshot),
|
||||
missionEnabled: dataManager.isEffectivelyEnabled('rocket-launches'),
|
||||
};
|
||||
await dataManager.setEnabled('rocket-launches', false, { origin: 'programmatic' });
|
||||
return { exercised: true, voiceState, voiceExit, internalState };
|
||||
const results = {};
|
||||
for (const origin of ['user', 'voice', 'programmatic']) {
|
||||
const on = await dataManager.setEnabled('rocket-launches', true, { origin });
|
||||
await styleManager._waitForContextLayerSettlement();
|
||||
const during = {
|
||||
on,
|
||||
mode: styleManager._contextControls._contextMode,
|
||||
snapshot: Boolean(styleManager._contextControls._contextSessionSnapshot),
|
||||
siblingOn: dataManager.isEffectivelyEnabled(siblingId),
|
||||
};
|
||||
const off = await dataManager.setEnabled('rocket-launches', false, { origin });
|
||||
await styleManager._waitForContextLayerSettlement();
|
||||
results[origin] = {
|
||||
...during,
|
||||
off,
|
||||
siblingOnAfter: dataManager.isEffectivelyEnabled(siblingId),
|
||||
snapshotAfter: Boolean(styleManager._contextControls._contextSessionSnapshot),
|
||||
};
|
||||
}
|
||||
return { exercised: true, results };
|
||||
} finally {
|
||||
rocketEntry.module.init = original.init;
|
||||
rocketEntry.module.enable = original.enable;
|
||||
rocketEntry.module.update = original.update;
|
||||
rocketEntry.module.disable = original.disable;
|
||||
rocketEntry.initialized = original.initialized;
|
||||
rocketEntry.lifecycleState = original.lifecycleState;
|
||||
restoreMissions();
|
||||
await dataManager.setEnabled(siblingId, false, { origin: 'programmatic' });
|
||||
siblingLayerEntry.initialized = original.siblingInitialized;
|
||||
await window.__gevQaUnregisterLayer(dataManager, siblingId);
|
||||
}
|
||||
});
|
||||
check(
|
||||
'voice Space Missions uses the same Context snapshot and exact-restore transaction as UI entry',
|
||||
voiceMissionEntry.exercised
|
||||
&& voiceMissionEntry.voiceState?.voiceOn
|
||||
&& voiceMissionEntry.voiceState.mode === 'space-missions'
|
||||
&& voiceMissionEntry.voiceState.entering === null
|
||||
&& voiceMissionEntry.voiceState.snapshotRetained
|
||||
&& voiceMissionEntry.voiceState.siblingIsolated
|
||||
&& voiceMissionEntry.voiceExit?.voiceOff
|
||||
&& voiceMissionEntry.voiceExit.mode === null
|
||||
&& voiceMissionEntry.voiceExit.entering === null
|
||||
&& !voiceMissionEntry.voiceExit.snapshotRetained
|
||||
&& voiceMissionEntry.voiceExit.siblingRestored,
|
||||
JSON.stringify(voiceMissionEntry),
|
||||
);
|
||||
check(
|
||||
'internal programmatic Space Missions activation does not create a user Context session',
|
||||
voiceMissionEntry.internalState?.missionEnabled
|
||||
&& voiceMissionEntry.internalState.mode === null
|
||||
&& voiceMissionEntry.internalState.entering === null
|
||||
&& !voiceMissionEntry.internalState.snapshotRetained,
|
||||
JSON.stringify(voiceMissionEntry),
|
||||
'Space Missions is an ordinary layer: no Context session, no isolation, from any origin',
|
||||
ordinaryMissionLayer.exercised
|
||||
&& Object.values(ordinaryMissionLayer.results || {}).length === 3
|
||||
&& Object.values(ordinaryMissionLayer.results).every((entry) =>
|
||||
entry.on === true
|
||||
&& entry.mode === null
|
||||
&& !entry.snapshot
|
||||
&& entry.siblingOn
|
||||
&& entry.off === true
|
||||
&& entry.siblingOnAfter
|
||||
&& !entry.snapshotAfter),
|
||||
JSON.stringify(ordinaryMissionLayer),
|
||||
);
|
||||
await page.evaluate(() => window.__godsEyeView.dataManager.setEnabled(
|
||||
'flights',
|
||||
@@ -1998,98 +1816,6 @@ try {
|
||||
}),
|
||||
);
|
||||
|
||||
// Cyber relocates its collapsed briefing header into the expanded utility
|
||||
// lane. Exercise actual height changes without reload and measure both cards.
|
||||
await page.evaluate(() => {
|
||||
const manager = window.__godsEyeView.styleManager;
|
||||
manager._setHudVariant('cyber');
|
||||
manager.hud.setMode('on');
|
||||
manager._setCockpitDisclosure('display', false);
|
||||
manager._setCockpitDisclosure('radio', true);
|
||||
});
|
||||
const cyberRadioOrder = await page.evaluate(() => {
|
||||
const manager = window.__godsEyeView.styleManager;
|
||||
manager.cockpitView.syncSignalLayout();
|
||||
const display = document
|
||||
.getElementById('cockpit-display-toggle-btn')
|
||||
.closest('.cockpit-utility-control');
|
||||
const radio = document
|
||||
.getElementById('cockpit-radio-toggle-btn')
|
||||
.closest('.cockpit-utility-control');
|
||||
const displayRect = display.getBoundingClientRect();
|
||||
const radioRect = radio.getBoundingClientRect();
|
||||
return {
|
||||
display: displayRect.toJSON(),
|
||||
radio: radioRect.toJSON(),
|
||||
displayExpanded: display.classList.contains('is-expanded'),
|
||||
radioExpanded: radio.classList.contains('is-expanded'),
|
||||
gap: radioRect.top - displayRect.bottom,
|
||||
};
|
||||
});
|
||||
check(
|
||||
'Cyber expanding Radio preserves the authored Display-then-Radio order',
|
||||
!cyberRadioOrder.displayExpanded
|
||||
&& cyberRadioOrder.radioExpanded
|
||||
&& cyberRadioOrder.display.height > 0
|
||||
&& cyberRadioOrder.radio.height > 0
|
||||
&& cyberRadioOrder.gap >= 7,
|
||||
JSON.stringify(cyberRadioOrder),
|
||||
);
|
||||
await page.screenshot({ path: path.join(shotsDir, 'cyber-radio-order.png') });
|
||||
await page.evaluate(() => {
|
||||
const manager = window.__godsEyeView.styleManager;
|
||||
manager._setCockpitDisclosure('radio', false);
|
||||
manager._setCockpitDisclosure('display', true);
|
||||
});
|
||||
const cyberStyleStates = await page.evaluate(() => {
|
||||
const manager = window.__godsEyeView.styleManager;
|
||||
const states = [];
|
||||
for (const style of ['normal', 'surveillance', 'thermal', 'retro']) {
|
||||
document.querySelector(`.style-btn[data-style="${style}"]`).click();
|
||||
states.push({
|
||||
requestedStyle: style,
|
||||
activeStyle: manager.activeStyle,
|
||||
hud: manager.hud.getVariant(),
|
||||
theme: document.documentElement.dataset.uiTheme,
|
||||
selector: document.getElementById('hud-layout-select').value,
|
||||
savedHud: manager.getVisualState().hud.variant,
|
||||
});
|
||||
}
|
||||
return states;
|
||||
});
|
||||
check('Cockpit visual-style controls retain Cyber HUD, selector, shell and saved layout',
|
||||
cyberStyleStates.every(state => state.activeStyle === state.requestedStyle
|
||||
&& state.hud === 'cyber' && state.theme === 'cyber'
|
||||
&& state.selector === 'cyber' && state.savedHud === 'cyber'),
|
||||
JSON.stringify(cyberStyleStates));
|
||||
for (const height of [987, 720, 640, 900]) {
|
||||
await page.setViewport({ width: 1440, height, deviceScaleFactor: 1 });
|
||||
await new Promise((resolve) => setTimeout(resolve, 400));
|
||||
const geometry = await page.evaluate(() => {
|
||||
const signal = document.getElementById('cockpit-signal-stream');
|
||||
const utility = document.getElementById('cockpit-utility-controls');
|
||||
const expanded = utility.querySelector('.cockpit-utility-control.is-expanded');
|
||||
const s = signal.getBoundingClientRect();
|
||||
const u = expanded.getBoundingClientRect();
|
||||
const toggle = document.getElementById('cockpit-signal-toggle');
|
||||
const t = toggle.getBoundingClientRect();
|
||||
const hit = document.elementFromPoint(t.x + t.width / 2, t.y + t.height / 2);
|
||||
return { height: innerHeight, theme: document.documentElement.dataset.uiTheme,
|
||||
collapsed: signal.dataset.collapsed, signal: s.toJSON(), utility: u.toJSON(),
|
||||
reachable: Boolean(hit && toggle.contains(hit)),
|
||||
contained: u.bottom <= s.top - 7 && s.bottom < innerHeight,
|
||||
};
|
||||
});
|
||||
check(`Cyber collapsed Live Signals remains visible and reachable after resize to ${height}px`,
|
||||
geometry.theme === 'cyber' && geometry.collapsed === 'true'
|
||||
&& geometry.signal.width > 0 && geometry.signal.height > 0
|
||||
&& geometry.reachable && geometry.contained, JSON.stringify(geometry));
|
||||
if (height === 640 || height === 900) {
|
||||
await page.screenshot({ path: path.join(shotsDir, `cyber-resize-${height}.png`) });
|
||||
}
|
||||
}
|
||||
await page.evaluate(() => window.__godsEyeView.styleManager._setHudVariant('tactical'));
|
||||
|
||||
const signalTransition = await page.evaluate(async () => {
|
||||
const manager = window.__godsEyeView.styleManager;
|
||||
const cockpit = manager.cockpitView;
|
||||
|
||||
@@ -307,8 +307,8 @@ const MUTATIONS = [
|
||||
{
|
||||
defect: 'a cancelled globe flight fails the whole mission',
|
||||
file: 'module',
|
||||
from: ' .catch(() => null);',
|
||||
to: ' .catch(() => { throw new Error("flight failed"); });',
|
||||
from: ' .catch(() => null)\n : null;',
|
||||
to: ' .catch(() => { throw new Error("flight failed"); })\n : null;',
|
||||
},
|
||||
{
|
||||
defect: 'Explore manually quietly runs a mission instead of nothing',
|
||||
|
||||
+12
-2
@@ -662,8 +662,18 @@ async function main() {
|
||||
await open(page, { query: "?welcome=1", errorSink: consoleErrors });
|
||||
await pick(page, 'space-missions');
|
||||
state = await appState(page);
|
||||
record('SPACE MISSIONS activates its context mode', state.contextMode === 'space-missions',
|
||||
`contextMode=${state.contextMode}`);
|
||||
const missions = await page.evaluate(() => {
|
||||
const panel = document.getElementById('space-missions-panel');
|
||||
return {
|
||||
layerOn: window.__godsEyeView.dataManager.isEffectivelyEnabled('rocket-launches'),
|
||||
panelOpen: !!panel && !panel.hidden && !panel.classList.contains('collapsed'),
|
||||
};
|
||||
});
|
||||
record('SPACE MISSIONS switches its layer on without a Context mode',
|
||||
missions.layerOn && state.contextMode == null,
|
||||
`layerOn=${missions.layerOn} contextMode=${state.contextMode}`);
|
||||
record('SPACE MISSIONS opens its own panel', missions.panelOpen,
|
||||
`panelOpen=${missions.panelOpen}`);
|
||||
shots.push(await shoot(page, 'mission-space-missions'));
|
||||
});
|
||||
|
||||
|
||||
@@ -314,17 +314,7 @@ try {
|
||||
}
|
||||
await page.evaluate(() => {
|
||||
document.documentElement.lang = 'en';
|
||||
document.documentElement.dataset.uiTheme = 'cyber';
|
||||
});
|
||||
const cyber = await page.$eval(
|
||||
'#scene-select',
|
||||
(node) => getComputedStyle(node).backgroundColor,
|
||||
);
|
||||
check(
|
||||
'Cyber keeps its native field theme',
|
||||
cyber === 'rgba(26, 35, 39, 0.96)',
|
||||
cyber,
|
||||
);
|
||||
await begin('heading');
|
||||
await page.evaluate(() => {
|
||||
const owner = window.__godsEyeView.styleManager._cctvControls;
|
||||
|
||||
+9
-11
@@ -845,7 +845,7 @@ async function main() {
|
||||
params: {},
|
||||
};
|
||||
let failureUsed = false;
|
||||
const entryLayerId = mode === 'flights' ? 'military-awareness' : 'rocket-launches';
|
||||
const entryLayerId = 'military-awareness';
|
||||
dataManager.setEnabled = async (layerId, shouldEnable) => {
|
||||
const failsIsolation = phase === 'isolation' && layerId === 'local-datacenters' && !shouldEnable;
|
||||
const failsActivation = phase === 'activation' && layerId === entryLayerId && shouldEnable;
|
||||
@@ -872,7 +872,6 @@ async function main() {
|
||||
priorLayerRestored: enabled.has('local-datacenters'),
|
||||
entryEnabled: enabled.has(entryLayerId),
|
||||
flightsButtonDisabled: document.getElementById('global-context-flights-btn').disabled,
|
||||
missionsButtonDisabled: document.getElementById('global-context-missions-btn').disabled,
|
||||
message: document.getElementById('toast').textContent,
|
||||
};
|
||||
};
|
||||
@@ -893,7 +892,7 @@ async function main() {
|
||||
}
|
||||
};
|
||||
const contextFailures = [];
|
||||
for (const mode of ['flights', 'space-missions']) {
|
||||
for (const mode of ['flights']) {
|
||||
for (const phase of ['isolation', 'activation']) {
|
||||
for (const outcome of ['false', 'reject']) {
|
||||
contextFailures.push(await runContextFailure(mode, phase, outcome));
|
||||
@@ -902,7 +901,7 @@ async function main() {
|
||||
}
|
||||
|
||||
const directEntryFailures = [];
|
||||
for (const layerId of ['military-awareness', 'rocket-launches']) {
|
||||
for (const layerId of ['military-awareness']) {
|
||||
for (const outcome of ['false', 'reject']) {
|
||||
enabled.clear();
|
||||
enabled.add('local-datacenters');
|
||||
@@ -971,7 +970,7 @@ async function main() {
|
||||
styleManager._showToast = originalShowToast;
|
||||
|
||||
const directActivationFailures = [];
|
||||
for (const layerId of ['military-awareness', 'rocket-launches']) {
|
||||
for (const layerId of ['military-awareness']) {
|
||||
enabled.clear();
|
||||
styleManager._contextControls._contextMode = null;
|
||||
styleManager._contextControls._contextSessionSnapshot = {
|
||||
@@ -1001,7 +1000,7 @@ async function main() {
|
||||
}
|
||||
|
||||
const directActivationRollbackFailures = [];
|
||||
for (const layerId of ['military-awareness', 'rocket-launches']) {
|
||||
for (const layerId of ['military-awareness']) {
|
||||
enabled.clear();
|
||||
styleManager._contextControls._contextMode = null;
|
||||
styleManager._contextControls._contextSessionSnapshot = {
|
||||
@@ -1211,7 +1210,7 @@ async function main() {
|
||||
check(
|
||||
'user-facing chip, real Context entry rollback, and installation Search failures settle safely',
|
||||
userFacingFailures.semanticFalseMessage === 'Radio could not stop cleanly'
|
||||
&& userFacingFailures.contextFailures.length === 8
|
||||
&& userFacingFailures.contextFailures.length === 4
|
||||
&& userFacingFailures.contextFailures.every((failure) => (
|
||||
failure.result === false
|
||||
&& failure.visibleMode === null
|
||||
@@ -1219,10 +1218,9 @@ async function main() {
|
||||
&& failure.priorLayerRestored
|
||||
&& !failure.entryEnabled
|
||||
&& !failure.flightsButtonDisabled
|
||||
&& !failure.missionsButtonDisabled
|
||||
&& failure.message.includes('QA transition failed')
|
||||
))
|
||||
&& userFacingFailures.directEntryFailures.length === 4
|
||||
&& userFacingFailures.directEntryFailures.length === 2
|
||||
&& userFacingFailures.directEntryFailures.every((failure) => (
|
||||
failure.reason.includes('could not start')
|
||||
&& failure.retryReason === null
|
||||
@@ -1233,14 +1231,14 @@ async function main() {
|
||||
&& failure.priorLayerRestored
|
||||
&& !failure.modeChanging
|
||||
))
|
||||
&& userFacingFailures.directActivationFailures.length === 2
|
||||
&& userFacingFailures.directActivationFailures.length === 1
|
||||
&& userFacingFailures.directActivationFailures.every((failure) => (
|
||||
failure.mode === null
|
||||
&& failure.snapshotCleared
|
||||
&& failure.priorLayerRestored
|
||||
&& failure.failedLayerDisabled
|
||||
))
|
||||
&& userFacingFailures.directActivationRollbackFailures.length === 2
|
||||
&& userFacingFailures.directActivationRollbackFailures.length === 1
|
||||
&& userFacingFailures.directActivationRollbackFailures.every((failure) => (
|
||||
failure.toastMessages.length === 1
|
||||
&& failure.toastMessages[0] === `${failure.layerId} could not start cleanly`
|
||||
|
||||
@@ -345,7 +345,7 @@ try {
|
||||
(await readScope()).feather === 2,
|
||||
);
|
||||
await page.click('#scope-toggle');
|
||||
for (const layout of ['minimal', 'cyber', 'tactical']) {
|
||||
for (const layout of ['minimal', 'tactical']) {
|
||||
await page.select('#hud-layout-select', layout);
|
||||
const state = await readScope();
|
||||
check(
|
||||
|
||||
@@ -276,35 +276,6 @@ try {
|
||||
.every((group) => group.scrollWidth <= group.clientWidth + 1),
|
||||
),
|
||||
);
|
||||
const cyber = await page.evaluate(() => {
|
||||
const root = document.documentElement;
|
||||
const previous = root.getAttribute('data-ui-theme');
|
||||
root.setAttribute('data-ui-theme', 'cyber');
|
||||
const selected = [
|
||||
...document.querySelectorAll('.gev-segment[aria-checked="true"]'),
|
||||
];
|
||||
// Check the final theme colors, independent of software-GL frame cadence.
|
||||
for (const button of selected)
|
||||
for (const animation of button.getAnimations()) animation.finish();
|
||||
const backgrounds = selected.map(
|
||||
(button) => getComputedStyle(button).backgroundColor,
|
||||
);
|
||||
const radii = [...document.querySelectorAll('.gev-segmented')].map(
|
||||
(group) => getComputedStyle(group).borderRadius,
|
||||
);
|
||||
const consistent =
|
||||
selected.length === 6 &&
|
||||
backgrounds.every((color) => color === backgrounds[0]) &&
|
||||
radii.every((radius) => radius === '1px');
|
||||
if (previous === null) root.removeAttribute('data-ui-theme');
|
||||
else root.setAttribute('data-ui-theme', previous);
|
||||
return { consistent, count: selected.length, backgrounds, radii };
|
||||
});
|
||||
check(
|
||||
'Cyber theme styles every selected segment consistently',
|
||||
cyber.consistent,
|
||||
JSON.stringify(cyber),
|
||||
);
|
||||
await page.evaluate(async () => {
|
||||
const { dataManager, styleManager } = window.__godsEyeView;
|
||||
await dataManager.setEnabled('recent-imagery', true);
|
||||
|
||||
@@ -194,7 +194,7 @@ try {
|
||||
result,
|
||||
);
|
||||
}
|
||||
for (const theme of ['tactical', 'cyber']) {
|
||||
for (const theme of ['tactical', 'minimal']) {
|
||||
await page.evaluate(
|
||||
(theme) => window.__godsEyeView.styleManager._setHudVariant(theme),
|
||||
theme,
|
||||
|
||||
+17
-17
@@ -1980,16 +1980,19 @@ try {
|
||||
await wait(12_000);
|
||||
check('leaving Contacts restores Transit', await isOn());
|
||||
|
||||
// SPACE MISSIONS
|
||||
await page.evaluate(() =>
|
||||
window.__godsEyeView.dataManager.setEnabled('transit', false, {
|
||||
origin: 'user',
|
||||
}),
|
||||
);
|
||||
await wait(2_000);
|
||||
await page.click('#global-context-missions-btn');
|
||||
// SPACE MISSIONS: an ordinary layer. It neither refuses nor puts away
|
||||
// Transit, so a Transit switched on while it runs stays on after it ends.
|
||||
const setMissions = (enabled) =>
|
||||
page.evaluate(
|
||||
(on) =>
|
||||
window.__godsEyeView.dataManager.setEnabled('rocket-launches', on, {
|
||||
origin: 'user',
|
||||
}),
|
||||
enabled,
|
||||
);
|
||||
await setMissions(true);
|
||||
await wait(20_000);
|
||||
const blocked = await page.evaluate(async () => {
|
||||
const beside = await page.evaluate(async () => {
|
||||
const settled = await window.__godsEyeView.dataManager.setEnabled(
|
||||
'transit',
|
||||
true,
|
||||
@@ -2001,16 +2004,13 @@ try {
|
||||
};
|
||||
});
|
||||
check(
|
||||
'Space Missions refuses to enable Transit while it isolates replay data',
|
||||
blocked.enabled === false,
|
||||
JSON.stringify(blocked),
|
||||
'Transit can be switched on while Space Missions runs',
|
||||
beside.settled !== false && beside.enabled === true,
|
||||
JSON.stringify(beside),
|
||||
);
|
||||
await page.click('#global-context-missions-btn');
|
||||
await setMissions(false);
|
||||
await wait(12_000);
|
||||
check(
|
||||
'leaving Space Missions leaves Transit off, as it was on entry',
|
||||
(await isOn()) === false,
|
||||
);
|
||||
check('switching Space Missions off leaves Transit on', await isOn());
|
||||
|
||||
check(
|
||||
'no uncaught page errors',
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
* The files of the Wikidata places detail pack
|
||||
* (`src/data/local_data/wikidata_places/`), from its rows. Used by
|
||||
* `scripts/build-wikidata-cities.mjs --tiles`; kept apart from the query so
|
||||
* the tiling can be checked offline against the shipped pack.
|
||||
*
|
||||
* Rows are `[name, lat, lon, population, country, wikidata]`. Each goes into
|
||||
* the 5 x 5 degree tile named by its south-west corner (`30_-100` covers 30
|
||||
* to 35 N, 100 to 95 W). Rows keep the order they are given in, largest
|
||||
* first; tiles without a row get no file.
|
||||
*/
|
||||
|
||||
import { foldName } from '../src/data/wikidataCities.js';
|
||||
import { greatCircleKm } from '../src/geoDistance.js';
|
||||
|
||||
export const TILE_DEGREES = 5;
|
||||
/** How near two rows of one name in one country are taken as one, in km. */
|
||||
export const TWIN_KM = 3;
|
||||
|
||||
/**
|
||||
* The rows the cities pack does not already hold. An item with several
|
||||
* stated populations can fall in both packs (one figure under the cut-off,
|
||||
* another over it); the cities pack keeps it, so the detail tiles never name
|
||||
* a place twice.
|
||||
* @param {Array<Array>} rows Detail rows, `[name, lat, lon, population, country, wikidata]`.
|
||||
* @param {Iterable<string>} cityIds Wikidata ids in the cities pack.
|
||||
*/
|
||||
export function withoutCities(rows, cityIds) {
|
||||
const cities = new Set(cityIds);
|
||||
return rows.filter((row) => !cities.has(row[5]));
|
||||
}
|
||||
|
||||
/** The tile a point falls in, named by its south-west corner. */
|
||||
export function tileKey(lat, lon) {
|
||||
const corner = (value) => Math.floor(value / TILE_DEGREES) * TILE_DEGREES;
|
||||
// As the lookups read them: latitude 90 is in the top row of tiles, and
|
||||
// longitude 180 is longitude -180.
|
||||
const top = 90 - TILE_DEGREES;
|
||||
return `${Math.min(top, corner(lat))}_${corner((((lon % 360) + 540) % 360) - 180)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Every file of the pack, by file name.
|
||||
* @param {Array<Array>} rows Largest first.
|
||||
* @param {object} meta The build's `source`, `license`, `built`,
|
||||
* `minPopulation`, `maxPopulation` and `columns`.
|
||||
* @returns {Map<string, string>}
|
||||
*/
|
||||
export function placeTileFiles(rows, meta) {
|
||||
const tiles = new Map();
|
||||
for (const row of rows) {
|
||||
const key = tileKey(row[1], row[2]);
|
||||
if (!tiles.has(key)) tiles.set(key, []);
|
||||
tiles.get(key).push(row);
|
||||
}
|
||||
// In locale order, as the shipped pack was written.
|
||||
const keys = [...tiles.keys()].sort((a, b) => a.localeCompare(b, 'en'));
|
||||
const files = new Map();
|
||||
for (const key of keys)
|
||||
files.set(`${key}.json`, `${JSON.stringify({ rows: tiles.get(key) })}\n`);
|
||||
const index = {
|
||||
meta: {
|
||||
source: meta.source,
|
||||
license: meta.license,
|
||||
built: meta.built,
|
||||
minPopulation: meta.minPopulation,
|
||||
maxPopulation: meta.maxPopulation,
|
||||
count: rows.length,
|
||||
columns: meta.columns,
|
||||
tileDegrees: TILE_DEGREES,
|
||||
tiles: keys.length,
|
||||
},
|
||||
tiles: Object.fromEntries(keys.map((key) => [key, tiles.get(key).length])),
|
||||
};
|
||||
files.set('index.json', `${JSON.stringify(index)}\n`);
|
||||
files.set(
|
||||
'files.js',
|
||||
[
|
||||
'// Generated by scripts/build-wikidata-cities.mjs --tiles; do not edit.',
|
||||
"export const INDEX_URL = () => new URL('./index.json', import.meta.url);",
|
||||
'export const TILE_URLS = {',
|
||||
...keys.map(
|
||||
(key) => ` '${key}': () => new URL('./${key}.json', import.meta.url),`,
|
||||
),
|
||||
'};',
|
||||
'',
|
||||
].join('\n'),
|
||||
);
|
||||
return files;
|
||||
}
|
||||
|
||||
const kmBetween = (a, b) =>
|
||||
greatCircleKm({ lat: a[1], lon: a[2] }, { lat: b[1], lon: b[2] });
|
||||
|
||||
/**
|
||||
* The rows without a second listing of one place: a row whose name (folded,
|
||||
* as lookups compare names) and country match a row already kept within
|
||||
* TWIN_KM is left out, so the larger of the two, given first, stays.
|
||||
* Namesakes across a border both stay.
|
||||
* @param {Array<Array>} rows Largest first.
|
||||
*/
|
||||
export function withoutNearTwins(rows) {
|
||||
// Cells of 0.05 degrees (about 5 km of latitude), searched with their
|
||||
// neighbours. A cell narrows toward the poles, so as many longitude cells
|
||||
// are searched as TWIN_KM spans there, wrapping at the antimeridian.
|
||||
const CELLS = 20;
|
||||
const AROUND = 360 * CELLS;
|
||||
const kept = new Map();
|
||||
return rows.filter((row) => {
|
||||
const name = foldName(row[0]);
|
||||
const la = Math.floor(row[1] * CELLS);
|
||||
const lo = Math.floor(row[2] * CELLS);
|
||||
const cos = Math.cos(
|
||||
(Math.min(89.9, Math.abs(row[1]) + 0.1) * Math.PI) / 180,
|
||||
);
|
||||
const span = Math.min(
|
||||
AROUND / 2,
|
||||
Math.ceil((TWIN_KM / (111.32 * cos)) * CELLS) + 1,
|
||||
);
|
||||
for (let i = -1; i <= 1; i++)
|
||||
for (let j = -span; j <= span; j++)
|
||||
for (const other of kept.get(
|
||||
`${la + i}_${(((lo + j) % AROUND) + AROUND) % AROUND}`,
|
||||
) || [])
|
||||
if (
|
||||
other.name === name &&
|
||||
other.row[4] === row[4] &&
|
||||
kmBetween(other.row, row) <= TWIN_KM
|
||||
)
|
||||
return false;
|
||||
const key = `${la}_${((lo % AROUND) + AROUND) % AROUND}`;
|
||||
if (!kept.has(key)) kept.set(key, []);
|
||||
kept.get(key).push({ name, row });
|
||||
return true;
|
||||
});
|
||||
}
|
||||
@@ -58,8 +58,8 @@ function realtimeDirectives(
|
||||
'For visual filter requests, call set_visual_style with one of the allowed style IDs.',
|
||||
'SHIPS vs STYLES: "vessels" is easily heard as "visuals". "Show me vessels", "turn on vessels", "the vessels", "visuals" or "vestibules" said WITHOUT a style name means the ships layer: set_layer_visibility{layerId:"ais-live-vessels"}, exactly as "ships" or "boats" does. Call set_visual_style only when the user names a style (retro/CRT, surveillance/night vision, thermal, anime, noir, normal) or says filter, effect or look. Never turn on a different data layer (such as fires) for a ships request.',
|
||||
'Disambiguation table — basemap vs layer vs style: basemap switching requires an explicit stack name — "Bing aerial" means set_map_stack bing-aerial, "aerial with labels" means bing-labels, "OSM"/"road map" means osm, "Esri"/"Esri imagery" means esri-imagery, "Google 3D"/"photorealistic" means photoreal. Any other mention of "satellite" or "satellites" means the satellites DATA LAYER via set_layer_visibility, never a basemap — except "recent/latest satellite imagery" (the recent-imagery layer) and "weather satellite"/clouds (weather-satellite). "surveillance"/"night vision"/"thermal" are visual STYLES via set_visual_style.',
|
||||
'HUD requests ("hud on/off", "switch to minimal/tactical/cyber layout") use set_hud. Detection requests ("detection on", "dense mode", "balanced mode", "sparse mode", "set density to 25", "use weighted allocation") use set_detection. Density snaps to 0/25/50/75/100 and derives Sparse/Balanced/Dense; panoptic is a legacy alias for Dense.',
|
||||
'Cyber sonar requests use set_cyber_sonar: enabled, rings, rangePct, intensityPct (Power), opacityPct, sectorDeg. For settings questions read get_current_view_state.controls.hud.sonar. Sonar is not detection. Do not silently switch themes, reveal the HUD or enable sonar when changing a slider. If the user explicitly requests Cyber plus sonar settings, call set_hud first, wait for success, then set_cyber_sonar. Confirm returned values; mapSweepActive and contactSweepActive distinguish saved settings from active map effects, including in Cockpit or reduced motion. Do not claim visible contacts solely because enabled is true.',
|
||||
'HUD requests ("hud on/off", "switch to minimal/tactical layout") use set_hud. Detection requests ("detection on", "dense mode", "balanced mode", "sparse mode", "set density to 25", "use weighted allocation") use set_detection. Density snaps to 0/25/50/75/100 and derives Sparse/Balanced/Dense; panoptic is a legacy alias for Dense.',
|
||||
'Sonar is a visual style over any HUD layout. Sonar requests (including "cyber mode", which was replaced by sonar) use set_cyber_sonar: enabled, rings, rangePct, intensityPct (Power), opacityPct, sectorDeg. For settings questions read get_current_view_state.controls.hud.sonar. Sonar is not detection. Do not silently switch layouts, reveal the HUD or enable sonar when changing a slider. Confirm returned values; mapSweepActive and contactSweepActive distinguish saved settings from active map effects, including in Cockpit or reduced motion. Do not claim visible contacts solely because enabled is true.',
|
||||
'Bloom/sharpen requests use set_post_processing. Scene requests ("play orbital watch", "stop the scene", "what scenes are there") use control_scene. CCTV camera requests ("next camera", "nearest camera", "select the Congress camera", "show coverage") use control_cctv — the CCTV layer must be enabled first.',
|
||||
'Radio playback requests use control_radio. "Turn on/start the radio" means action=play; action=enable only reveals Radio markers and must be reserved for explicit "show/enable the Radio layer/markers" requests. After a prepared playback result, briefly confirm any other completed actions and say "Turning on the radio"—never claim it is already playing. The client keeps Radio muted until playback is verified, then closes voice before restoring Radio volume. Examples: "play news near Austin" → select category=news locationId=austin; "play US news" → select category=news country=US; "Radio volume 30" → volume; pause/resume/stop/next/previous use the matching action. Radio selection never moves the camera.',
|
||||
'"Track/follow <something specific>" (a callsign, ship name, satellite name) uses track_entity. "Take me to the biggest fire" uses track_entity with query "biggest fire" (the fires layer must be enabled). Bare "orbit" means camera orbit of the current landmark. "Stop following/tracking" uses stop_tracking.',
|
||||
|
||||
@@ -225,7 +225,7 @@ export const ACTION_DESCRIPTIONS = {
|
||||
},
|
||||
set_cyber_sonar: {
|
||||
description:
|
||||
'Adjust Cyber-only sonar controls. Requires the Cyber HUD layout; never switches layout or HUD visibility. Omitted fields stay unchanged. Returns actual settings and separate map/contact sweep activity. A saved setting does not mean the effect is active.',
|
||||
'Adjust the Sonar visual style, which works over any HUD layout. Never switches layout or HUD visibility. Omitted fields stay unchanged. Returns actual settings and separate map/contact sweep activity. A saved setting does not mean the effect is active.',
|
||||
$position: 1,
|
||||
parameters: {
|
||||
properties: {
|
||||
|
||||
+58
-51
@@ -50,8 +50,11 @@ import { overlayHost } from './layers/overlayHost.js';
|
||||
* runs after each layer disable (a scene without one keeps that memory).
|
||||
* `library.fetchTile` and `library.fetchData` fetch the Data Library's tiles
|
||||
* and proxied datasets in place of the defaults (`createLibrarySource`).
|
||||
* `library.fetchImpl` asks the library server (its catalog) in place of the
|
||||
* page's fetch, for a server that wants the application's own credentials.
|
||||
* `library.requireCatalog` offers only what the server's library catalog
|
||||
* names, and nothing while it does not answer.
|
||||
* names, and nothing while it does not answer. `library: false` leaves the
|
||||
* Data Library out: no catalog is asked, and no Browse button is drawn.
|
||||
*/
|
||||
export function createApplicationTools({
|
||||
scene,
|
||||
@@ -153,56 +156,60 @@ export function createApplicationTools({
|
||||
connect: connectDisplay,
|
||||
});
|
||||
defer(() => geoFileImport?.destroy());
|
||||
// DATA ▸ Library: entries register their layers only when a viewer adds
|
||||
// them, after the core catalog is sealed. The browser dialog and the
|
||||
// controller share the application lifetime.
|
||||
const dataLibrary = createDataLibrary({
|
||||
dataManager,
|
||||
services: localGeoJsonServices,
|
||||
getTileset: () => tileset,
|
||||
mapStackController,
|
||||
shareLink: styleManager.shareLinkManager,
|
||||
requestRender: governorRequestRender,
|
||||
// An application's own tile and dataset fetches, when it keeps them in
|
||||
// its own cache.
|
||||
fetchTile: library.fetchTile ?? null,
|
||||
fetchData: library.fetchData ?? null,
|
||||
requireCatalog: library.requireCatalog === true,
|
||||
// Zoom to layer: an immediate navigation, so Cockpit can refuse it and
|
||||
// the current follow owner is released first (as for imported files).
|
||||
zoomTo: (extent) =>
|
||||
styleManager.runImmediateNavigation('layer', () =>
|
||||
flyToLibraryExtent(viewer, extent),
|
||||
) !== false,
|
||||
});
|
||||
defer(() => dataLibrary.destroy());
|
||||
// Browse: the owner presents the dialog through the store; LayerPanelsView
|
||||
// draws the Browse button and the dialog from it.
|
||||
const libraryStore = useDataLibraryStore(applicationPinia());
|
||||
const libraryBrowser = createLibraryBrowser({
|
||||
library: dataLibrary,
|
||||
publish: (view) => libraryStore.publish(view),
|
||||
});
|
||||
libraryStore.connect(libraryBrowser.controls);
|
||||
defer(() => {
|
||||
libraryBrowser.destroy();
|
||||
libraryStore.connect(null);
|
||||
});
|
||||
dataLibrary.start({ signal }).catch((error) => {
|
||||
if (!signal?.aborted) console.warn('[Library] start failed:', error);
|
||||
});
|
||||
// The live gate's handle (scripts/qa-data-library.mjs).
|
||||
const libraryHandle = {
|
||||
library: dataLibrary,
|
||||
browser: libraryBrowser,
|
||||
// What Copy Link would copy.
|
||||
buildShareLink: () => styleManager.shareLinkManager?.buildLink?.() ?? null,
|
||||
};
|
||||
window.__gevDataLibrary = libraryHandle;
|
||||
defer(() => {
|
||||
if (window.__gevDataLibrary === libraryHandle)
|
||||
delete window.__gevDataLibrary;
|
||||
});
|
||||
if (library !== false) {
|
||||
// DATA ▸ Library: entries register their layers only when a viewer adds
|
||||
// them, after the core catalog is sealed. The browser dialog and the
|
||||
// controller share the application lifetime.
|
||||
const dataLibrary = createDataLibrary({
|
||||
dataManager,
|
||||
services: localGeoJsonServices,
|
||||
getTileset: () => tileset,
|
||||
mapStackController,
|
||||
shareLink: styleManager.shareLinkManager,
|
||||
requestRender: governorRequestRender,
|
||||
// An application's own tile and dataset fetches, when it keeps them in
|
||||
// its own cache.
|
||||
fetchImpl: library.fetchImpl ?? undefined,
|
||||
fetchTile: library.fetchTile ?? null,
|
||||
fetchData: library.fetchData ?? null,
|
||||
requireCatalog: library.requireCatalog === true,
|
||||
// Zoom to layer: an immediate navigation, so Cockpit can refuse it and
|
||||
// the current follow owner is released first (as for imported files).
|
||||
zoomTo: (extent) =>
|
||||
styleManager.runImmediateNavigation('layer', () =>
|
||||
flyToLibraryExtent(viewer, extent),
|
||||
) !== false,
|
||||
});
|
||||
defer(() => dataLibrary.destroy());
|
||||
// Browse: the owner presents the dialog through the store; LayerPanelsView
|
||||
// draws the Browse button and the dialog from it.
|
||||
const libraryStore = useDataLibraryStore(applicationPinia());
|
||||
const libraryBrowser = createLibraryBrowser({
|
||||
library: dataLibrary,
|
||||
publish: (view) => libraryStore.publish(view),
|
||||
});
|
||||
libraryStore.connect(libraryBrowser.controls);
|
||||
defer(() => {
|
||||
libraryBrowser.destroy();
|
||||
libraryStore.connect(null);
|
||||
});
|
||||
dataLibrary.start({ signal }).catch((error) => {
|
||||
if (!signal?.aborted) console.warn('[Library] start failed:', error);
|
||||
});
|
||||
// The live gate's handle (scripts/qa-data-library.mjs).
|
||||
const libraryHandle = {
|
||||
library: dataLibrary,
|
||||
browser: libraryBrowser,
|
||||
// What Copy Link would copy.
|
||||
buildShareLink: () =>
|
||||
styleManager.shareLinkManager?.buildLink?.() ?? null,
|
||||
};
|
||||
window.__gevDataLibrary = libraryHandle;
|
||||
defer(() => {
|
||||
if (window.__gevDataLibrary === libraryHandle)
|
||||
delete window.__gevDataLibrary;
|
||||
});
|
||||
}
|
||||
// DATA ▸ Recent Imagery: the box tool claims the pointer like Draw and the
|
||||
// panel lives on the right rail, so both belong to the application
|
||||
// lifetime. The tileset lets the layer drape while the globe is hidden.
|
||||
|
||||
@@ -595,7 +595,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
|
||||
const portal = CockpitDisplayPortal.toString();
|
||||
assert.match(
|
||||
portal,
|
||||
/this\.standardScrollTop =\s*displayPanelScroller\(standardPanel\)\?\.scrollTop \|\| 0/,
|
||||
/this\.standardScrollTop = standardPanel\?\.scrollTop \|\| 0/,
|
||||
);
|
||||
assert.match(
|
||||
portal,
|
||||
@@ -603,7 +603,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
|
||||
);
|
||||
assert.match(
|
||||
portal,
|
||||
/if \(!this\.active\)[\s\S]*?this\.standardScrollTop =\s*displayPanelScroller\(standardPanel\)\.scrollTop/,
|
||||
/if \(!this\.active\)[\s\S]*?this\.standardScrollTop = standardPanel\.scrollTop/,
|
||||
);
|
||||
assert.match(
|
||||
portal,
|
||||
@@ -611,7 +611,7 @@ test('Cockpit Display portal retains both scroll owners across round trips', ()
|
||||
);
|
||||
assert.match(
|
||||
portal,
|
||||
/this\.cockpitPanel\.scrollTop = this\.cockpitScrollTop[\s\S]*?displayPanelScroller\(this\.standardPanel\)\.scrollTop =\s*this\.standardScrollTop/,
|
||||
/this\.cockpitPanel\.scrollTop = this\.cockpitScrollTop[\s\S]*?this\.standardPanel\.scrollTop = this\.standardScrollTop/,
|
||||
);
|
||||
});
|
||||
|
||||
@@ -680,6 +680,7 @@ test('fresh Cockpit entry temporarily collapses map panels and exit restores the
|
||||
'scene-panel',
|
||||
'pp-toggles',
|
||||
'global-context-panel',
|
||||
'space-missions-panel',
|
||||
'radio-panel',
|
||||
]) {
|
||||
assert.match(
|
||||
@@ -1261,14 +1262,15 @@ test('Global Context uses its dedicated right rail without a duplicate Data Laye
|
||||
);
|
||||
assert.match(html, /id="global-context-panel"/);
|
||||
assert.match(html, /id="global-context-flights-btn"/);
|
||||
assert.match(html, /id="global-context-missions-btn"/);
|
||||
assert.doesNotMatch(html, /id="global-context-missions-btn"/);
|
||||
assert.match(html, /id="space-missions-panel"/);
|
||||
});
|
||||
|
||||
test('Global Context standby describes both chooser modes', () => {
|
||||
test('Global Context standby describes Contacts', () => {
|
||||
const match = html.match(/<div id="context-mode-standby"[\s\S]*?<\/div>/);
|
||||
assert.ok(match, 'Global Context standby is missing');
|
||||
assert.match(match[0], /CONTACTS — nearest planes · vessels · sites/);
|
||||
assert.match(match[0], /SPACE MISSIONS — launches & orbital assets/);
|
||||
assert.doesNotMatch(match[0], /SPACE MISSIONS/);
|
||||
});
|
||||
|
||||
test('cockpit briefing cycle control keeps its state as the accessible name', () => {
|
||||
|
||||
+7
-4
@@ -58,12 +58,15 @@ export function cockpitAnchorCorrectionStep(
|
||||
return Math.min(distanceM, eased, correctionRateMps * dt);
|
||||
}
|
||||
|
||||
/** How late past its interval an update may come and still count in full. */
|
||||
const COCKPIT_SUBJECT_LATE_SEC = 1;
|
||||
|
||||
/**
|
||||
* The seconds an application subject's camera update advances its heading
|
||||
* slew, ground lift and anchor by: the time since the last update, at most
|
||||
* its update interval plus 0.1 s. A subject updated every 500 ms then turns
|
||||
* and eases at its configured rates, while a long stall (a hidden tab) still
|
||||
* moves it no further than one late update would.
|
||||
* its interval plus COCKPIT_SUBJECT_LATE_SEC. A subject updated every 500 ms,
|
||||
* or a browser drawing 5 frames a second, then keeps up, while a long stall
|
||||
* (a hidden tab) counts as one late update.
|
||||
* @param {number} elapsedMs Time since the last camera update.
|
||||
* @param {number} intervalMs The subject's update interval (0: every frame).
|
||||
* @returns {number}
|
||||
@@ -75,7 +78,7 @@ export function cockpitSubjectStepSec(elapsedMs, intervalMs) {
|
||||
const intervalSec = Number.isFinite(intervalMs)
|
||||
? Math.max(0, intervalMs) / 1000
|
||||
: 0;
|
||||
return Math.min(intervalSec + 0.1, elapsedSec);
|
||||
return Math.min(intervalSec + COCKPIT_SUBJECT_LATE_SEC, elapsedSec);
|
||||
}
|
||||
|
||||
/** Return whether a throttled cockpit presentation update is due. */
|
||||
|
||||
@@ -73,12 +73,15 @@ test('an application subject steps by its interval, never by a long stall', () =
|
||||
assert.equal(cockpitSubjectStepSec(16, 0), 0.016);
|
||||
assert.equal(cockpitSubjectStepSec(500, 500), 0.5);
|
||||
assert.equal(cockpitSubjectStepSec(520, 500), 0.52);
|
||||
// A hidden tab's minutes count as one late update.
|
||||
assert.equal(cockpitSubjectStepSec(60_000, 500), 0.6);
|
||||
assert.equal(cockpitSubjectStepSec(60_000, 0), 0.1);
|
||||
// Slow frames (5 a second) count in full...
|
||||
assert.equal(cockpitSubjectStepSec(200, 50), 0.2);
|
||||
assert.equal(cockpitSubjectStepSec(1000, 0), 1);
|
||||
// ...and a hidden tab's minutes as one late update.
|
||||
assert.equal(cockpitSubjectStepSec(60_000, 500), 1.5);
|
||||
assert.equal(cockpitSubjectStepSec(60_000, 0), 1);
|
||||
assert.equal(cockpitSubjectStepSec(-5, 500), 0);
|
||||
assert.equal(cockpitSubjectStepSec(Number.NaN, 500), 0);
|
||||
assert.equal(cockpitSubjectStepSec(1000, Number.NaN), 0.1);
|
||||
assert.equal(cockpitSubjectStepSec(1000, Number.NaN), 1);
|
||||
});
|
||||
|
||||
test('cockpit camera clearance never falls below the rendered ground floor', () => {
|
||||
|
||||
+19
-6
@@ -30,13 +30,26 @@ const TONE_RANK = Object.freeze([
|
||||
const stronger = (a, b) =>
|
||||
TONE_RANK.indexOf(b) > TONE_RANK.indexOf(a) ? b : a;
|
||||
|
||||
/** A label's width estimate (px): its longer line in small capitals. */
|
||||
/** Full-width glyphs in the BMP: CJK, kana, Hangul, full-width forms. */
|
||||
const WIDE_GLYPHS =
|
||||
/[\u1100-\u115F\u2E80-\u303E\u3041-\u33FF\u3400-\u4DBF\u4E00-\u9FFF\uA960-\uA97F\uAC00-\uD7A3\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFF60\uFFE0-\uFFE6]/g;
|
||||
|
||||
/**
|
||||
* One line's width (px) in `.cockpit-progress-label` type (cockpitSubject.css:
|
||||
* 10 px, 0.06 em spacing): 10.6 px a full-width glyph and 6.4 px each UTF-16
|
||||
* unit of any other, so an astral glyph (an emoji, a CJK extension) counts as
|
||||
* two and an emoji in the BMP (☕) as one, narrower than it is drawn. The
|
||||
* detail line's `<small>` draws smaller, so these widths only overestimate it.
|
||||
*/
|
||||
function lineWidthPx(line) {
|
||||
const text = String(line ?? '');
|
||||
const wide = text.match(WIDE_GLYPHS)?.length ?? 0;
|
||||
return wide * 10.6 + (text.length - wide) * 6.4;
|
||||
}
|
||||
|
||||
/** A label's width estimate (px): its wider line and 8 px of padding. */
|
||||
export function estimateProgressLabelPx(label) {
|
||||
const longest = Math.max(
|
||||
String(label?.text ?? '').length,
|
||||
String(label?.detail ?? '').length,
|
||||
);
|
||||
return longest * 6.4 + 8;
|
||||
return Math.max(lineWidthPx(label?.text), lineWidthPx(label?.detail)) + 8;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
// the travelled part.
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { cockpitProgressLayout } from './cockpitProgress.js';
|
||||
import {
|
||||
cockpitProgressLayout,
|
||||
estimateProgressLabelPx,
|
||||
} from './cockpitProgress.js';
|
||||
|
||||
const tick = (at, label = null, tone = 'normal') => ({ at, tone, label });
|
||||
const label = (text, priority, align = 'center', detail = '') => ({
|
||||
@@ -142,3 +145,59 @@ test('a long run of calls still lays out, every one a tick or part of one', () =
|
||||
assert.ok(narrow.ticks.length < wide.ticks.length);
|
||||
assert.equal(wide.ticks.length, 60);
|
||||
});
|
||||
|
||||
test('a CJK stop name gets the width its full-width glyphs need', () => {
|
||||
const text = '中央駅前広場東口'; // 8 full-width glyphs
|
||||
// 10 px type, 0.06 em apart.
|
||||
const needPx = text.length * (10 + 0.6);
|
||||
const givenPx = estimateProgressLabelPx({ text, detail: '' });
|
||||
assert.ok(
|
||||
givenPx >= needPx,
|
||||
`${givenPx} px given, about ${needPx} px needed`,
|
||||
);
|
||||
// As many Latin letters are narrower; half-width katakana are as narrow.
|
||||
assert.ok(givenPx > estimateProgressLabelPx({ text: 'CENTRALS' }));
|
||||
assert.equal(
|
||||
estimateProgressLabelPx({ text: 'カタカナ' }),
|
||||
estimateProgressLabelPx({ text: 'KANA' }),
|
||||
);
|
||||
});
|
||||
|
||||
test('astral glyphs (emoji outside the BMP, supplementary kana) in a progress label get at least 1 em each', () => {
|
||||
// About 1 em in 10 px type, 0.06 em apart.
|
||||
const emPx = 10 + 0.6;
|
||||
for (const [text, needPx] of [
|
||||
['🚉🚆🚇🚋', 4 * emPx],
|
||||
['🚆'.repeat(8), 8 * emPx],
|
||||
// Supplementary kana, outside the full-width ranges.
|
||||
['𛀁𛀂', 2 * emPx],
|
||||
// Mixed: four emoji, a space and two full-width glyphs.
|
||||
['🚆🚇🚌🚕 乗換', 4 * emPx + 6.4 + 2 * emPx],
|
||||
]) {
|
||||
const givenPx = estimateProgressLabelPx({ text, detail: '' });
|
||||
assert.ok(
|
||||
givenPx >= needPx + 8,
|
||||
`${text}: ${givenPx} px given, about ${needPx} px needed`,
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
test('a label is as wide as its wider line, its smaller detail line included', () => {
|
||||
assert.ok(
|
||||
estimateProgressLabelPx({ text: 'GATE', detail: '中央駅前' }) >
|
||||
estimateProgressLabelPx({ text: 'GATE', detail: '' }),
|
||||
'the wider detail line widens the label',
|
||||
);
|
||||
// As headless Chrome draws the detail's <small> (8.333 px JetBrains Mono,
|
||||
// 0.6 px apart): 'WWWWMMMMWWWW' at 67.2 px, '中央駅前広場東口' at 72.9 px.
|
||||
for (const [detail, needPx] of [
|
||||
['W'.repeat(64), 64 * (67.2 / 12)],
|
||||
['駅'.repeat(45), 45 * (72.9 / 8)],
|
||||
]) {
|
||||
const givenPx = estimateProgressLabelPx({ text: 'A', detail });
|
||||
assert.ok(
|
||||
givenPx >= needPx,
|
||||
`${detail.length} × ${detail[0]}: ${givenPx} px given, ${needPx} px needed`,
|
||||
);
|
||||
}
|
||||
});
|
||||
@@ -117,20 +117,27 @@ function lookOf(raw) {
|
||||
});
|
||||
}
|
||||
|
||||
/** Promises already given a catch: a pending one is read again on every use. */
|
||||
const caughtWords = new WeakSet();
|
||||
|
||||
/**
|
||||
* A provider's worded member `key` as it reads now, normalized: the value,
|
||||
* or what the function it is returns when called on `provider` (so it can
|
||||
* follow the page's language); null when it is malformed or a read throws.
|
||||
* Reading the member, and reading what it gives, runs provider code too (a
|
||||
* getter), so both are guarded as the call is.
|
||||
* A worded member as `read()` gives it, normalized: called on `provider`
|
||||
* when it is a function (so it can follow the page's language); null when it
|
||||
* is malformed (a promise too) or provider code throws, its getter included
|
||||
* (hence `read`).
|
||||
*/
|
||||
function wordedNow(provider, key, normalize) {
|
||||
function worded(provider, read, normalize) {
|
||||
try {
|
||||
const value = provider[key];
|
||||
return (
|
||||
normalize(typeof value === 'function' ? value.call(provider) : value) ??
|
||||
null
|
||||
);
|
||||
const value = read();
|
||||
const words = typeof value === 'function' ? value.call(provider) : value;
|
||||
if (typeof words?.then === 'function') {
|
||||
if (!caughtWords.has(words)) {
|
||||
caughtWords.add(words);
|
||||
Promise.resolve(words).catch(() => {});
|
||||
}
|
||||
return null;
|
||||
}
|
||||
return normalize(words) ?? null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
@@ -146,7 +153,7 @@ function providerName(provider, order) {
|
||||
return `#${order}`;
|
||||
}
|
||||
|
||||
/** Why `provider` cannot be kept, or null. */
|
||||
/** Why `provider` cannot be kept, its worded members aside, or null. */
|
||||
function refusal(provider, kinds) {
|
||||
if (!isObject(provider)) return 'not an object';
|
||||
if (typeof provider.kind !== 'string' || !KIND_PATTERN.test(provider.kind))
|
||||
@@ -165,14 +172,25 @@ function refusal(provider, kinds) {
|
||||
typeof provider.isEntryAllowed !== 'function'
|
||||
)
|
||||
return 'isEntryAllowed is not a function';
|
||||
if (!wordedNow(provider, 'entryFace', faceOf)) return 'malformed entry face';
|
||||
if (!wordedNow(provider, 'labels', labelsOf))
|
||||
return 'labels need view, exit and exitText';
|
||||
if (provider.look != null && !wordedNow(provider, 'look', lookOf))
|
||||
return 'look needs an aheadLabel';
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* A provider's worded members, each read once, to seed its copy (so one that
|
||||
* fails when read again cannot undo this check), or why one is malformed.
|
||||
* @returns {{face: object, labels: object, look: ?object}|string}
|
||||
*/
|
||||
function checkedWords(provider) {
|
||||
const face = worded(provider, () => provider.entryFace, faceOf);
|
||||
if (!face) return 'malformed entry face';
|
||||
const labels = worded(provider, () => provider.labels, labelsOf);
|
||||
if (!labels) return 'labels need view, exit and exitText';
|
||||
const lookValue = provider.look;
|
||||
if (lookValue == null) return { face, labels, look: null };
|
||||
const look = worded(provider, () => lookValue, lookOf);
|
||||
return look ? { face, labels, look } : 'look needs an aheadLabel';
|
||||
}
|
||||
|
||||
/**
|
||||
* The application's subject providers, checked once and frozen, in the order
|
||||
* entry asks them: ascending `priority`, ties in list order. Each has
|
||||
@@ -191,7 +209,8 @@ function refusal(provider, kinds) {
|
||||
* object: it is called on the provider again whenever they are shown and
|
||||
* when the page's language changes, so its words can follow it
|
||||
* (`./i18n`). A read that throws or is malformed keeps the last
|
||||
* good one; `look` is on or off and `restPitchDeg` fixed as first read;
|
||||
* good one; `look` is on or off and `restPitchDeg` fixed as read at
|
||||
* registration;
|
||||
* - `cameraIntervalMs` (optional): 0..1000, null for the Cockpit's default; 0
|
||||
* updates the camera every rendered frame;
|
||||
* - `headingSlewDps` (optional): how fast the view turns to a new heading,
|
||||
@@ -224,7 +243,11 @@ export function cockpitSubjectProviders(
|
||||
let copy = null;
|
||||
try {
|
||||
reason = refusal(provider, kinds);
|
||||
if (!reason) copy = keptProvider(provider, order);
|
||||
if (!reason) {
|
||||
const words = checkedWords(provider);
|
||||
if (typeof words === 'string') reason = words;
|
||||
else copy = keptProvider(provider, order, words);
|
||||
}
|
||||
} catch {
|
||||
reason = 'a member threw when read';
|
||||
}
|
||||
@@ -241,14 +264,12 @@ export function cockpitSubjectProviders(
|
||||
return Object.freeze(kept);
|
||||
}
|
||||
|
||||
/** The frozen copy the Cockpit keeps of a provider `refusal` passed. */
|
||||
function keptProvider(provider, order) {
|
||||
// Worded members are read again on each use (see above); the last good
|
||||
// read stands in for one that is malformed or throws.
|
||||
let face = wordedNow(provider, 'entryFace', faceOf);
|
||||
let labels = wordedNow(provider, 'labels', labelsOf);
|
||||
// On or off, and its rest pitch, as first read.
|
||||
let look = wordedNow(provider, 'look', lookOf);
|
||||
/**
|
||||
* The frozen copy the Cockpit keeps of a provider that passed `refusal`,
|
||||
* seeded with the worded members `checkedWords` read.
|
||||
*/
|
||||
function keptProvider(provider, order, words) {
|
||||
let { face, labels, look } = words;
|
||||
const restPitchDeg = look?.restPitchDeg ?? 0;
|
||||
return Object.freeze({
|
||||
kind: provider.kind,
|
||||
@@ -256,16 +277,16 @@ function keptProvider(provider, order) {
|
||||
priority: finite(provider.priority) ? provider.priority : 0,
|
||||
order,
|
||||
get entryFace() {
|
||||
face = wordedNow(provider, 'entryFace', faceOf) ?? face;
|
||||
face = worded(provider, () => provider.entryFace, faceOf) ?? face;
|
||||
return face;
|
||||
},
|
||||
get labels() {
|
||||
labels = wordedNow(provider, 'labels', labelsOf) ?? labels;
|
||||
labels = worded(provider, () => provider.labels, labelsOf) ?? labels;
|
||||
return labels;
|
||||
},
|
||||
get look() {
|
||||
if (!look) return null;
|
||||
const now = wordedNow(provider, 'look', lookOf);
|
||||
const now = worded(provider, () => provider.look, lookOf);
|
||||
if (now)
|
||||
look = Object.freeze({ restPitchDeg, aheadLabel: now.aheadLabel });
|
||||
return look;
|
||||
@@ -335,11 +356,11 @@ function candidateOf(raw) {
|
||||
* a position that is not finite, an eye with no valid `upM` (0..1000), or a
|
||||
* read of it that throws (a getter runs provider code).
|
||||
* A `heightM` that is not finite or lies outside
|
||||
* COCKPIT_SUBJECT_MIN_HEIGHT_M..COCKPIT_SUBJECT_MAX_HEIGHT_M reads as null:
|
||||
* the eye then stands on the shared floor, or where it last stood while that
|
||||
* is cold. The anchor is `'inertial'` only when asked for and the frame
|
||||
* gives a speed; otherwise it is `'exact'`. An id is compared with `heldId`
|
||||
* trimmed, as `cockpitSubjectCandidate` trims it.
|
||||
* COCKPIT_SUBJECT_MIN_HEIGHT_M..COCKPIT_SUBJECT_MAX_HEIGHT_M reads as null,
|
||||
* for the eye to stand on the shared floor (ui/cockpitCamera.js). The anchor
|
||||
* is `'inertial'` by default for a frame with a valid speed, and `'exact'`
|
||||
* when asked for or with no speed. An id is compared with `heldId` trimmed,
|
||||
* as `cockpitSubjectCandidate` trims it.
|
||||
* @param {unknown} raw What `read()` returned.
|
||||
* @param {string} heldId The subject the view holds.
|
||||
* @returns {object|null} `{id, name, latitude, longitude, heightM, headingDeg,
|
||||
@@ -356,49 +377,57 @@ export function cockpitSubjectFrame(raw, heldId) {
|
||||
}
|
||||
|
||||
function frameOf(raw, heldId) {
|
||||
if (!isObject(raw) || typeof raw.id !== 'string' || raw.id.trim() !== heldId)
|
||||
return null;
|
||||
const latitude = raw.latitude;
|
||||
const longitude = raw.longitude;
|
||||
if (!isObject(raw)) return null;
|
||||
// Each field read once: a getter on the frame runs provider code.
|
||||
const {
|
||||
id,
|
||||
name,
|
||||
latitude,
|
||||
longitude,
|
||||
heightM,
|
||||
headingDeg: rawHeadingDeg,
|
||||
courseDeg,
|
||||
speedMps: rawSpeedMps,
|
||||
stale,
|
||||
groundClamp,
|
||||
anchor,
|
||||
eye: rawEye,
|
||||
} = raw;
|
||||
if (typeof id !== 'string' || id.trim() !== heldId) return null;
|
||||
if (!finite(latitude) || !finite(longitude) || Math.abs(latitude) > 90)
|
||||
return null;
|
||||
const eye = isObject(raw.eye) ? raw.eye : null;
|
||||
if (!eye || !finite(eye.upM) || eye.upM < 0 || eye.upM > 1000) return null;
|
||||
if (!isObject(rawEye)) return null;
|
||||
const { upM, forwardM, pitchDeg, minClearanceM } = rawEye;
|
||||
if (!finite(upM) || upM < 0 || upM > 1000) return null;
|
||||
const heading = (value) =>
|
||||
finite(value) ? ((value % 360) + 360) % 360 : null;
|
||||
const headingDeg = heading(raw.headingDeg);
|
||||
const speedMps =
|
||||
finite(raw.speedMps) && raw.speedMps >= 0 ? raw.speedMps : null;
|
||||
const headingDeg = heading(rawHeadingDeg);
|
||||
const speedMps = finite(rawSpeedMps) && rawSpeedMps >= 0 ? rawSpeedMps : null;
|
||||
return {
|
||||
id: heldId,
|
||||
name: cockpitSubjectText(raw.name, 64) || cockpitSubjectText(heldId, 64),
|
||||
name: cockpitSubjectText(name, 64) || cockpitSubjectText(heldId, 64),
|
||||
latitude,
|
||||
longitude: ((((longitude + 180) % 360) + 360) % 360) - 180,
|
||||
heightM:
|
||||
finite(raw.heightM) &&
|
||||
raw.heightM >= COCKPIT_SUBJECT_MIN_HEIGHT_M &&
|
||||
raw.heightM <= COCKPIT_SUBJECT_MAX_HEIGHT_M
|
||||
? raw.heightM
|
||||
finite(heightM) &&
|
||||
heightM >= COCKPIT_SUBJECT_MIN_HEIGHT_M &&
|
||||
heightM <= COCKPIT_SUBJECT_MAX_HEIGHT_M
|
||||
? heightM
|
||||
: null,
|
||||
headingDeg,
|
||||
courseDeg: heading(raw.courseDeg) ?? headingDeg,
|
||||
courseDeg: heading(courseDeg) ?? headingDeg,
|
||||
speedMps,
|
||||
stale: raw.stale === true,
|
||||
groundClamp: raw.groundClamp !== false,
|
||||
stale: stale === true,
|
||||
groundClamp: groundClamp !== false,
|
||||
// An inertial anchor runs on at the frame's speed; with none it would
|
||||
// close on a moving subject at the correction's floor and fall behind.
|
||||
anchor: raw.anchor === 'exact' || speedMps === null ? 'exact' : 'inertial',
|
||||
anchor: anchor === 'exact' || speedMps === null ? 'exact' : 'inertial',
|
||||
eye: {
|
||||
upM: eye.upM,
|
||||
forwardM:
|
||||
finite(eye.forwardM) && Math.abs(eye.forwardM) <= 500
|
||||
? eye.forwardM
|
||||
: 0,
|
||||
pitchDeg: finite(eye.pitchDeg) ? clamp(eye.pitchDeg, -90, 90) : 0,
|
||||
upM,
|
||||
forwardM: finite(forwardM) && Math.abs(forwardM) <= 500 ? forwardM : 0,
|
||||
pitchDeg: finite(pitchDeg) ? clamp(pitchDeg, -90, 90) : 0,
|
||||
minClearanceM:
|
||||
finite(eye.minClearanceM) && eye.minClearanceM >= 0
|
||||
? eye.minClearanceM
|
||||
: 0,
|
||||
finite(minClearanceM) && minClearanceM >= 0 ? minClearanceM : 0,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -642,11 +642,15 @@ test('a provider whose getter throws is left out with one warning; the next is k
|
||||
]);
|
||||
});
|
||||
|
||||
test('a worded getter that starts throwing keeps the last good words', () => {
|
||||
let failing = false;
|
||||
const words = (value) => () => {
|
||||
if (failing) throw new Error('translations unavailable');
|
||||
return value;
|
||||
test('a worded getter that throws from its second read keeps the last good words', () => {
|
||||
// Registration reads each once: the second read is the first use.
|
||||
const once = (value) => {
|
||||
let read = false;
|
||||
return () => {
|
||||
if (read) throw new Error('translations unavailable');
|
||||
read = true;
|
||||
return value;
|
||||
};
|
||||
};
|
||||
const definition = provider();
|
||||
for (const [key, value] of Object.entries({
|
||||
@@ -654,22 +658,52 @@ test('a worded getter that starts throwing keeps the last good words', () => {
|
||||
entryFace: { icon: 'commute', label: 'RIDE' },
|
||||
look: { restPitchDeg: 10, aheadLabel: 'Look ahead' },
|
||||
}))
|
||||
Object.defineProperty(definition, key, { get: words(value) });
|
||||
Object.defineProperty(definition, key, { get: once(value) });
|
||||
const { kept, warnings } = keep([definition]);
|
||||
assert.deepEqual(warnings, []);
|
||||
const [ride] = kept;
|
||||
failing = true;
|
||||
assert.equal(ride.labels.view, 'Ride view');
|
||||
assert.equal(ride.entryFace.label, 'RIDE');
|
||||
assert.deepEqual(ride.look, { restPitchDeg: 10, aheadLabel: 'Look ahead' });
|
||||
// So does a worded object whose own member throws when read.
|
||||
failing = false;
|
||||
Object.defineProperty(definition, 'labels', {
|
||||
get: () => throwingGetter({ view: 'v', exit: 'e', exitText: 'x' }, 'view'),
|
||||
});
|
||||
assert.equal(ride.labels.view, 'Ride view');
|
||||
});
|
||||
|
||||
test('a worded member that returns a rejected promise keeps the last good words, the rejection caught', async () => {
|
||||
const definition = provider();
|
||||
const words = definition.labels;
|
||||
let reads = 0;
|
||||
definition.labels = () => {
|
||||
reads += 1;
|
||||
return reads === 1 ? words : Promise.reject(new Error('late words'));
|
||||
};
|
||||
const { kept, warnings } = keep([definition]);
|
||||
assert.deepEqual(warnings, []);
|
||||
assert.equal(kept[0].labels.view, words.view);
|
||||
// An unhandled rejection would fail this test once it surfaces.
|
||||
await new Promise((resolve) => setTimeout(resolve, 10));
|
||||
});
|
||||
|
||||
test('a frame field read through a getter is read once', () => {
|
||||
const frame = { id: 'a1', latitude: 1, longitude: 2, eye: { upM: 3 } };
|
||||
const once = (value) => {
|
||||
let read = false;
|
||||
return () => {
|
||||
const answer = read ? undefined : value;
|
||||
read = true;
|
||||
return answer;
|
||||
};
|
||||
};
|
||||
Object.defineProperty(frame, 'heightM', { get: once(420) });
|
||||
Object.defineProperty(frame, 'speedMps', { get: once(12) });
|
||||
const normalized = cockpitSubjectFrame(frame, 'a1');
|
||||
assert.equal(normalized.heightM, 420);
|
||||
assert.equal(normalized.speedMps, 12);
|
||||
});
|
||||
|
||||
test('a candidate, frame or HUD view whose getter throws reads as null', () => {
|
||||
assert.equal(
|
||||
cockpitSubjectCandidate(throwingGetter({ name: 'Example' }, 'id')),
|
||||
|
||||
@@ -17,11 +17,6 @@
|
||||
* @param {number} [input.signalGap] Clearance above the briefing card.
|
||||
* @param {number} [input.minTopFloor] Absolute ceiling for the strip, in px.
|
||||
* @param {number} [input.minTopRatio] Viewport-relative ceiling, 0..1.
|
||||
* @param {boolean} [input.signalCollapsed] Whether the briefing card is collapsed.
|
||||
* @param {boolean} [input.utilityExpanded] Whether Display or Radio is expanded.
|
||||
* @param {number} [input.bottomInset] Reserved viewport space below an expanded panel.
|
||||
* @param {number} [input.signalHeight] Collapsed briefing header reserved below the utility.
|
||||
* @param {boolean} [input.reserveViewportLane] Theme relocates the briefing below the expanded utility.
|
||||
* @returns {{ top: number, maxHeight: number }}
|
||||
*/
|
||||
export function resolveCockpitUtilityAnchor({
|
||||
@@ -34,29 +29,13 @@ export function resolveCockpitUtilityAnchor({
|
||||
signalGap = 8,
|
||||
minTopFloor = 96,
|
||||
minTopRatio = 0.12,
|
||||
signalCollapsed = false,
|
||||
utilityExpanded = false,
|
||||
bottomInset = 80,
|
||||
signalHeight = 0,
|
||||
reserveViewportLane = false,
|
||||
}) {
|
||||
const viewport = Math.max(0, Number(viewportHeight) || 0);
|
||||
const minTop = Math.max(minTopFloor, viewport * minTopRatio);
|
||||
const anchoredTop = Math.max(minTop, (Number(recBottom) || 0) + recGap);
|
||||
const strip = Math.max(0, Number(stripHeight) || 0);
|
||||
const signal = Number(signalTop);
|
||||
const expandedLaneBottom = Math.max(
|
||||
0,
|
||||
viewport -
|
||||
Math.max(0, Number(bottomInset) || 0) -
|
||||
Math.max(0, Number(signalHeight) || 0),
|
||||
);
|
||||
const lowerBound =
|
||||
reserveViewportLane && signalCollapsed && utilityExpanded
|
||||
? expandedLaneBottom
|
||||
: Number.isFinite(signal)
|
||||
? signal
|
||||
: viewport;
|
||||
const lowerBound = Number.isFinite(signal) ? signal : viewport;
|
||||
const clearedTop = lowerBound - signalGap - strip;
|
||||
const top = Math.max(minTop, Math.min(anchoredTop, clearedTop));
|
||||
const floor = Math.max(0, Number(collapsedHeight) || 0) || 50;
|
||||
@@ -100,25 +79,3 @@ export function resolveCockpitUtilityLayout({
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
/** Shared Cyber panel slot, with footer controls above the lower frame (83vh). */
|
||||
export function resolveCyberCockpitPanelLane({
|
||||
viewportHeight,
|
||||
top,
|
||||
launcherHeight = 60,
|
||||
signalHeight = 44,
|
||||
contactHeight = 64,
|
||||
}) {
|
||||
const gap = 8;
|
||||
const footerHeight = Math.max(
|
||||
contactHeight + gap,
|
||||
launcherHeight + signalHeight + gap * 2,
|
||||
);
|
||||
const bottom = viewportHeight * 0.82;
|
||||
const panelHeight = Math.max(120, bottom - top - footerHeight);
|
||||
return {
|
||||
panelHeight,
|
||||
utilityHeight: panelHeight + gap + launcherHeight,
|
||||
signalTop: top + panelHeight + launcherHeight + gap * 2,
|
||||
};
|
||||
}
|
||||
@@ -4,58 +4,11 @@ import assert from 'node:assert/strict';
|
||||
import {
|
||||
resolveCockpitUtilityAnchor,
|
||||
resolveCockpitUtilityLayout,
|
||||
resolveCyberCockpitPanelLane,
|
||||
} from './cockpitUtilityLayout.js';
|
||||
|
||||
// 1512x790, the height the strip used to collide with the briefing card at.
|
||||
const desktop = { viewportHeight: 790, stripHeight: 107, collapsedHeight: 50 };
|
||||
|
||||
test('Cyber shared panel slot reserves both footer lanes above the decorative frame', () => {
|
||||
for (const viewportHeight of [600, 673, 713, 986, 1376]) {
|
||||
for (const signalHeight of [44, 76]) {
|
||||
for (const contactHeight of [44, 84, 120]) {
|
||||
const top = Math.max(164, Math.min(204, viewportHeight * 0.19));
|
||||
const lane = resolveCyberCockpitPanelLane({ viewportHeight, top, signalHeight, contactHeight });
|
||||
assert.ok(lane.panelHeight >= 120);
|
||||
assert.ok(top + lane.panelHeight + 8 + contactHeight <= viewportHeight * 0.82 + .01);
|
||||
assert.ok(lane.signalTop + signalHeight <= viewportHeight * 0.82 + .01);
|
||||
assert.equal(lane.signalTop, top + lane.utilityHeight + 8);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('Cyber keeps the Data Layers top while reserving briefing clearance', () => {
|
||||
for (const viewportHeight of [673, 713, 986, 1376]) {
|
||||
const leftTop = Math.max(164, Math.min(204, viewportHeight * 0.19));
|
||||
const collapsed = resolveCockpitUtilityAnchor({
|
||||
viewportHeight, stripHeight: 128, collapsedHeight: 60, recBottom: 0,
|
||||
signalTop: leftTop + 128 + 28, minTopFloor: leftTop, minTopRatio: 0,
|
||||
});
|
||||
assert.equal(collapsed.top, leftTop);
|
||||
assert.ok(collapsed.maxHeight >= 128);
|
||||
const expanded = resolveCockpitUtilityAnchor({
|
||||
viewportHeight, stripHeight: 700, collapsedHeight: 60, recBottom: 0,
|
||||
signalTop: 255, minTopFloor: leftTop, minTopRatio: 0,
|
||||
signalCollapsed: true, utilityExpanded: true, reserveViewportLane: true, signalHeight: 44,
|
||||
});
|
||||
assert.equal(expanded.top, leftTop);
|
||||
assert.equal(expanded.top + expanded.maxHeight + 8 + 44 + 80, viewportHeight);
|
||||
}
|
||||
});
|
||||
|
||||
test('expanded utilities reserve the visible collapsed briefing header at every desktop height', () => {
|
||||
for (const viewportHeight of [640, 720, 987, 1376]) {
|
||||
for (const signalHeight of [48, 76, 100]) {
|
||||
const { top, maxHeight } = resolveCockpitUtilityAnchor({
|
||||
...desktop, viewportHeight, recBottom: 0, signalTop: 255,
|
||||
signalCollapsed: true, utilityExpanded: true, signalHeight, reserveViewportLane: true,
|
||||
});
|
||||
assert.equal(top + maxHeight + 8, viewportHeight - 80 - signalHeight);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
test('the strip hangs 12px under the REC readout when the briefing card leaves room', () => {
|
||||
const { top } = resolveCockpitUtilityAnchor({ ...desktop, recBottom: 148.1, signalTop: 420 });
|
||||
assert.equal(Number(top.toFixed(1)), 160.1);
|
||||
@@ -101,34 +54,11 @@ test('a missing REC readout leaves the strip on the viewport ceiling', () => {
|
||||
assert.equal(top, 96);
|
||||
});
|
||||
|
||||
test('an expanded utility claims the vertical lane released by a collapsed briefing', () => {
|
||||
const { top, maxHeight } = resolveCockpitUtilityAnchor({
|
||||
...desktop,
|
||||
recBottom: 148.1,
|
||||
signalTop: 265.4,
|
||||
signalCollapsed: true,
|
||||
utilityExpanded: true,
|
||||
reserveViewportLane: true,
|
||||
});
|
||||
assert.equal(Number(top.toFixed(1)), 160.1);
|
||||
assert.equal(Number(maxHeight.toFixed(1)), 541.9);
|
||||
});
|
||||
|
||||
test('non-relocating themes preserve the visible briefing boundary even when collapsed', () => {
|
||||
test('the visible briefing card bounds the utility strip, collapsed or not', () => {
|
||||
const { top, maxHeight } = resolveCockpitUtilityAnchor({
|
||||
...desktop, recBottom: 148.1, signalTop: 265.4,
|
||||
signalCollapsed: true, utilityExpanded: true,
|
||||
});
|
||||
assert.equal(Number((top + maxHeight).toFixed(1)), 257.4);
|
||||
});
|
||||
|
||||
test('a collapsed briefing still bounds the utility strip until a panel expands', () => {
|
||||
const { maxHeight } = resolveCockpitUtilityAnchor({
|
||||
...desktop,
|
||||
recBottom: 148.1,
|
||||
signalTop: 265.4,
|
||||
signalCollapsed: true,
|
||||
});
|
||||
assert.equal(Number(maxHeight.toFixed(1)), 107);
|
||||
});
|
||||
|
||||
|
||||
+19
-106
@@ -1,5 +1,3 @@
|
||||
import { msg } from './i18n/marker.js';
|
||||
|
||||
const CONTEXT_DEPENDENCIES = Object.freeze({
|
||||
flights: new Set([
|
||||
'military-awareness',
|
||||
@@ -8,15 +6,18 @@ const CONTEXT_DEPENDENCIES = Object.freeze({
|
||||
'ais-live-vessels',
|
||||
'military-installations',
|
||||
]),
|
||||
'space-missions': new Set(['rocket-launches', 'satellites']),
|
||||
});
|
||||
const CONTEXT_COMPANIONS = new Set(['radio']);
|
||||
/** The Space Missions refusal, with the blocked layer's name as {layer}. */
|
||||
export const SPACE_MISSIONS_LAYER_BLOCK_REASON = msg(
|
||||
'Space Missions isolates replay data. Exit the mode to enable {layer}.',
|
||||
);
|
||||
const [BLOCK_REASON_PREFIX, BLOCK_REASON_SUFFIX] =
|
||||
SPACE_MISSIONS_LAYER_BLOCK_REASON.split('{layer}');
|
||||
/**
|
||||
* Layers Context never touches: Space Missions and the Satellites layer it
|
||||
* depends on. Contacts neither switches them off on entry nor restores them
|
||||
* on exit, so they run beside it in either order and keep their own state
|
||||
* (the mission controller owns the Satellites dependency).
|
||||
*/
|
||||
export const CONTEXT_INDEPENDENT_LAYER_IDS = Object.freeze([
|
||||
'rocket-launches',
|
||||
'satellites',
|
||||
]);
|
||||
/** Return whether an origin represents a direct user choice on this route. */
|
||||
export function isExplicitUserIntentOrigin(origin, layerId = null) {
|
||||
return origin === 'user' || origin === 'voice';
|
||||
@@ -27,7 +28,8 @@ export function recordContextRestoreExplicitChange({ restoreState, change }) {
|
||||
if (
|
||||
!restoreState?.enabledLayerIds ||
|
||||
change?.type !== 'visibility' ||
|
||||
!isExplicitUserIntentOrigin(change.origin, change.layerId)
|
||||
!isExplicitUserIntentOrigin(change.origin, change.layerId) ||
|
||||
CONTEXT_INDEPENDENT_LAYER_IDS.includes(change.layerId)
|
||||
)
|
||||
return false;
|
||||
if (!restoreState.explicitLayerStates)
|
||||
@@ -121,10 +123,7 @@ export async function settleUserFacingContextAction({
|
||||
* one into `userAdded` makes exit restoration re-enable the mode layer the
|
||||
* user just turned off.
|
||||
*/
|
||||
export const CONTEXT_ENTRY_LAYER_IDS = Object.freeze([
|
||||
'military-awareness',
|
||||
'rocket-launches',
|
||||
]);
|
||||
export const CONTEXT_ENTRY_LAYER_IDS = Object.freeze(['military-awareness']);
|
||||
|
||||
/**
|
||||
* Leave a Context transaction: publish the settled coordination flag, then
|
||||
@@ -193,7 +192,8 @@ export function shouldExitContextForLayerChange({
|
||||
change?.type !== 'visibility' ||
|
||||
!isExplicitUserIntentOrigin(change.origin, change.layerId) ||
|
||||
change.layerId === 'military-awareness' ||
|
||||
CONTEXT_COMPANIONS.has(change.layerId)
|
||||
CONTEXT_COMPANIONS.has(change.layerId) ||
|
||||
CONTEXT_INDEPENDENT_LAYER_IDS.includes(change.layerId)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -215,6 +215,7 @@ export function contextAllowedLayerIds(contextMode) {
|
||||
return new Set([
|
||||
...(CONTEXT_DEPENDENCIES[contextMode] || ['military-awareness']),
|
||||
...CONTEXT_COMPANIONS,
|
||||
...CONTEXT_INDEPENDENT_LAYER_IDS,
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -235,21 +236,6 @@ export function shouldCaptureContextSession(change) {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether one explicit mission intent superseded an in-flight Clear All
|
||||
* reservation and therefore needs deferred Context adoption.
|
||||
*/
|
||||
export function shouldDeferContextEntryDuringClear({ change, clearInFlight }) {
|
||||
return Boolean(
|
||||
clearInFlight &&
|
||||
change?.type === 'visibility-requested' &&
|
||||
change.layerId === 'rocket-launches' &&
|
||||
change.enabled === true &&
|
||||
isExplicitUserIntentOrigin(change.origin, change.layerId) &&
|
||||
Number.isInteger(change.intentEpoch),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Bookkeep a user-owned layer change against the active Context session so
|
||||
* exit restoration can honor layers the user added mid-session. Two rules
|
||||
@@ -273,7 +259,8 @@ export function recordContextSessionUserChange({
|
||||
if (
|
||||
!snapshot?.userAdded ||
|
||||
change?.type !== 'visibility' ||
|
||||
!isExplicitUserIntentOrigin(change.origin, change.layerId)
|
||||
!isExplicitUserIntentOrigin(change.origin, change.layerId) ||
|
||||
CONTEXT_INDEPENDENT_LAYER_IDS.includes(change.layerId)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -319,83 +306,10 @@ export function contextSnapshotLayerIds(
|
||||
) {
|
||||
const snapshot = new Set(restoringLayerIds || currentEnabledLayerIds || []);
|
||||
for (const layerId of excludeLayerIds || []) snapshot.delete(layerId);
|
||||
for (const layerId of CONTEXT_INDEPENDENT_LAYER_IDS) snapshot.delete(layerId);
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
/**
|
||||
* Block layers that would mix unrelated live/current data into Space Missions.
|
||||
* The manager calls this before lifecycle work so a refused layer never starts.
|
||||
* @param {object} input Current mode and requested visibility transition.
|
||||
* @param {string|null} input.contextMode Active Context mode.
|
||||
* @param {object|null} input.change Requested visibility transition.
|
||||
* @param {string|null} [input.layerName] User-facing layer name.
|
||||
* @returns {string|null} Honest user-facing refusal reason, or null when allowed.
|
||||
*/
|
||||
export function contextLayerEnableBlockReason({
|
||||
contextMode,
|
||||
change,
|
||||
layerName = null,
|
||||
}) {
|
||||
if (
|
||||
contextMode !== 'space-missions' ||
|
||||
change?.enabled !== true ||
|
||||
contextAllowedLayerIds('space-missions').has(change.layerId)
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
const label = String(layerName || change.layerId || 'that layer');
|
||||
return SPACE_MISSIONS_LAYER_BLOCK_REASON.replace('{layer}', label);
|
||||
}
|
||||
|
||||
/**
|
||||
* The layer name from a Space Missions refusal, so the UI can rebuild the
|
||||
* sentence in its language.
|
||||
* @param {string} reason
|
||||
* @returns {{layer: string}|null} The blocked layer's name, or null when the
|
||||
* reason is not a Space Missions refusal.
|
||||
*/
|
||||
export function parseContextLayerBlockReason(reason) {
|
||||
if (
|
||||
typeof reason !== 'string' ||
|
||||
!reason.startsWith(BLOCK_REASON_PREFIX) ||
|
||||
!reason.endsWith(BLOCK_REASON_SUFFIX) ||
|
||||
reason.length <= BLOCK_REASON_PREFIX.length + BLOCK_REASON_SUFFIX.length
|
||||
)
|
||||
return null;
|
||||
return {
|
||||
layer: reason.slice(
|
||||
BLOCK_REASON_PREFIX.length,
|
||||
reason.length - BLOCK_REASON_SUFFIX.length,
|
||||
),
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolve who owns a cancelled direct Space Missions entry. A newer ON keeps
|
||||
* the entry shell reserved for its replacement transaction; every other
|
||||
* cancellation must roll back the isolated pre-entry session.
|
||||
*
|
||||
* @param {object} input Cancellation and current manager intent state.
|
||||
* @param {object|null} input.change Manager visibility notification.
|
||||
* @returns {'ignore'|'replacement'|'restore'} Cancellation disposition.
|
||||
*/
|
||||
export function spaceMissionEntryCancellationDisposition({ change }) {
|
||||
if (
|
||||
change?.type !== 'visibility-cancelled' ||
|
||||
change.layerId !== 'rocket-launches' ||
|
||||
change.enabled !== true
|
||||
)
|
||||
return 'ignore';
|
||||
if (
|
||||
change.cancellationReason === 'superseded' &&
|
||||
Number.isInteger(change.successorIntentEpoch) &&
|
||||
change.successorIntentEpoch > change.intentEpoch &&
|
||||
change.successorEnabled === true
|
||||
)
|
||||
return 'replacement';
|
||||
return 'restore';
|
||||
}
|
||||
|
||||
/**
|
||||
* Merge the pre-entry layer snapshot with layers the user enabled during the
|
||||
* Context session so both survive restoration.
|
||||
@@ -510,7 +424,6 @@ export function subjectEntryAllowed({
|
||||
*/
|
||||
export const CONTEXT_MODE_VOICE_NAMES = Object.freeze({
|
||||
flights: 'contacts',
|
||||
'space-missions': 'space-missions',
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
+63
-111
@@ -5,7 +5,6 @@ import {
|
||||
orbitEntryAllowed,
|
||||
cockpitEntryAllowed,
|
||||
contextAllowedLayerIds,
|
||||
contextLayerEnableBlockReason,
|
||||
contextRestoreLayerIds,
|
||||
isExplicitUserIntentOrigin,
|
||||
mergeContextTransitionErrors,
|
||||
@@ -17,9 +16,7 @@ import {
|
||||
settleContextIntentReplay,
|
||||
settleUserFacingContextAction,
|
||||
shouldCaptureContextSession,
|
||||
shouldDeferContextEntryDuringClear,
|
||||
shouldExitContextForLayerChange,
|
||||
spaceMissionEntryCancellationDisposition,
|
||||
} from './contextModePolicy.js';
|
||||
|
||||
test('Context transition errors preserve primary identity and aggregate failed layers', () => {
|
||||
@@ -119,11 +116,6 @@ test('user-enabled layers are additive and do not exit Context', () => {
|
||||
globalContextEnabled: true,
|
||||
change: userEnable('earthquakes'),
|
||||
}), false);
|
||||
assert.equal(shouldExitContextForLayerChange({
|
||||
contextMode: 'space-missions',
|
||||
globalContextEnabled: false,
|
||||
change: userEnable('traffic'),
|
||||
}), false);
|
||||
assert.equal(shouldExitContextForLayerChange({
|
||||
contextMode: null,
|
||||
globalContextEnabled: true,
|
||||
@@ -133,48 +125,16 @@ test('user-enabled layers are additive and do not exit Context', () => {
|
||||
|
||||
test('programmatic Context dependencies and direct mode setup remain allowed', () => {
|
||||
assert.equal(shouldExitContextForLayerChange({
|
||||
contextMode: 'space-missions',
|
||||
contextMode: 'flights',
|
||||
globalContextEnabled: true,
|
||||
change: { ...userEnable('satellites'), origin: 'programmatic' },
|
||||
change: { ...userEnable('military'), enabled: false, origin: 'programmatic' },
|
||||
}), false);
|
||||
});
|
||||
|
||||
test('Space Missions cancellation retains only a newer authoritative ON entry', () => {
|
||||
const cancelledEntry = {
|
||||
type: 'visibility-cancelled',
|
||||
layerId: 'rocket-launches',
|
||||
enabled: true,
|
||||
intentEpoch: 8,
|
||||
cancellationReason: 'superseded',
|
||||
successorIntentEpoch: 9,
|
||||
successorEnabled: true,
|
||||
successorOrigin: 'programmatic',
|
||||
};
|
||||
assert.equal(spaceMissionEntryCancellationDisposition({
|
||||
change: cancelledEntry,
|
||||
}), 'replacement');
|
||||
assert.equal(spaceMissionEntryCancellationDisposition({
|
||||
change: { ...cancelledEntry, successorEnabled: false },
|
||||
}), 'restore', 'a newer OFF releases the entry shell');
|
||||
assert.equal(spaceMissionEntryCancellationDisposition({
|
||||
change: {
|
||||
...cancelledEntry,
|
||||
cancellationReason: 'caller-abort',
|
||||
successorIntentEpoch: undefined,
|
||||
successorEnabled: undefined,
|
||||
},
|
||||
}), 'restore', 'caller abort at the same epoch restores the isolated session');
|
||||
assert.equal(spaceMissionEntryCancellationDisposition({
|
||||
change: { ...cancelledEntry, enabled: false },
|
||||
currentIntentEpoch: 9,
|
||||
effectivelyEnabled: true,
|
||||
}), 'ignore');
|
||||
});
|
||||
|
||||
test('only explicit user-owned shell enables capture a Context restoration snapshot', () => {
|
||||
const userMissionEnable = {
|
||||
type: 'visibility-requested',
|
||||
layerId: 'rocket-launches',
|
||||
layerId: 'military-awareness',
|
||||
enabled: true,
|
||||
origin: 'user',
|
||||
};
|
||||
@@ -186,40 +146,25 @@ test('only explicit user-owned shell enables capture a Context restoration snaps
|
||||
assert.equal(shouldCaptureContextSession({ ...userMissionEnable, origin: 'context-restore' }), false);
|
||||
assert.equal(shouldCaptureContextSession({ ...userMissionEnable, enabled: false }), false);
|
||||
assert.equal(shouldCaptureContextSession({ ...userMissionEnable, layerId: 'satellites' }), false);
|
||||
assert.equal(
|
||||
shouldCaptureContextSession({ ...userMissionEnable, layerId: 'rocket-launches' }),
|
||||
false,
|
||||
'Space Missions is an ordinary layer, not a Context entry',
|
||||
);
|
||||
});
|
||||
|
||||
test('voice dependency OFF exits Space Missions like the equivalent UI action', () => {
|
||||
test('voice dependency OFF exits Contacts like the equivalent UI action', () => {
|
||||
assert.equal(shouldExitContextForLayerChange({
|
||||
contextMode: 'space-missions',
|
||||
contextMode: 'flights',
|
||||
globalContextEnabled: false,
|
||||
change: { type: 'visibility', layerId: 'satellites', enabled: false, origin: 'voice' },
|
||||
change: { type: 'visibility', layerId: 'flights', enabled: false, origin: 'voice' },
|
||||
}), true);
|
||||
});
|
||||
|
||||
test('only a newer explicit mission request is deferred during Clear All', () => {
|
||||
const change = {
|
||||
type: 'visibility-requested',
|
||||
layerId: 'rocket-launches',
|
||||
enabled: true,
|
||||
origin: 'voice',
|
||||
intentEpoch: 12,
|
||||
};
|
||||
assert.equal(shouldDeferContextEntryDuringClear({ change, clearInFlight: true }), true);
|
||||
assert.equal(shouldDeferContextEntryDuringClear({ change, clearInFlight: false }), false);
|
||||
assert.equal(shouldDeferContextEntryDuringClear({
|
||||
change: { ...change, origin: 'programmatic' },
|
||||
clearInFlight: true,
|
||||
}), false);
|
||||
assert.equal(shouldDeferContextEntryDuringClear({
|
||||
change: { ...change, enabled: false },
|
||||
clearInFlight: true,
|
||||
}), false);
|
||||
});
|
||||
|
||||
test('a rapid re-entry snapshots the settled restore target, not partial manager state', () => {
|
||||
assert.deepEqual(
|
||||
[...contextSnapshotLayerIds(
|
||||
new Set(['rocket-launches', 'earthquakes']),
|
||||
new Set(['cctv', 'earthquakes']),
|
||||
new Set(['flights', 'traffic']),
|
||||
)],
|
||||
['flights', 'traffic'],
|
||||
@@ -230,31 +175,15 @@ test('a rapid re-entry snapshots the settled restore target, not partial manager
|
||||
);
|
||||
assert.deepEqual(
|
||||
[...contextSnapshotLayerIds(
|
||||
new Set(['rocket-launches', 'satellites']),
|
||||
new Set(['military-awareness', 'cctv']),
|
||||
null,
|
||||
['rocket-launches'],
|
||||
['military-awareness'],
|
||||
)],
|
||||
['satellites'],
|
||||
['cctv'],
|
||||
'the synchronous entry intent is not part of the pre-entry snapshot',
|
||||
);
|
||||
});
|
||||
|
||||
test('Space Missions blocks unrelated layer enables before replay data can mix', () => {
|
||||
const change = { layerId: 'flights', enabled: true, origin: 'user' };
|
||||
assert.match(
|
||||
contextLayerEnableBlockReason({ contextMode: 'space-missions', change, layerName: 'Live Flights' }),
|
||||
/Exit the mode to enable Live Flights/,
|
||||
);
|
||||
assert.equal(contextLayerEnableBlockReason({
|
||||
contextMode: 'space-missions',
|
||||
change: { ...change, layerId: 'satellites' },
|
||||
}), null);
|
||||
assert.equal(contextLayerEnableBlockReason({
|
||||
contextMode: 'flights',
|
||||
change,
|
||||
}), null, 'live cockpit keeps additive user layers');
|
||||
});
|
||||
|
||||
test('the Global Context shell and layers selected while Context is off remain allowed', () => {
|
||||
assert.equal(shouldExitContextForLayerChange({
|
||||
contextMode: null,
|
||||
@@ -275,14 +204,38 @@ test('manually disabling a mode dependency exits that Context bundle', () => {
|
||||
change: { ...userEnable('military'), enabled: false },
|
||||
}), true);
|
||||
assert.equal(shouldExitContextForLayerChange({
|
||||
contextMode: 'space-missions',
|
||||
contextMode: 'flights',
|
||||
globalContextEnabled: false,
|
||||
change: { ...userEnable('satellites'), enabled: false },
|
||||
}), true);
|
||||
}), false, 'Satellites is not a Contacts dependency');
|
||||
});
|
||||
|
||||
test('Context never isolates, snapshots, restores or bookkeeps Space Missions and Satellites', () => {
|
||||
for (const layerId of ['rocket-launches', 'satellites']) {
|
||||
assert.equal(contextAllowedLayerIds('flights').has(layerId), true);
|
||||
const snapshot = { userAdded: new Set(), userRemoved: new Set() };
|
||||
for (const enabled of [true, false]) {
|
||||
assert.equal(recordContextSessionUserChange({
|
||||
snapshot,
|
||||
change: { type: 'visibility', origin: 'user', layerId, enabled },
|
||||
effectiveContextMode: 'flights',
|
||||
}), false);
|
||||
const restoreState = { enabledLayerIds: new Set() };
|
||||
assert.equal(recordContextRestoreExplicitChange({
|
||||
restoreState,
|
||||
change: { type: 'visibility', origin: 'user', layerId, enabled },
|
||||
}), false);
|
||||
}
|
||||
assert.equal(snapshot.userAdded.size + snapshot.userRemoved.size, 0);
|
||||
}
|
||||
assert.deepEqual(
|
||||
[...contextSnapshotLayerIds(new Set(['rocket-launches', 'satellites', 'cctv']))],
|
||||
['cctv'],
|
||||
);
|
||||
});
|
||||
|
||||
test('Radio remains an independent companion across Context transitions', () => {
|
||||
for (const contextMode of ['flights', 'space-missions']) {
|
||||
for (const contextMode of ['flights', null]) {
|
||||
for (const enabled of [true, false]) {
|
||||
assert.equal(shouldExitContextForLayerChange({
|
||||
contextMode,
|
||||
@@ -292,21 +245,17 @@ test('Radio remains an independent companion across Context transitions', () =>
|
||||
}
|
||||
assert.equal(contextAllowedLayerIds(contextMode).has('radio'), true);
|
||||
}
|
||||
assert.equal(contextLayerEnableBlockReason({
|
||||
contextMode: 'space-missions',
|
||||
change: { type: 'visibility', origin: 'user', layerId: 'radio', enabled: true },
|
||||
layerName: 'Radio',
|
||||
}), null);
|
||||
});
|
||||
|
||||
test('each Context mode exposes only its shell and dependencies', () => {
|
||||
assert.deepEqual(
|
||||
[...contextAllowedLayerIds(null)],
|
||||
['military-awareness', 'radio'],
|
||||
['military-awareness', 'radio', 'rocket-launches', 'satellites'],
|
||||
);
|
||||
assert.deepEqual(
|
||||
[...contextAllowedLayerIds('space-missions')],
|
||||
['rocket-launches', 'satellites', 'radio'],
|
||||
['military-awareness', 'radio', 'rocket-launches', 'satellites'],
|
||||
'Space Missions is not a Context mode',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -332,7 +281,7 @@ test('Context restoration honors an explicit companion disable', () => {
|
||||
});
|
||||
|
||||
test('the latest explicit Radio state wins across a Context session', () => {
|
||||
for (const effectiveContextMode of [null, 'flights', 'space-missions']) {
|
||||
for (const effectiveContextMode of [null, 'flights']) {
|
||||
for (const origin of ['user', 'voice']) {
|
||||
const snapshot = { userAdded: new Set(), userRemoved: new Set() };
|
||||
const record = (enabled) => recordContextSessionUserChange({
|
||||
@@ -368,7 +317,7 @@ test('only direct UI and voice origins count as explicit Context intent', () =>
|
||||
assert.equal(recordContextSessionUserChange({
|
||||
snapshot,
|
||||
change: { type: 'visibility', origin, layerId: 'radio', enabled: true },
|
||||
effectiveContextMode: 'space-missions',
|
||||
effectiveContextMode: 'flights',
|
||||
}), false);
|
||||
assert.equal(snapshot.userAdded.size, 0);
|
||||
}
|
||||
@@ -526,16 +475,8 @@ test('the teardown guard re-publishes on the way out, so a mid-flight exit is no
|
||||
|
||||
test('the session-starting entry layer is never bookkept as user-added (chip ON→OFF restores exactly)', () => {
|
||||
const snapshot = { enabledLayerIds: new Set(['flights', 'ais-live-vessels']), userAdded: new Set() };
|
||||
// The exact left-panel regression: the rockets enable event lands while the
|
||||
// mode is still being entered (or even null); it must not survive its own exit.
|
||||
for (const effectiveContextMode of ['space-missions', null]) {
|
||||
recordContextSessionUserChange({
|
||||
snapshot,
|
||||
change: { type: 'visibility', layerId: 'rocket-launches', enabled: true, origin: 'user' },
|
||||
effectiveContextMode,
|
||||
});
|
||||
assert.equal(snapshot.userAdded.has('rocket-launches'), false);
|
||||
}
|
||||
// The entry layer's enable event lands while the mode is still being
|
||||
// entered; it must not survive its own exit.
|
||||
recordContextSessionUserChange({
|
||||
snapshot,
|
||||
change: { type: 'visibility', layerId: 'military-awareness', enabled: true, origin: 'user' },
|
||||
@@ -559,10 +500,21 @@ test('mid-session user additions are recorded, removed on disable, and judged ag
|
||||
// A dependency of the mode being ENTERED is not a user addition.
|
||||
recordContextSessionUserChange({
|
||||
snapshot,
|
||||
change: { type: 'visibility', layerId: 'satellites', enabled: true, origin: 'user' },
|
||||
effectiveContextMode: 'space-missions',
|
||||
change: { type: 'visibility', layerId: 'military', enabled: true, origin: 'user' },
|
||||
effectiveContextMode: 'flights',
|
||||
});
|
||||
assert.equal(snapshot.userAdded.has('satellites'), false);
|
||||
assert.equal(snapshot.userAdded.has('military'), false);
|
||||
// Space Missions is not Context's: it is never bookkept.
|
||||
recordContextSessionUserChange({
|
||||
snapshot,
|
||||
change: { type: 'visibility', layerId: 'rocket-launches', enabled: true, origin: 'user' },
|
||||
effectiveContextMode: 'flights',
|
||||
});
|
||||
assert.equal(
|
||||
snapshot.userAdded.has('rocket-launches'),
|
||||
false,
|
||||
'Space Missions is not Context state',
|
||||
);
|
||||
// Disabling a recorded addition removes it before any exit restore reads it.
|
||||
recordContextSessionUserChange({
|
||||
snapshot,
|
||||
|
||||
@@ -13,10 +13,7 @@ const radioControlsSource = readRadioSource(new URL('./ui/radioControls.js', imp
|
||||
// - session bookkeeping ran AFTER the exit early-return, so the compensating
|
||||
// userAdded.delete never ran on the left-panel chip exit and restoration
|
||||
// resurrected the mission layer the user just disabled;
|
||||
// - the effective mode was read AFTER the entering flag was cleared, so the
|
||||
// entry layer's own enable event was judged against a null mode;
|
||||
// - a failed Space Missions START from the chip route cleared siblings with
|
||||
// no rollback;
|
||||
// - a failed direct Contacts START cleared siblings with no rollback;
|
||||
// - the right-rail entry ignored the activation result entirely.
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
@@ -33,25 +30,20 @@ test('context handler: session bookkeeping runs before the exit early-return', (
|
||||
assert.ok(record < exit, 'bookkeeping must precede the exit check');
|
||||
});
|
||||
|
||||
test('context handler: effective mode is read before the entering flag is cleared', () => {
|
||||
const effective = handler.indexOf('this._contextModeEntering || this._contextMode');
|
||||
const clear = handler.indexOf('this._contextModeEntering = null');
|
||||
assert.ok(effective > 0, 'effective-mode read present');
|
||||
assert.ok(clear > 0, 'entering-flag clear present');
|
||||
assert.ok(effective < clear, 'effective mode must be captured first');
|
||||
test('Space Missions is an ordinary layer the Context handler never enters', () => {
|
||||
assert.doesNotMatch(handler, /'space-missions'/);
|
||||
assert.doesNotMatch(handler, /_contextModeEntering = /);
|
||||
const attach = connectContextManager.toString();
|
||||
assert.doesNotMatch(attach, /rocket-launches|space-missions/);
|
||||
});
|
||||
|
||||
test('cancelled Space Missions entry resolves ownership before settled bookkeeping', () => {
|
||||
test('a cancelled visibility request returns before settled bookkeeping', () => {
|
||||
const cancelled = handler.indexOf("change?.type === 'visibility-cancelled'");
|
||||
const bookkeeping = handler.indexOf('recordContextSessionUserChange(');
|
||||
assert.ok(cancelled > 0, 'cancellation branch present');
|
||||
assert.ok(cancelled < bookkeeping, 'cancellation returns before settled session bookkeeping');
|
||||
const branch = handler.slice(cancelled, handler.indexOf("change?.type === 'visibility-blocked'"));
|
||||
assert.match(branch, /spaceMissionEntryCancellationDisposition\(\{/);
|
||||
assert.match(branch, /cancellationDisposition === 'replacement'[\s\S]*?_contextModeEntering = 'space-missions'[\s\S]*?entryIntent\.intentEpoch === change\.intentEpoch[\s\S]*?_contextModeReplacementIntent = \{[\s\S]*?intentEpoch: change\.successorIntentEpoch/);
|
||||
assert.match(branch, /cancellationDisposition === 'restore'[\s\S]*?_contextModeEntering = null/);
|
||||
assert.match(branch, /_restoreContextSessionAfterLayerSettles\(/);
|
||||
assert.match(branch, /return;/);
|
||||
assert.match(branch, /this\._syncContextModeButtons\(\);\s*return;/);
|
||||
});
|
||||
|
||||
test('direct Context entry captures on the synchronous request boundary', () => {
|
||||
@@ -60,18 +52,29 @@ test('direct Context entry captures on the synchronous request boundary', () =>
|
||||
attach,
|
||||
/subscribeVisibilityRequests\(\(change\) => \{[\s\S]*?shouldCaptureContextSession\(change\)/,
|
||||
);
|
||||
assert.match(
|
||||
attach,
|
||||
/_captureContextSessionSnapshot\(\{\s*excludeLayerIds:\s*\[change\.layerId\],?\s*\}\)/,
|
||||
);
|
||||
});
|
||||
|
||||
test('Clear All defers a newer explicit mission guard until its batch settles', () => {
|
||||
const attach = connectContextManager.toString();
|
||||
assert.match(attach, /shouldDeferContextEntryDuringClear\(\{/);
|
||||
assert.match(attach, /_contextModeDeferredEntryIntent = \{/);
|
||||
assert.match(attach, /await this\._clearSelectedLayersManagerPromise/);
|
||||
assert.match(attach, /await this\._clearLayersOutsideContextMode\(entryMode/);
|
||||
test('only a direct Contacts entry request snapshots the layers', () => {
|
||||
let request;
|
||||
const controls = new ContextControls({
|
||||
elements: {},
|
||||
installations: {},
|
||||
actions: { getCockpit: () => null },
|
||||
});
|
||||
const captures = [];
|
||||
controls._captureContextSessionSnapshot = (options) => captures.push(options);
|
||||
controls._syncContextModeButtons = () => {};
|
||||
controls.connect({
|
||||
subscribe: () => () => {},
|
||||
subscribeVisibilityRequests(listener) {
|
||||
request = listener;
|
||||
return () => {};
|
||||
},
|
||||
});
|
||||
for (const layerId of ['rocket-launches', 'military-awareness'])
|
||||
request({ type: 'visibility-requested', layerId, enabled: true, origin: 'user', intentEpoch: 1 });
|
||||
controls.stop();
|
||||
assert.deepEqual(captures, [{ excludeLayerIds: ['military-awareness'] }]);
|
||||
});
|
||||
|
||||
test('context restore replays explicit companion intent after the stale restore queue drains', () => {
|
||||
@@ -91,7 +94,7 @@ test('context restore settles the Contacts coordinator before dependency fanout'
|
||||
assert.ok(settle > 0, 'Contacts coordinator settlement is present');
|
||||
assert.ok(coordinatorOff > settle, 'Contacts OFF is awaited');
|
||||
assert.ok(fanout > coordinatorOff, 'snapshot fanout starts after Contacts settles');
|
||||
assert.match(restore, /excludeLayerIds: settleContactsCoordinator[\s\S]*?contactsCoordinatorId/);
|
||||
assert.match(restore, /excludeLayerIds: \[[\s\S]*?CONTEXT_INDEPENDENT_LAYER_IDS[\s\S]*?settleContactsCoordinator \? \[contactsCoordinatorId\]/);
|
||||
});
|
||||
|
||||
test('Clear All during the Contacts settle stops the snapshot coming back', () => {
|
||||
@@ -116,7 +119,7 @@ test('context handler: either failed direct Context-shell start rolls the sessio
|
||||
handler.indexOf("change?.type === 'visibility-failed'"),
|
||||
handler.indexOf("change?.type === 'visibility-will-change'"),
|
||||
);
|
||||
assert.match(failedBranch, /\['military-awareness', 'rocket-launches'\]\.includes\(change\.layerId\)/);
|
||||
assert.match(failedBranch, /change\.layerId === 'military-awareness' &&/);
|
||||
assert.match(
|
||||
failedBranch,
|
||||
/_restoreContextSessionAfterLayerSettles\(\s*change\.layerId,\s*\{\s*notificationToken,?\s*\},?\s*\)/,
|
||||
@@ -154,14 +157,14 @@ test('wrapped visibility blocks leave the accessible toast to the wrapper token
|
||||
|
||||
test('every user-facing Context exit route settles through the failure surface', () => {
|
||||
const initPanel = _initGlobalContextPanel.toString();
|
||||
assert.equal((initPanel.match(/void this\._runUserFacingContextAction/g) || []).length, 3);
|
||||
assert.equal((initPanel.match(/void this\._runUserFacingContextAction/g) || []).length, 2);
|
||||
assert.doesNotMatch(initPanel, /falseIsFailure:\s*false/);
|
||||
assert.doesNotMatch(initPanel, /void this\._selectContextMode/);
|
||||
|
||||
const deactivationCalls = [...handler.matchAll(
|
||||
/void this\._trackContextLayerReaction\(\s*this\._runUserFacingContextAction\(\(notificationToken\) =>\s*this\._deactivateContextForLayerChange\(\{ notificationToken \}\),?\s*\),?\s*\)/g,
|
||||
)];
|
||||
assert.equal(deactivationCalls.length, 4, 'dependency and primary layer exits share the caught restore path');
|
||||
assert.equal(deactivationCalls.length, 3, 'dependency and primary layer exits share the caught restore path');
|
||||
assert.doesNotMatch(handler, /void this\._deactivateContextForLayerChange\(\)/);
|
||||
});
|
||||
|
||||
@@ -193,10 +196,7 @@ test('right-rail context entry is transactional: activation result gates the mod
|
||||
const failureBlock = select.slice(activation);
|
||||
assert.match(failureBlock, /activated = await activationIntent\.promise/);
|
||||
assert.match(failureBlock, /catch \(error\) \{\s*activationError = error;/);
|
||||
assert.match(failureBlock, /_contextModeReplacementIntent\?\.generation === generation/);
|
||||
assert.match(failureBlock, /await this\._dataManager\._waitForVisibilityIntent\?\.\(/);
|
||||
assert.match(failureBlock, /outcome\?\.intentEpoch === replacementIntent\.intentEpoch[\s\S]*?outcome\.succeeded === true/);
|
||||
assert.match(failureBlock, /outcome\?\.cancellationReason === 'superseded'[\s\S]*?outcome\.successorEnabled === true[\s\S]*?outcome\.successorIntentEpoch > replacementIntent\.intentEpoch/);
|
||||
assert.match(failureBlock, /activationError\s*\|\|\s*activated === false\s*\|\|\s*!this\._dataManager\.isEnabled\(entryLayerId\)/);
|
||||
assert.match(failureBlock, /cancelledAndSettled\s*=\s*terminalIntentOutcome\?\.succeeded === false/);
|
||||
assert.match(failureBlock, /\['caller-abort', 'resource-abort', 'superseded'\]/);
|
||||
@@ -216,9 +216,11 @@ test('Context entry awaits isolation and direct shell routes isolate in the visi
|
||||
// rests on Context OFF; the honesty lives in the REPORT, not in a racy
|
||||
// attempt to put the prior mode back (see the note above
|
||||
// _restoreContextSessionAfterLayerSettles).
|
||||
const capture = select.indexOf('this._captureContextSessionSnapshot(');
|
||||
assert.ok(capture > 0, 'Context snapshot capture is missing');
|
||||
const crossMode = select.slice(
|
||||
select.indexOf('const crossModeSwitch = Boolean('),
|
||||
select.indexOf('this._captureContextSessionSnapshot();'),
|
||||
capture,
|
||||
);
|
||||
assert.ok(crossMode, 'cross-mode teardown block is missing');
|
||||
assert.doesNotMatch(crossMode, /if \(signal\?\.aborted\)[\s\S]*?await this\._restoreContextSession/);
|
||||
@@ -242,10 +244,10 @@ test('Context entry awaits isolation and direct shell routes isolate in the visi
|
||||
assert.match(ContextControls.prototype.stop.toString(), /this\._contextModeGeneration\+\+/);
|
||||
|
||||
const guard = connectContextManager.toString();
|
||||
assert.match(guard, /\['military-awareness', 'rocket-launches'\]\.includes\(change\.layerId\)/);
|
||||
assert.match(guard, /change\.layerId !== 'military-awareness'/);
|
||||
assert.match(guard, /const notificationToken\s*=\s*change\.notificationToken\s*\|\|\s*Symbol\('direct-context-shell-entry'\)/);
|
||||
assert.match(guard, /this\._userFacingContextNotificationTokens\.add\(notificationToken\)/);
|
||||
assert.match(guard, /await this\._clearLayersOutsideContextMode\(entryMode,\s*\{\s*notificationToken,?\s*\}\)/);
|
||||
assert.match(guard, /await this\._clearLayersOutsideContextMode\(null,\s*\{\s*notificationToken,?\s*\}\)/);
|
||||
assert.match(
|
||||
guard,
|
||||
/await this\._restoreContextSession\(\{\s*excludeLayerIds: \[change\.layerId\],\s*notificationToken,\s*\}\)/,
|
||||
|
||||
@@ -2,7 +2,9 @@ import { renderApplicationHtml } from './testSupport/applicationHtml.mjs';
|
||||
import { readStylesheet } from './testSupport/readStylesheet.mjs';
|
||||
import { _selectContextMode } from './ui/contextTransactions.js';
|
||||
import { _initGlobalContextPanel } from './ui/contextBindings.js';
|
||||
import { ContextControls } from './ui/contextControls.js';
|
||||
import { clearSelectedLayers } from './ui/contextActions.js';
|
||||
import { PANEL_RAIL_ITEMS } from './ui/panelRailCatalog.js';
|
||||
import { readFileSync as readRadioSource } from 'node:fs';
|
||||
const radioBindings = readRadioSource(
|
||||
new URL('./ui/radioBindings.js', import.meta.url),
|
||||
@@ -21,43 +23,24 @@ const html = await renderApplicationHtml(
|
||||
);
|
||||
const css = readStylesheet(new URL('../style.css', import.meta.url));
|
||||
|
||||
test('Contacts and Space Missions both participate in the ordinary Tab sequence', () => {
|
||||
for (const id of [
|
||||
'global-context-flights-btn',
|
||||
'global-context-missions-btn',
|
||||
]) {
|
||||
const button = html.match(
|
||||
new RegExp(`<button id="${id}"[\\s\\S]*?</button>`),
|
||||
);
|
||||
assert.ok(button, `${id} is missing`);
|
||||
assert.match(button[0], /role="tab"/);
|
||||
assert.match(button[0], /tabindex="0"/);
|
||||
}
|
||||
|
||||
// The view keeps both tabs' tabindex static and never disables them; the
|
||||
// transition itself is covered over happy-dom in ui/contextPanel.test.mjs.
|
||||
for (const id of [
|
||||
'global-context-flights-btn',
|
||||
'global-context-missions-btn',
|
||||
]) {
|
||||
const tag = contextView.match(new RegExp(`<button id="${id}"[^>]*>`))?.[0];
|
||||
assert.ok(tag, `${id} is missing from the view`);
|
||||
assert.doesNotMatch(tag, /:tabindex|:disabled|\sdisabled/);
|
||||
}
|
||||
test('Contacts stays in the keyboard sequence and Space Missions owns its rail item', () => {
|
||||
const button = html.match(
|
||||
/<button id="global-context-flights-btn"[\s\S]*?<\/button>/,
|
||||
)?.[0];
|
||||
assert.ok(button, 'Contacts control is missing');
|
||||
assert.match(button, /role="tab"/);
|
||||
assert.match(button, /tabindex="0"/);
|
||||
const tag = contextView.match(/<button id="global-context-flights-btn"[^>]*>/)?.[0];
|
||||
assert.ok(tag, 'Contacts control is missing from the view');
|
||||
assert.doesNotMatch(tag, /:tabindex|:disabled|\sdisabled/);
|
||||
assert.doesNotMatch(html, /id="global-context-missions-btn"/);
|
||||
assert.match(html, /id="space-missions-panel"[^>]*data-panel-id="space-missions-panel"/);
|
||||
assert.equal(PANEL_RAIL_ITEMS['space-missions-panel'].icon, 'rocket_launch');
|
||||
});
|
||||
|
||||
test('Context activation and Clear All never native-disable tabs and guard repeated clicks', () => {
|
||||
const init = _initGlobalContextPanel.toString();
|
||||
const select = _selectContextMode.toString();
|
||||
const clear = clearSelectedLayers.toString();
|
||||
assert.equal(
|
||||
(
|
||||
init.match(
|
||||
/if \(\s*this\.destroyed\s*\|\|\s*this\._contextModeChanging\s*\|\|\s*this\._clearSelectedLayersPromise\s*\)\s*return;/g,
|
||||
) || []
|
||||
).length,
|
||||
2,
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
select,
|
||||
/_globalContext(?:Flights|Missions)Btn\.disabled\s*=\s*true/,
|
||||
@@ -68,17 +51,29 @@ test('Context activation and Clear All never native-disable tabs and guard repea
|
||||
);
|
||||
});
|
||||
|
||||
test('Context tablist retains Left, Right, Home, and End keyboard navigation', () => {
|
||||
const initSource = _initGlobalContextPanel.toString();
|
||||
assert.match(initSource, /event\.key === 'ArrowRight'/);
|
||||
assert.match(initSource, /event\.key === 'ArrowLeft'/);
|
||||
assert.match(initSource, /event\.key === 'Home'/);
|
||||
assert.match(initSource, /event\.key === 'End'/);
|
||||
assert.match(
|
||||
initSource,
|
||||
/contextTabs\[nextIndex\]\.focus\(\{ preventScroll: true \}\)/,
|
||||
);
|
||||
assert.match(initSource, /contextTabs\[nextIndex\]\.click\(\)/);
|
||||
test('a Contacts click while Context is busy is ignored', () => {
|
||||
const button = new EventTarget();
|
||||
const controls = new ContextControls({
|
||||
elements: { _globalContextFlightsBtn: button },
|
||||
installations: {},
|
||||
actions: { getCockpit: () => null, claimVisualAuthority() {} },
|
||||
});
|
||||
const runs = [];
|
||||
controls._runUserFacingContextAction = (operation) => {
|
||||
runs.push(operation);
|
||||
return Promise.resolve(false);
|
||||
};
|
||||
const click = () => button.dispatchEvent(new Event('click'));
|
||||
controls._contextModeChanging = true;
|
||||
click();
|
||||
controls._contextModeChanging = false;
|
||||
controls._clearSelectedLayersPromise = Promise.resolve();
|
||||
click();
|
||||
assert.equal(runs.length, 0, 'a transition or Clear All in flight drops it');
|
||||
controls._clearSelectedLayersPromise = null;
|
||||
click();
|
||||
assert.equal(runs.length, 1, 'an idle panel takes the click');
|
||||
controls.stop();
|
||||
});
|
||||
|
||||
test('Context tabs draw a visible keyboard-focus outline including active tabs', () => {
|
||||
@@ -102,7 +97,6 @@ test('Context tabs draw a visible keyboard-focus outline including active tabs',
|
||||
});
|
||||
|
||||
test('Context async action buttons remain focused while busy', () => {
|
||||
const init = _initGlobalContextPanel.toString();
|
||||
const radio = radioBindings.slice(
|
||||
radioBindings.indexOf('const toggleRadio = async (trigger) => {'),
|
||||
radioBindings.indexOf('this._storeToken = this.store?.connect?.('),
|
||||
@@ -113,6 +107,7 @@ test('Context async action buttons remain focused while busy', () => {
|
||||
);
|
||||
const clear = clearSelectedLayers.toString();
|
||||
|
||||
const init = _initGlobalContextPanel.toString();
|
||||
assert.match(init, /if \(this\._installationsSearchBusy\) return;/);
|
||||
assert.doesNotMatch(init, /\.disabled\s*=\s*true/);
|
||||
const search = contextView.match(
|
||||
@@ -220,7 +215,7 @@ test('Context reads as one segmented control with legible type and no halo', ()
|
||||
// open Context title legible; no Context-only rule dims it again.
|
||||
assert.equal(
|
||||
rule(
|
||||
":root:not([data-ui-theme='cyber']) #global-context-panel:not(.collapsed) .panel-title",
|
||||
":root #global-context-panel:not(.collapsed) .panel-title",
|
||||
),
|
||||
'',
|
||||
);
|
||||
|
||||
+226
-33
@@ -6,6 +6,12 @@ import test from 'node:test';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
|
||||
const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..');
|
||||
// The Omnibar's desktop footer (src/ui/styles/omnibar-dock.css) is part of
|
||||
// the cascade below like every other stylesheet; its rules carry the
|
||||
// Omnibar scope, so they are modelled as a layout of their own.
|
||||
const omnibarCss = readStylesheet(
|
||||
path.join(ROOT, 'src/ui/styles/omnibar-dock.css'),
|
||||
);
|
||||
const css = readStylesheet(path.join(ROOT, 'style.css'));
|
||||
|
||||
/*
|
||||
@@ -125,11 +131,56 @@ function specificity(selector) {
|
||||
return [ids, classes, types];
|
||||
}
|
||||
|
||||
/** Flatten style.css into rules carrying their raw media stack. */
|
||||
/** Collapse whitespace and the padding inside brackets of a selector. */
|
||||
const tidySelector = (part) =>
|
||||
part
|
||||
.replace(/\s+/g, ' ')
|
||||
.trim()
|
||||
.replace(/\(\s+/g, '(')
|
||||
.replace(/\s+\)/g, ')');
|
||||
|
||||
/**
|
||||
* A nested selector resolved against its parent rule's selectors, as CSS
|
||||
* nesting does: `&` stands for the parent, and a selector without one is a
|
||||
* descendant of it.
|
||||
*/
|
||||
function nestSelectors(parents, head) {
|
||||
const own = splitTopLevel(head, ',').map(tidySelector).filter(Boolean);
|
||||
if (!parents) return own;
|
||||
return parents.flatMap((parent) =>
|
||||
own.map((part) =>
|
||||
part.includes('&') ? part.replaceAll('&', parent) : `${parent} ${part}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flatten style.css into rules carrying their raw media stack. Nested style
|
||||
* rules (CSS nesting) and media queries nested in a rule are resolved to
|
||||
* full selectors, so a nested rule is modelled like any other.
|
||||
*/
|
||||
function flattenRules(source) {
|
||||
const src = source.replace(/\/\*[\s\S]*?\*\//g, '');
|
||||
const rules = [];
|
||||
const mediaStack = [];
|
||||
// Open blocks, innermost last: media queries and style rules.
|
||||
const stack = [];
|
||||
const mediaStack = () =>
|
||||
stack.filter((frame) => frame.media).map((frame) => frame.media);
|
||||
const parentRule = () =>
|
||||
[...stack].reverse().find((frame) => frame.rule)?.rule || null;
|
||||
const declare = (text) => {
|
||||
const rule = parentRule();
|
||||
const trimmed = text.trim();
|
||||
if (!rule || !trimmed) return;
|
||||
const colon = trimmed.indexOf(':');
|
||||
if (colon < 0) return;
|
||||
const value = trimmed.slice(colon + 1).trim();
|
||||
rule.decls.push({
|
||||
prop: trimmed.slice(0, colon).trim().toLowerCase(),
|
||||
value: value.replace(/\s*!important$/i, '').trim(),
|
||||
important: /!important\s*$/i.test(value),
|
||||
});
|
||||
};
|
||||
let index = 0;
|
||||
let prelude = '';
|
||||
while (index < src.length) {
|
||||
@@ -137,14 +188,13 @@ function flattenRules(source) {
|
||||
if (char === '{') {
|
||||
const head = prelude.replace(/\s+/g, ' ').trim();
|
||||
prelude = '';
|
||||
index += 1;
|
||||
if (head.startsWith('@media')) {
|
||||
mediaStack.push(head.slice('@media'.length).trim());
|
||||
index += 1;
|
||||
stack.push({ media: head.slice('@media'.length).trim() });
|
||||
continue;
|
||||
}
|
||||
if (head.startsWith('@')) {
|
||||
let level = 1;
|
||||
index += 1;
|
||||
while (index < src.length && level > 0) {
|
||||
if (src[index] === '{') level += 1;
|
||||
else if (src[index] === '}') level -= 1;
|
||||
@@ -152,43 +202,34 @@ function flattenRules(source) {
|
||||
}
|
||||
continue;
|
||||
}
|
||||
const close = src.indexOf('}', index);
|
||||
assert.ok(close > index, `unterminated rule block for "${head}"`);
|
||||
const decls = [];
|
||||
for (const raw of src.slice(index + 1, close).split(';')) {
|
||||
const text = raw.trim();
|
||||
if (!text) continue;
|
||||
const colon = text.indexOf(':');
|
||||
if (colon < 0) continue;
|
||||
const value = text.slice(colon + 1).trim();
|
||||
decls.push({
|
||||
prop: text.slice(0, colon).trim().toLowerCase(),
|
||||
value: value.replace(/\s*!important$/i, '').trim(),
|
||||
important: /!important\s*$/i.test(value),
|
||||
});
|
||||
}
|
||||
rules.push({
|
||||
const rule = {
|
||||
order: rules.length,
|
||||
media: [...mediaStack],
|
||||
parts: splitTopLevel(head, ',')
|
||||
.map((part) =>
|
||||
part.trim().replace(/\(\s+/g, '(').replace(/\s+\)/g, ')'),
|
||||
)
|
||||
.filter(Boolean),
|
||||
decls,
|
||||
});
|
||||
index = close + 1;
|
||||
media: mediaStack(),
|
||||
parts: nestSelectors(parentRule()?.parts, head),
|
||||
decls: [],
|
||||
};
|
||||
rules.push(rule);
|
||||
stack.push({ rule });
|
||||
continue;
|
||||
}
|
||||
if (char === ';') {
|
||||
declare(prelude);
|
||||
prelude = '';
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
if (char === '}') {
|
||||
mediaStack.pop();
|
||||
// The last declaration of a block may omit its semicolon.
|
||||
declare(prelude);
|
||||
prelude = '';
|
||||
stack.pop();
|
||||
index += 1;
|
||||
continue;
|
||||
}
|
||||
prelude += char;
|
||||
index += 1;
|
||||
}
|
||||
assert.equal(stack.length, 0, 'unbalanced braces in style.css');
|
||||
return rules;
|
||||
}
|
||||
|
||||
@@ -227,6 +268,29 @@ const RECOGNIZED = new Set([
|
||||
]);
|
||||
|
||||
const DOCKED_RAIL = 'body.context-docked #right-context-rail';
|
||||
|
||||
// The desktop Omnibar layout: the scope its stylesheet nests every rule in.
|
||||
// It applies on the desktop shell (above the 720px phone breakpoint) while
|
||||
// the Omnibar and the voice control share the dock; outside it the legacy
|
||||
// layout below governs.
|
||||
const OMNIBAR_SCOPE =
|
||||
'body:not(.mobile-shell):not(.cockpit-mode):not(.scene-playback-mode):not(.ui-clean-view):not(.recording-mode):where(:has(#gev-omnibar):has(#command-dock > #gev-voice-control))';
|
||||
const OMNIBAR = Object.freeze({
|
||||
dock: `${OMNIBAR_SCOPE} #command-dock`,
|
||||
credit: `${OMNIBAR_SCOPE} :is(#cesium-credits, #gev-credits)`,
|
||||
minimalCredit: `${OMNIBAR_SCOPE}:has(#intel-hud[data-variant='minimal'].active) :is(#cesium-credits, #gev-credits)`,
|
||||
minimalRail: `${OMNIBAR_SCOPE}:not(.context-docked):has(#intel-hud[data-variant='minimal'].active) #right-context-rail`,
|
||||
trays: `${OMNIBAR_SCOPE} #command-dock > :is(#location-bar, #control-panel)`,
|
||||
});
|
||||
// What each Omnibar-scope rule may set on a modelled box; the Omnibar
|
||||
// clearance test resolves every one of them through the full cascade.
|
||||
const OMNIBAR_RECOGNIZED = new Map([
|
||||
[OMNIBAR.dock, new Set(['top', 'bottom', 'height', 'min-height'])],
|
||||
[OMNIBAR.credit, new Set(['bottom'])],
|
||||
[OMNIBAR.minimalCredit, new Set(['bottom'])],
|
||||
[OMNIBAR.minimalRail, new Set(['max-height'])],
|
||||
]);
|
||||
const OMNIBAR_MIN_WIDTH = 721;
|
||||
const ELEMENT_KEYS = [
|
||||
'#cesium-credits',
|
||||
'#command-dock',
|
||||
@@ -300,8 +364,11 @@ function ownBoxEntries() {
|
||||
// So is Stories, with GEV's chrome stepped aside; storiesCredit.test.mjs
|
||||
// pins its attribution placement.
|
||||
if (
|
||||
/^body\.stories-mode:not\(#gs-a\):not\(#gs-b\) #(cesium|gev)-credits$/.test(part)
|
||||
) continue;
|
||||
/^body\.stories-mode:not\(#gs-a\):not\(#gs-b\) #(cesium|gev)-credits$/.test(
|
||||
part,
|
||||
)
|
||||
)
|
||||
continue;
|
||||
entries.push({ rule, part });
|
||||
}
|
||||
}
|
||||
@@ -521,6 +588,22 @@ test('the model refuses every cascade construct it cannot resolve', () => {
|
||||
// Expanded Context covers the right edge top to bottom; the credit row
|
||||
// stops short of it instead (the docked-Context test below).
|
||||
if (part === DOCKED_RAIL) continue;
|
||||
if (part.startsWith(OMNIBAR_SCOPE)) {
|
||||
const allowed = OMNIBAR_RECOGNIZED.get(part);
|
||||
for (const decl of guarded) {
|
||||
if (!allowed?.has(decl.prop))
|
||||
complaints.push(
|
||||
`unrecognized Omnibar rule positions a modelled element: "${part}" (${decl.prop})`,
|
||||
);
|
||||
if (decl.important)
|
||||
complaints.push(`!important on ${decl.prop} of "${part}"`);
|
||||
}
|
||||
if (rule.media.length)
|
||||
complaints.push(
|
||||
`media query on Omnibar rule "${part}": ${rule.media.join(' && ')}`,
|
||||
);
|
||||
continue;
|
||||
}
|
||||
if (!RECOGNIZED.has(part)) {
|
||||
complaints.push(
|
||||
`unrecognized selector positions a modelled element: "${part}" (${guarded.map((d) => d.prop).join(', ')})`,
|
||||
@@ -771,6 +854,116 @@ test('right rail measurement cannot persist into a painted attribution layout',
|
||||
|
||||
// ── Clearance ───────────────────────────────────────────────────────────────
|
||||
|
||||
/** A custom property's value as the Omnibar scope declares it. */
|
||||
function omnibarVar(name) {
|
||||
const decls = RULES.filter((rule) => rule.parts.includes(OMNIBAR_SCOPE))
|
||||
.flatMap((rule) => rule.decls)
|
||||
.filter((decl) => decl.prop === name);
|
||||
assert.equal(decls.length, 1, `${name} is declared once in the Omnibar scope`);
|
||||
return decls[0].value;
|
||||
}
|
||||
|
||||
/** A length in the Omnibar layout, with its scope's own custom properties. */
|
||||
function omnibarPx(value, viewportHeight, where) {
|
||||
const substituted = value.replace(
|
||||
/var\((--omnibar-[\w-]+)\)/g,
|
||||
(_, name) => omnibarVar(name),
|
||||
);
|
||||
return toPx(substituted, viewportHeight, where);
|
||||
}
|
||||
|
||||
test('Omnibar reserves a non-overlapping desktop footer at native credit sizing', () => {
|
||||
// The Omnibar layout resolves through the same cascade as the legacy one:
|
||||
// every legacy rule that could still match competes with the scope's.
|
||||
const trayOpen = [
|
||||
'#command-dock:has(#location-bar:not(.collapsed))',
|
||||
'#command-dock:has(#control-panel:not(.collapsed))',
|
||||
];
|
||||
assert.equal(
|
||||
omnibarVar('--world-timeline-lift'),
|
||||
'0px',
|
||||
'the Omnibar layout holds the timeline lift at 0',
|
||||
);
|
||||
for (const width of WIDTHS.filter((w) => w >= OMNIBAR_MIN_WIDTH)) {
|
||||
for (const height of HEIGHTS) {
|
||||
for (const minimal of [false, true]) {
|
||||
const dock = resolve(
|
||||
['#command-dock', ...trayOpen, OMNIBAR.dock],
|
||||
'bottom',
|
||||
width,
|
||||
'Omnibar dock',
|
||||
);
|
||||
assert.equal(dock.part, OMNIBAR.dock, `the Omnibar owns the dock at ${width}px`);
|
||||
// Its top and height too: a legacy top or height winning here would
|
||||
// move or stretch the dock the clearance below is measured from.
|
||||
for (const [prop, value] of [
|
||||
['top', 'auto'],
|
||||
['height', '56px'],
|
||||
]) {
|
||||
const own = resolve(
|
||||
['#command-dock', ...trayOpen, OMNIBAR.dock],
|
||||
prop,
|
||||
width,
|
||||
`Omnibar dock ${prop}`,
|
||||
);
|
||||
assert.equal(own.part, OMNIBAR.dock, `the Omnibar owns the dock ${prop} at ${width}px`);
|
||||
assert.equal(own.decl.value, value, `Omnibar dock ${prop} at ${width}px`);
|
||||
}
|
||||
const credit = resolve(
|
||||
[
|
||||
...CREDIT_SELECTORS,
|
||||
OMNIBAR.credit,
|
||||
...(minimal ? [MINIMAL_HUD_CREDIT, OMNIBAR.minimalCredit] : []),
|
||||
],
|
||||
'bottom',
|
||||
width,
|
||||
'Omnibar credit',
|
||||
);
|
||||
assert.ok(
|
||||
credit.part.startsWith(OMNIBAR_SCOPE),
|
||||
`the Omnibar owns the credit row at ${width}px`,
|
||||
);
|
||||
const dockBottom = omnibarPx(dock.decl.value, height, 'Omnibar dock bottom');
|
||||
const creditTop =
|
||||
omnibarPx(credit.decl.value, height, 'Omnibar credit bottom') +
|
||||
CREDIT_HEIGHT_PX;
|
||||
assert.ok(
|
||||
dockBottom - creditTop >= MIN_CLEARANCE_PX,
|
||||
`at ${width}x${height}${minimal ? ' (minimal HUD)' : ''} the Omnibar dock (${dockBottom}px) must clear the credit line (${creditTop}px)`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
// No legacy tray opens over the credit: both are hidden in this layout,
|
||||
// and no rule elsewhere forces them back.
|
||||
const trays = RULES.find((rule) => rule.parts.includes(OMNIBAR.trays));
|
||||
assert.ok(trays, 'the Omnibar layout hides the legacy trays');
|
||||
assert.equal(trays.decls.find((decl) => decl.prop === 'display')?.value, 'none');
|
||||
for (const rule of RULES) {
|
||||
for (const part of rule.parts) {
|
||||
if (!/#(location-bar|control-panel)$/.test(lastCompound(part))) continue;
|
||||
assert.ok(
|
||||
!rule.decls.some((decl) => decl.prop === 'display' && decl.important),
|
||||
`"${part}" forces a hidden tray back with !important`,
|
||||
);
|
||||
}
|
||||
}
|
||||
// The minimal-HUD rail cap only shortens the rail, which is anchored at
|
||||
// its top, so it can only add room above the credit.
|
||||
const rail = RULES.find((rule) => rule.parts.includes(OMNIBAR.minimalRail));
|
||||
const cap = rail.decls.find((decl) => decl.prop === '--omnibar-minimal-rail-height');
|
||||
assert.match(cap?.value || '', /^min\(\s*var\(--right-stack-max-height, 70vh\),/);
|
||||
assert.equal(
|
||||
rail.decls.find((decl) => decl.prop === 'max-height')?.value,
|
||||
'var(--omnibar-minimal-rail-height)',
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
omnibarCss,
|
||||
/\.cesium-widget-credits|\.cesium-credit-logoContainer|\.cesium-credit-textContainer/,
|
||||
'the footer uses the original credit text and logo sizing',
|
||||
);
|
||||
});
|
||||
|
||||
test('every open dock tray clears the required credit at every modelled viewport', () => {
|
||||
// Below 900px the tray widens to nearly the viewport and lands on the
|
||||
// bottom-left corner where the credit lives. The clearance is NOT one fixed
|
||||
|
||||
+8
-6
@@ -527,10 +527,15 @@ export function cyberSonarLabelIntensity(
|
||||
return labelDimFactor + (1 - labelDimFactor) * normalized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sonar is an opt-in visual style over any HUD layout: it is on only after
|
||||
* the Display panel's Sonar toggle, a voice request or a legacy Cyber link
|
||||
* turns it on.
|
||||
*/
|
||||
export function isCyberSonarEnabled(
|
||||
root = globalThis.document?.documentElement,
|
||||
) {
|
||||
return root?.dataset?.cyberSonar !== 'off';
|
||||
return root?.dataset?.cyberSonar === 'on';
|
||||
}
|
||||
|
||||
export function setCyberSonarEnabled(
|
||||
@@ -539,9 +544,7 @@ export function setCyberSonarEnabled(
|
||||
) {
|
||||
if (!root?.dataset) return false;
|
||||
root.dataset.cyberSonar = enabled ? 'on' : 'off';
|
||||
if (root.dataset.uiTheme === 'cyber') {
|
||||
applyCyberSonarThemePhase(root, enabled);
|
||||
}
|
||||
applyCyberSonarThemePhase(root, enabled);
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@@ -566,7 +569,6 @@ export function isCyberSonarActive({
|
||||
globalThis.matchMedia?.('(prefers-reduced-motion: reduce)')?.matches ??
|
||||
false;
|
||||
return !!(
|
||||
root?.dataset?.uiTheme === 'cyber' &&
|
||||
isCyberSonarEnabled(root) &&
|
||||
(hudActive ?? hud?.classList?.contains?.('active')) &&
|
||||
!body?.classList?.contains?.('cockpit-mode') &&
|
||||
@@ -583,7 +585,7 @@ export function isCyberMapThemeActive({
|
||||
if (hud === undefined)
|
||||
hud = globalThis.document?.getElementById?.('intel-hud');
|
||||
return !!(
|
||||
root?.dataset?.uiTheme === 'cyber' &&
|
||||
isCyberSonarEnabled(root) &&
|
||||
(hudActive ?? hud?.classList?.contains?.('active')) &&
|
||||
!body?.classList?.contains?.('cockpit-mode')
|
||||
);
|
||||
|
||||
+13
-9
@@ -39,7 +39,7 @@ test('production-transformed sonar defaults retain the document method receiver'
|
||||
const previous = Object.getOwnPropertyDescriptor(globalThis, 'document');
|
||||
const hud = { classList: { contains: (name) => name === 'active' } };
|
||||
const document = {
|
||||
documentElement: { dataset: { uiTheme: 'cyber' } },
|
||||
documentElement: { dataset: { cyberSonar: 'on' } },
|
||||
body: { classList: { contains: () => false } },
|
||||
getElementById(id) {
|
||||
assert.equal(this, document);
|
||||
@@ -57,7 +57,7 @@ test('production-transformed sonar defaults retain the document method receiver'
|
||||
assert.ok(
|
||||
Number.isFinite(compiled.createCyberSonarSampler(800, 600).at(400, 300)),
|
||||
);
|
||||
document.documentElement.dataset.uiTheme = 'tactical';
|
||||
document.documentElement.dataset.cyberSonar = 'off';
|
||||
assert.equal(compiled.isCyberSonarActive(), false);
|
||||
assert.equal(compiled.isCyberMapThemeActive(), false);
|
||||
} finally {
|
||||
@@ -139,8 +139,8 @@ test('the sweep brightens contacts inside its sector and dims the remainder', ()
|
||||
);
|
||||
});
|
||||
|
||||
test('the sonar activates only for a visible Cyber map HUD with motion enabled', () => {
|
||||
const root = { dataset: { uiTheme: 'cyber' } };
|
||||
test('the sonar activates only while on, over a visible map HUD with motion enabled', () => {
|
||||
const root = { dataset: { cyberSonar: 'on' } };
|
||||
const classes = (...values) => ({
|
||||
contains: (value) => values.includes(value),
|
||||
});
|
||||
@@ -220,14 +220,18 @@ test('the opacity setting controls every contact floor and preserves brighter la
|
||||
);
|
||||
});
|
||||
|
||||
test('the sonar control defaults on and records explicit operator state', () => {
|
||||
test('the sonar control defaults off and records explicit operator state', () => {
|
||||
const root = { dataset: {} };
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
// The removed Cyber theme no longer turns it on.
|
||||
root.dataset.uiTheme = 'cyber';
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
assert.equal(setCyberSonarEnabled(true, root), true);
|
||||
assert.equal(root.dataset.cyberSonar, 'on');
|
||||
assert.equal(isCyberSonarEnabled(root), true);
|
||||
assert.equal(setCyberSonarEnabled(false, root), false);
|
||||
assert.equal(root.dataset.cyberSonar, 'off');
|
||||
assert.equal(isCyberSonarEnabled(root), false);
|
||||
assert.equal(setCyberSonarEnabled(true, root), true);
|
||||
assert.equal(root.dataset.cyberSonar, 'on');
|
||||
});
|
||||
|
||||
test('real Cesium points and billboards recover after repeated low/high opacity cycles', () => {
|
||||
@@ -349,10 +353,10 @@ test('the sweep corrects delayed starts and reacquires restarted animations with
|
||||
assert.doesNotThrow(() => syncCyberSonarAnimation({}));
|
||||
});
|
||||
|
||||
test('the selected Cyber theme seeds and releases the compositor sweep phase', () => {
|
||||
test('turning Sonar on seeds and releases the compositor sweep phase', () => {
|
||||
const values = new Map();
|
||||
const root = {
|
||||
dataset: {},
|
||||
dataset: { cyberSonar: 'on' },
|
||||
style: {
|
||||
setProperty: (name, value) => values.set(name, value),
|
||||
removeProperty: (name) => values.delete(name),
|
||||
|
||||
@@ -45,7 +45,7 @@ test('frame sampler matches reference without per-contact settings access', () =
|
||||
});
|
||||
|
||||
test('removed CSS mode cannot disable GPU contacts; unsupported renderers fail closed', () => {
|
||||
const root = { dataset: { uiTheme: 'cyber' }, style: { setProperty() {} } };
|
||||
const root = { dataset: { cyberSonar: 'on' }, style: { setProperty() {} } };
|
||||
const options = {
|
||||
root,
|
||||
body: { classList: { contains: () => false } },
|
||||
@@ -97,7 +97,7 @@ function fixture({ modulation = true, lists = true } = {}) {
|
||||
document: globalThis.document,
|
||||
matchMedia: globalThis.matchMedia,
|
||||
};
|
||||
const root = { dataset: { uiTheme: 'cyber', cyberSonar: 'on' } };
|
||||
const root = { dataset: { cyberSonar: 'on' } };
|
||||
const status = { textContent: '' };
|
||||
const state = { cockpit: false, reducedMotion: false };
|
||||
globalThis.document = {
|
||||
@@ -232,36 +232,47 @@ test('the sweep sets its sector on drawing ticks and at the cadence, and changes
|
||||
f.tick(false);
|
||||
assert.equal(f.sets.length, 4, 'a resize sets it at once');
|
||||
assert.deepEqual(f.sets[3].center, { x: 300, y: 400 });
|
||||
f.root.dataset.cyberSonar = 'off';
|
||||
f.root.dataset.cyberSonarOpacity = '50';
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[4].radius, 0, 'Sonar OFF rests every contact');
|
||||
assert.equal(f.sets.length, 5, 'a setting change sets it at once');
|
||||
assert.equal(
|
||||
f.sets[4].floor,
|
||||
0.5,
|
||||
'while sweeping the floor is the opacity',
|
||||
);
|
||||
f.state.reducedMotion = true;
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[5].radius, 0, 'reduced motion rests the sweep');
|
||||
assert.equal(f.sets[5].floor, 0.5 + 0.5 * 0.46, 'at rest it lifts');
|
||||
clock += 1000;
|
||||
f.tick(true);
|
||||
f.tick(false);
|
||||
assert.equal(f.sets.length, 5, 'at rest only changes set it');
|
||||
f.root.dataset.cyberSonarOpacity = '50';
|
||||
f.tick(false);
|
||||
assert.equal(f.sets.length, 6);
|
||||
assert.equal(f.sets[5].floor, 0.5 + 0.5 * 0.46);
|
||||
assert.equal(f.sets.length, 6, 'at rest only changes set it');
|
||||
f.state.reducedMotion = false;
|
||||
f.state.cockpit = true;
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[6], null, 'out of the map theme it clears');
|
||||
assert.equal(f.sets[6], null, 'out of the map it clears');
|
||||
f.tick(true);
|
||||
assert.equal(f.sets.length, 7, 'cleared once');
|
||||
f.state.cockpit = false;
|
||||
f.root.dataset.cyberSonar = 'off';
|
||||
f.tick(false);
|
||||
assert.equal(f.sets.length, 7, 'Sonar OFF leaves contacts untreated');
|
||||
f.root.dataset.cyberSonar = 'on';
|
||||
f.state.reducedMotion = true;
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[7].radius, 0, 'reduced motion rests the sweep');
|
||||
f.state.reducedMotion = false;
|
||||
f.root.dataset.uiTheme = 'tactical';
|
||||
assert.ok(f.sets[7]?.radius > 0, 'Sonar ON sweeps at once');
|
||||
f.root.dataset.cyberSonar = 'off';
|
||||
f.tick(false);
|
||||
assert.equal(f.sets[8], null, 'another HUD style clears it');
|
||||
assert.equal(f.sets[8], null, 'Sonar OFF clears it');
|
||||
f.tick(true);
|
||||
assert.equal(f.sets.length, 9);
|
||||
// The removed Cyber theme attribute alone does nothing.
|
||||
f.root.dataset.uiTheme = 'cyber';
|
||||
f.tick(false);
|
||||
assert.ok(f.sets[9]?.radius > 0, 'back in Cyber it sweeps at once');
|
||||
assert.equal(f.sets.length, 9);
|
||||
f.root.dataset.cyberSonar = 'on';
|
||||
f.tick(false);
|
||||
assert.ok(f.sets[9]?.radius > 0, 'back on, it sweeps at once');
|
||||
assert.deepEqual(f.requests, [], 'the scene itself never asks for frames');
|
||||
dispose();
|
||||
assert.equal(f.sets[10], null, 'disposal clears it');
|
||||
|
||||
@@ -53,7 +53,7 @@ test('the echo bracket pulses outward from the contact bracket and fades', (t) =
|
||||
assert.ok(half.spreadPx > echo.spreadPx * 0.5);
|
||||
assert.ok(half.spreadPx < echo.spreadPx);
|
||||
assert.ok(half.band < STEPS && half.band >= 1);
|
||||
// The bracket's own dimming (keyhole fade, Cyber sonar sweep) carries
|
||||
// The bracket's own dimming (keyhole fade, sonar sweep) carries
|
||||
// over, and the echo is never drawn brighter than its bracket: a bracket
|
||||
// too dim for even one band draws no echo.
|
||||
assert.equal(at(arrival, 0.25).band, 2);
|
||||
|
||||
@@ -941,13 +941,13 @@ test('a Global Context echo bracket is drawn outside its contact bracket and dim
|
||||
}
|
||||
});
|
||||
|
||||
test('under the Cyber sonar sweep an echo is never brighter than its own bracket', () => {
|
||||
test('under the sonar sweep an echo is never brighter than its own bracket', () => {
|
||||
const env = installEnvironment();
|
||||
// The cyber theme with its HUD open turns the contact sonar on; its sweep
|
||||
// dims brackets it is not passing over.
|
||||
// Sonar on with its HUD open turns the contact sonar on; its sweep dims
|
||||
// brackets it is not passing over.
|
||||
env.document.documentElement = {
|
||||
// The lowest sweep floor, so dimmed brackets drop a whole alpha band.
|
||||
dataset: { uiTheme: 'cyber', cyberSonarOpacity: '35' },
|
||||
dataset: { cyberSonar: 'on', cyberSonarOpacity: '35' },
|
||||
style: { setProperty() {}, removeProperty() {} },
|
||||
};
|
||||
const hud = env.document.createElement('div');
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* How a fleet model's draw item is turned, stretched and coloured
|
||||
* (`fleetModelInstances.js`): pure, no renderer, so it can be read without
|
||||
* the draw port.
|
||||
*/
|
||||
|
||||
/** Every fleet GLB is nose -X: opposite the draw contract's heading 0. */
|
||||
export const FLEET_HEADING_OFFSET_DEG = 180;
|
||||
|
||||
/**
|
||||
* A colour as the draw contract takes it: a CSS string or `[r, g, b, a]`
|
||||
* as given, `{red, green, blue, alpha}` as an array; null for none.
|
||||
*/
|
||||
export function fleetColor(color) {
|
||||
if (color === undefined || color === null) return null;
|
||||
if (typeof color === 'string' || Array.isArray(color)) return color;
|
||||
if (typeof color.red === 'number')
|
||||
return [color.red, color.green, color.blue, color.alpha ?? 1];
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The per-axis stretch a fleet spec draws with on top of its length scale,
|
||||
* along the model's glTF axes (`x` its length, `y` its height, `z` its
|
||||
* beam), or undefined when it keeps its proportions.
|
||||
* @param {object} spec `fleetModelSpec`.
|
||||
* @returns {[number, number, number]|undefined}
|
||||
*/
|
||||
export function fleetAxisScale(spec) {
|
||||
const [length, beam, height] = spec?.scaleXYZ ?? [];
|
||||
if (!(length > 0) || (beam === length && height === length)) return;
|
||||
return [1, height / length, beam / length];
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
import { selectModelEligible } from './modelEligibility.js';
|
||||
import {
|
||||
FLEET_HEADING_OFFSET_DEG,
|
||||
fleetAxisScale,
|
||||
fleetColor,
|
||||
} from './fleetModelDraw.js';
|
||||
import { AIRCRAFT_ENVIRONMENT_MAP_OPTIONS } from './aircraftModelLighting.js';
|
||||
import { fleetModelSet, fleetPartTable } from './fleetModels.js';
|
||||
import { findCamera, findDraw } from '../render/rendererOf.js';
|
||||
@@ -17,8 +22,11 @@ import {
|
||||
* and Rail layers share.
|
||||
*/
|
||||
|
||||
/** Every fleet GLB is nose -X: opposite the draw contract's heading 0. */
|
||||
export const FLEET_HEADING_OFFSET_DEG = 180;
|
||||
export {
|
||||
FLEET_HEADING_OFFSET_DEG,
|
||||
fleetAxisScale,
|
||||
fleetColor,
|
||||
} from './fleetModelDraw.js';
|
||||
|
||||
/** How long (ms) a model whose load failed waits before it loads again. */
|
||||
const RETRY_MS = 5000;
|
||||
@@ -26,31 +34,6 @@ const RETRY_MS = 5000;
|
||||
/** A white tint: what a model under the NVG/FLIR styles draws with. */
|
||||
const WHITE = Object.freeze([1, 1, 1, 1]);
|
||||
|
||||
/**
|
||||
* A colour as the draw contract takes it: a CSS string or `[r, g, b, a]`
|
||||
* as given, `{red, green, blue, alpha}` as an array; null for none.
|
||||
*/
|
||||
export function fleetColor(color) {
|
||||
if (color === undefined || color === null) return null;
|
||||
if (typeof color === 'string' || Array.isArray(color)) return color;
|
||||
if (typeof color.red === 'number')
|
||||
return [color.red, color.green, color.blue, color.alpha ?? 1];
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* The per-axis stretch a fleet spec draws with on top of its length scale,
|
||||
* along the model's glTF axes (`x` its length, `y` its height, `z` its
|
||||
* beam), or undefined when it keeps its proportions.
|
||||
* @param {object} spec `fleetModelSpec`.
|
||||
* @returns {[number, number, number]|undefined}
|
||||
*/
|
||||
export function fleetAxisScale(spec) {
|
||||
const [length, beam, height] = spec?.scaleXYZ ?? [];
|
||||
if (!(length > 0) || (beam === length && height === length)) return;
|
||||
return [1, height / length, beam / length];
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether `point` is inside the eye's view cone (`pose`), a metre's slack.
|
||||
* @param {object} pose The camera port's pose.
|
||||
|
||||
@@ -1827,6 +1827,44 @@ export class LayerLifecycle {
|
||||
await entry.toggleChain.catch(() => {});
|
||||
}
|
||||
|
||||
/**
|
||||
* Wait until a layer's lifecycle queue is idle, following any request that
|
||||
* joins it while waiting, but no longer than `timeoutMs` or `signal` allows.
|
||||
* @param {string} layerId Layer id.
|
||||
* @param {{signal?: AbortSignal, timeoutMs?: number}} [options]
|
||||
* @returns {Promise<boolean>} true once idle; false on timeout or abort.
|
||||
*/
|
||||
async waitForLayerIdle(layerId, { signal, timeoutMs = 30000 } = {}) {
|
||||
const entry = this.layers.get(layerId);
|
||||
if (!entry) return true;
|
||||
if (signal?.aborted) return false;
|
||||
let timer = null;
|
||||
let onAbort = null;
|
||||
const givenUp = new Promise((resolve) => {
|
||||
timer = setTimeout(() => resolve(false), timeoutMs);
|
||||
onAbort = () => resolve(false);
|
||||
signal?.addEventListener('abort', onAbort, { once: true });
|
||||
});
|
||||
try {
|
||||
let pending;
|
||||
do {
|
||||
pending = entry.toggleChain;
|
||||
const idle = await Promise.race([
|
||||
pending.then(
|
||||
() => true,
|
||||
() => true,
|
||||
),
|
||||
givenUp,
|
||||
]);
|
||||
if (!idle) return false;
|
||||
} while (pending !== entry.toggleChain);
|
||||
return true;
|
||||
} finally {
|
||||
clearTimeout(timer);
|
||||
signal?.removeEventListener('abort', onAbort);
|
||||
}
|
||||
}
|
||||
|
||||
_reserveLayerParamsIntent(layerId, params, origin = 'programmatic') {
|
||||
const entry = this.layers.get(layerId);
|
||||
if (
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["São Vicente",-7.442,-37.093,2601,"BR","Q120069910"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Acrelândia",-9.828,-66.883,14021,"BR","Q953086"],["Manoel Urbano",-8.839,-69.26,11996,"BR","Q1772688"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Rodrigues Alves",-7.742,-72.647,14938,"BR","Q1800776"],["Porto Walter",-8.269,-72.744,10735,"BR","Q1772588"],["Jordão",-9.434,-71.884,9222,"BR","Q1800793"],["Santa Rosa do Purus",-9.433,-70.493,6723,"BR","Q1772719"],["Esperanza",-9.799,-70.753,4405,"PE","Q3344870"],["Puerto Inca",-9.379,-74.964,2856,"PE","Q3348305"],["Tournavista",-8.934,-74.703,1472,"PE","Q137700491"],["Honoria",-8.769,-74.709,1422,"PE","Q137700481"],["Yuyapichis",-9.628,-74.975,1286,"PE","Q137700493"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["San José de Sisa",-6.614,-76.694,14639,"PE","Q11034041"],["Soritor",-6.139,-77.104,14310,"PE","Q27194589"],["Saposoa",-6.936,-76.772,12951,"PE","Q3344065"],["Castillo Grande",-9.278,-76.009,12438,"PE","Q137700501"],["Cayaltí",-6.892,-79.562,12257,"PE","Q116762746"],["Bellavista",-7.067,-76.585,12117,"PE","Q3344055"],["Salaverry",-8.221,-78.976,11751,"PE","Q7403730"],["Lamas",-6.422,-76.516,11165,"PE","Q3139869"],["Ascope",-7.714,-79.108,10560,"PE","Q3344017"],["Namballe District",-5.003,-79.088,10492,"PE","Q6319417"],["Picsi",-6.718,-79.77,9251,"PE","Q49278067"],["Morropón",-5.187,-79.971,8949,"PE","Q6024431"],["Picota",-6.921,-76.33,8376,"PE","Q3344087"],["Yungay",-9.139,-77.744,8000,"PE","Q919678"],["Chongoyape",-6.637,-79.394,7842,"PE","Q5767159"],["Lagunas",-5.227,-75.675,7215,"PE","Q27194615"],["Mochumí",-6.548,-79.864,7188,"PE","Q27194530"],["Uchiza",-8.459,-76.463,6997,"PE","Q20621865"],["Tabalosos",-6.388,-76.634,6642,"PE","Q27194591"],["Pucalá",-6.781,-79.611,6445,"PE","Q106098771"],["Llata",-9.55,-76.817,6027,"PE","Q3344864"],["Naranjos",-5.739,-77.504,5913,"PE","Q137684978"],["Oyotún",-6.85,-79.304,5735,"PE","Q27557971"],["Chicama",-7.845,-79.145,5692,"PE","Q5095918"],["Pomabamba",-8.82,-77.461,5667,"PE","Q3322611"],["Orellana",-6.912,-75.157,5432,"PE","Q7101524"],["Pedro Ruiz Gallo",-5.946,-77.977,5361,"PE","Q27194454"],["Quiruvilca",-8.001,-78.31,5181,"PE","Q16623750"],["Huallanca",-9.899,-76.941,5064,"PE","Q5903856"],["Illimo",-6.474,-79.855,5037,"PE","Q17073502"],["Chocopeu",-7.792,-79.223,5037,"PE","Q5103685"],["Mendoza",-6.394,-77.486,4989,"PE","Q3305659"],["Panao",-9.901,-75.998,4848,"PE","Q3344024"],["Mocupe",-6.991,-79.622,4818,"PE","Q116763392"],["Chazuta",-6.571,-76.138,4595,"PE","Q49277326"],["Huicungo",-7.319,-76.776,4548,"PE","Q33446632"],["Pulán",-6.739,-78.92,4492,"PE","Q16623296"],["Zaña",-6.923,-79.584,4253,"PE","Q6171043"],["Pueblo Nuevo",-7.189,-79.514,4014,"PE","Q7258457"],["San Miguel de Pallaques",-7.001,-78.849,3989,"PE","Q11002429"],["Naranjillo",-9.249,-75.994,3945,"PE","Q2884961"],["Huacrachuco",-8.607,-77.149,3945,"PE","Q3344853"],["Moro",-9.139,-78.183,3926,"PE","Q130326439"],["Juan Guerra",-6.584,-76.324,3745,"PE","Q137684968"],["Pomacochas",-5.826,-77.969,3739,"PE","Q27194453"],["Santa Lucía",-8.345,-76.386,3636,"PE","Q137715155"],["Pacanga",-7.171,-79.486,3593,"PE","Q7121871"],["Calzada",-6.03,-77.067,3550,"PE","Q137684952"],["Nuevo Progreso",-8.451,-76.326,3532,"PE","Q130388430"],["Yuracyacu",-5.931,-77.226,3428,"PE","Q137684991"],["Buenos Aires",-5.267,-79.968,3418,"PE","Q49277301"],["Tembladera",-7.252,-79.13,3238,"PE","Q13190929"],["Jesús",-7.249,-78.38,3209,"PE","Q131323854"],["Chaglla",-9.845,-75.903,3108,"PE","Q137700471"],["Hualgayoc",-6.764,-78.607,3101,"PE","Q130336639"],["La Peca",-5.611,-78.437,3081,"PE","Q11982882"],["Jepelacio",-6.108,-76.915,3081,"PE","Q49277624"],["Cacatachi",-6.462,-76.451,3019,"PE","Q137684951"],["Salas",-6.274,-79.605,3008,"PE","Q107851677"],["Molino",-9.91,-76.016,2931,"PE","Q137700498"],["Lonya Grande",-6.096,-78.423,2896,"PE","Q131451947"],["Cátac",-9.802,-77.431,2776,"PE","Q1050130"],["Ripán",-9.829,-76.803,2755,"PE","Q13190560"],["Sócota",-6.315,-78.7,2698,"PE","Q131323944"],["San Martín",-6.514,-76.741,2644,"PE","Q137684992"],["Yaután",-9.512,-77.997,2446,"PE","Q130316672"],["La Jalca",-6.486,-77.816,2390,"PE","Q3374297"],["Chavín de Huántar",-9.589,-77.178,2384,"PE","Q17449251"],["Luya",-6.165,-77.945,2358,"PE","Q13189994"],["Roque",-6.356,-76.775,2339,"PE","Q137684944"],["Jequetepeque",-7.338,-79.563,2313,"PE","Q15229508"],["Chiriaco",-5.161,-78.286,2278,"PE","Q11963566"],["Julcán",-8.05,-78.5,2260,"PE","Q3344059"],["Piscobamba",-8.883,-77.35,2252,"PE","Q3319310"],["Samanco",-9.262,-78.496,2233,"PE","Q130327433"],["Bigote",-5.319,-79.786,2205,"PE","Q124738480"],["Piscoyacu",-6.981,-76.77,2181,"PE","Q137684979"],["San Fernando",-5.901,-77.269,2173,"PE","Q137684964"],["Barranquita",-6.252,-76.033,2163,"PE","Q137684949"],["Huipoca",-8.979,-75.445,2102,"PE","Q107569131"],["Yacus",-9.986,-76.505,2094,"PE","Q137700499"],["Santiago de Cao",-7.959,-79.242,2090,"PE","Q15275280"],["Santa María del Valle",-9.863,-76.17,2064,"PE","Q137700457"],["Chilete",-7.221,-78.84,2023,"PE","Q131323858"],["Acomayo",-9.802,-76.071,2012,"PE","Q135194231"],["Lámud",-6.139,-77.952,1996,"PE","Q2475775"],["Codo del Pozuzo",-9.67,-75.463,1988,"PE","Q20024777"],["Yorongos",-6.139,-77.144,1962,"PE","Q137684990"],["Shamboyacu",-7.024,-76.132,1914,"PE","Q137684984"],["Tres Unidos",-6.806,-76.233,1911,"PE","Q137684989"],["Copallín",-5.675,-78.423,1907,"PE","Q11964086"],["Lluchubamba",-7.519,-77.969,1896,"PE","Q130336589"],["Nepeña",-9.172,-78.359,1873,"PE","Q15919329"],["Cabana",-8.396,-78.016,1858,"PE","Q3305646"],["Malacasí",-5.344,-79.858,1850,"PE","Q125712172"],["Magdalena",-7.251,-78.659,1846,"PE","Q130336591"],["Cajaruro",-5.737,-78.43,1829,"PE","Q49277314"],["Llamellín",-9.101,-77.017,1817,"PE","Q3317415"],["ChontalLine truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["La Legua",-5.235,-80.658,8863,"PE","Q125828154"],["Mórrope",-6.542,-80.015,8680,"PE","Q27194532"],["La Matanza",-5.211,-80.088,6787,"PE","Q27194507"],["Vice",-5.422,-80.774,5972,"PE","Q49278395"],["Bernal",-5.463,-80.742,4007,"PE","Q49277262"],["Laynas",-5.232,-80.052,2493,"PE","Q130436047"],["Yacila",-5.133,-81.173,1690,"PE","Q27968636"],["Port of Bayóvar",-5.824,-81.035,1538,"PE","Q7231083"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Bula Atumba",-8.675,14.795,13454,"AO","Q979174"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Sindang Jaya",-6.903,107.68,14896,"ID","Q11175510"],["Sukawarna",-6.886,107.578,14324,"ID","Q11186629"],["Cipadung Kulon",-6.922,107.706,13997,"ID","Q11173868"],["Isola",-6.852,107.593,13513,"ID","Q11176203"],["Karasak",-6.95,107.608,13493,"ID","Q11174115"],["Sukarasa",-6.877,107.589,13442,"ID","Q11183012"],["Pasir Impun",-6.895,107.677,13333,"ID","Q12503577"],["Cibaduyut",-6.953,107.592,13265,"ID","Q11197161"],["Kebon Pisang",-6.919,107.617,12445,"ID","Q11182775"],["Margasuka",-6.954,107.575,12444,"ID","Q14641123"],["Cisaranten Bina Harapan",-6.914,107.684,12328,"ID","Q12479313"],["Cirangrang",-6.959,107.585,11777,"ID","Q11173692"],["Cipaganti",-6.89,107.604,11694,"ID","Q11175864"],["Ancol",-6.94,107.614,11628,"ID","Q12471984"],["Rancabolang",-6.964,107.692,11340,"ID","Q12507881"],["Cigereleng",-6.94,107.611,11233,"ID","Q12478819"],["Merdeka",-6.913,107.621,11222,"ID","Q12498194"],["Lebak Gede",-6.892,107.616,11063,"ID","Q13199701"],["Mekar Wangi",-6.955,107.606,10935,"ID","Q11174976"],["Ledeng",-6.863,107.599,10792,"ID","Q12494268"],["Situsaeur",-6.945,107.595,10720,"ID","Q11175419"],["Garuda",-6.912,107.576,10565,"ID","Q12483556"],["Cibaduyut Kidul",-6.961,107.592,9461,"ID","Q11190536"],["Pasirkaliki",-6.907,107.602,9148,"ID","Q12503629"],["Cibaduyut Wetan",-6.959,107.599,8630,"ID","Q12478700"],["Babakan Ciamis",-6.913,107.606,8501,"ID","Q11182550"],["Balong Gede",-6.925,107.607,8269,"ID","Q12473848"],["Pamoyanan",-6.903,107.593,7803,"ID","Q12502373"],["Pungkur",-6.93,107.608,7498,"ID","Q13200180"],["Babakan Penghulu",-6.941,107.692,7385,"ID","Q13544024"],["Pakemitan",-6.914,107.698,6481,"ID","Q13544023"],["Braga",-6.918,107.609,6155,"ID","Q11184258"],["Cipetir",-6.839,106.946,5716,"ID","Q11161898"],["Cihapit",-6.907,107.626,4058,"ID","Q12478837"],["Cipadung Wetan",-6.932,107.713,3583,"ID","Q12479213"],["Palugon",-7.237,108.671,2672,"ID","Q10969606"],["Citarum",-6.905,107.616,2250,"ID","Q12479343"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Wukirsari",-7.658,110.444,11500,"ID","Q12524899"],["Sambungmacan",-7.361,111.112,5009,"ID","Q4264536"],["Musi",-8.171,114.743,3085,"ID","Q18366899"],["Sumberejo",-7.93,110.861,2654,"ID","Q4208636"],["Tambong",-8.255,114.303,2579,"ID","Q12519030"],["Solor",-7.829,114.067,2527,"ID","Q12515858"],["Kecer",-6.95,113.802,2154,"ID","Q14634390"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Ubud",-8.497,115.263,10873,"ID","Q12522907"],["Kediri",-8.565,115.132,10353,"ID","Q20463891"],["Besakih",-8.375,115.45,7197,"ID","Q2899831"],["Canggu",-8.641,115.143,7088,"ID","Q2543000"],["Padangbai",-8.532,115.51,3294,"ID","Q1910262"],["Bengkala",-8.114,115.175,3000,"ID","Q13568788"],["Bengkel",-8.59,115.093,2390,"ID","Q13490146"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Pante Macassar",-9.2,124.383,8793,"TL","Q263005"],["Batugade",-8.959,124.951,3164,"TL","Q811044"],["Fatukoto",-9.709,124.216,2030,"ID","Q14627747"],["Inbate",-9.426,124.375,1187,"ID","Q12486427"],["Pulau Buaya",-8.176,124.373,1171,"ID","Q12506723"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Baucau",-8.467,126.45,14961,"TL","Q811130"],["Ermera",-8.752,125.397,13142,"TL","Q1355919"],["Lospalos",-8.517,127.033,12782,"TL","Q1017098"],["Turiscai",-8.823,125.707,11258,"TL","Q2460763"],["Manatuto",-8.517,126.017,9022,"TL","Q1011873"],["Suai",-9.3,125.25,8243,"TL","Q582712"],["Gleno",-8.723,125.435,8133,"TL","Q1018872"],["Bobonaro",-9.032,125.325,6110,"TL","Q55574072"],["Viqueque",-8.85,126.367,6078,"TL","Q1011863"],["Liquiçá",-8.594,125.327,5152,"TL","Q946959"],["Metinaro",-8.533,125.733,4316,"TL","Q18201468"],["Maubisse",-8.838,125.597,3370,"TL","Q1506450"],["Ainaro",-8.983,125.5,3085,"TL","Q108908310"],["Aileu",-8.717,125.567,2927,"TL","Q405087"],["Acanuno",-8.556,125.648,2562,"TL","Q22045079"],["Same",-9,125.65,2100,"TL","Q932640"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Daru",-9.083,143.2,12879,"PG","Q499375"],["Kiunga",-6.117,141.3,8265,"PG","Q985928"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Alexishaven",-5.083,145.8,10377,"PG","Q1626709"],["Wau",-7.339,146.717,9442,"PG","Q954956"],["Finschhafen",-6.6,147.85,1240,"PG","Q15217719"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Gizo",-8.1,156.85,7177,"SB","Q1236908"],["Munda",-8.328,157.271,4850,"SB","Q617069"],["Wagina Island",-7.439,157.767,1636,"SB","Q2713838"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Auki",-8.768,160.697,6811,"SB","Q538476"],["Burns Creek, Honiara",-9.423,160.024,5000,"SB","Q25042019"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Funafuti",-8.505,179.117,6025,"TV","Q34126"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Kaputa",-8.517,29.317,9210,"ZM","Q770286"],["Chienge",-8.774,29.08,9161,"ZM","Q996085"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Imalinyi",-9.183,34.633,10272,"TZ","Q10998287"],["Mdandu",-9.147,34.692,9497,"TZ","Q6802855"],["Lupata",-9.3,33.85,8552,"TZ","Q6704665"],["Matamba",-8.983,33.967,7505,"TZ","Q13123967"],["Lusungo",-9.5,33.983,7337,"TZ","Q6705340"],["Kabula",-9.267,33.767,6368,"TZ","Q6344457"],["Masukulu",-9.4,33.75,5521,"TZ","Q6785674"],["Wangama",-6.933,34.317,5387,"TZ","Q7967795"],["Ikama",-9.267,33.833,4732,"TZ","Q5995334"],["Ikolo",-9.65,33.9,4647,"TZ","Q5996092"],["Mwansanga",-8.767,33.533,2939,"TZ","Q6944690"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Makunduchi",-6.413,39.552,14728,"TZ","Q3843701"],["Mwaya",-8.917,36.833,12122,"TZ","Q6272943"],["Kalenga",-7.8,35.6,11491,"TZ","Q6352119"],["Ikondo, Njombe",-9.1,35.266,6655,"TZ","Q5996149"],["Mahanje",-9.933,35.333,6002,"TZ","Q35722686"],["Nyamisati",-7.795,39.275,1142,"TZ","Q10604328"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Tafuna",-14.336,-170.72,7988,"US","Q1019488"],["Vaitele",-13.82,-171.78,7972,"WS","Q9368101"],["Nuʻuuli",-14.319,-170.724,6345,"US","Q3879172"],["Pago Pago",-14.279,-170.701,3656,"US","Q51678"],["Faleniu",-14.332,-170.744,3426,"US","Q3738616"],["Leone",-14.344,-170.785,2902,"AS","Q1773774"],["'Ili'ili",-14.352,-170.747,2497,"US","Q3596207"],["Aua",-14.267,-170.65,2336,"US","Q609232"],["Afega",-13.8,-171.817,1998,"WS","Q2038921"],["Fagatogo",-14.283,-170.69,1445,"US","Q1257213"],["Lepa, Samoa",-14.033,-171.517,1429,"WS","Q2586194"],["Leulumoega",-13.817,-171.917,1184,"WS","Q1944685"],["Fagaʻalu",-14.296,-170.684,1122,"US","Q3738319"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Mata-Utu",-13.283,-176.174,1075,"FR","Q31002"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Historic Centre of Salvador da Bahia",-12.967,-38.5,2253,"BR","Q5572706"],["Maragogipinho",-13.054,-38.965,1720,"BR","Q61727521"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Alvorada",-12.48,-49.125,8802,"BR","Q22060164"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Costa Marques",-12.445,-64.227,12627,"BR","Q656758"],["Alto Alegre dos Parecis",-12.128,-61.851,11479,"BR","Q1802050"],["Cabixi",-13.498,-60.554,8174,"BR","Q940433"],["Pimenteiras do Oeste",-13.482,-61.047,2156,"BR","Q1803105"],["Baures",-13.583,-63.583,2127,"BO","Q811831"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Santa Ana del Yacuma",-13.744,-65.427,12783,"BO","Q1819433"],["Reyes",-14.296,-67.335,11478,"BO","Q913102"],["Capixaba",-10.573,-67.676,10392,"BR","Q1800737"],["Assis Brasil",-10.911,-69.582,8100,"BR","Q1754403"],["Sandia",-14.233,-69.433,8000,"PE","Q3344209"],["Usicayos",-14.125,-69.967,2409,"PE","Q130541387"],["Quilcapuncu",-14.893,-69.73,2280,"PE","Q130541411"],["San Buenaventura",-14.435,-67.541,2264,"BO","Q164003"],["Apolo",-14.716,-68.418,2123,"BO","Q2307341"],["Iñapari",-10.945,-69.577,1890,"PE","Q1899785"],["Muñani",-14.768,-69.953,1885,"PE","Q130541380"],["Putina Punco",-14.112,-69.048,1756,"PE","Q131399964"],["Ixiamas",-13.768,-68.126,1733,"BO","Q2068157"],["San Juan del Oro",-14.221,-69.154,1582,"PE","Q130541416"],["Limbani",-14.15,-69.691,1497,"PE","Q130541414"],["Phara",-14.152,-69.665,1306,"PE","Q130541419"],["Planchón",-12.278,-69.153,1297,"PE","Q107860650"],["Massiapo",-14.09,-69.243,1200,"PE","Q130541420"],["Cuyocuyo",-14.47,-69.537,1106,"PE","Q130541417"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Ascensión",-12.784,-74.978,14915,"PE","Q131451556"],["Atalaya",-10.733,-73.75,12946,"PE","Q3322627"],["Pichari",-12.52,-73.828,12050,"PE","Q7190625"],["Macusani",-14.069,-70.431,11707,"PE","Q3348229"],["Talavera de la Reyna",-13.654,-73.429,11691,"PE","Q9355344"],["Urcos",-13.686,-71.623,10614,"PE","Q2989619"],["Satipo",-11.254,-74.637,10052,"PE","Q3057885"],["Pampas",-12.399,-74.867,9973,"PE","Q2725364"],["Písac",-13.421,-71.85,9796,"PE","Q950398"],["Tamburco",-13.622,-72.873,9171,"PE","Q131187833"],["Puerto Bermúdez",-10.296,-74.938,6168,"PE","Q27213542"],["Kimbiri",-12.488,-73.842,5913,"PE","Q11687201"],["Mariscal Cáceres",-12.39,-74.858,5420,"PE","Q131176125"],["Río Negro",-11.208,-74.66,5262,"PE","Q130483344"],["Nuñoa",-14.478,-70.636,4641,"PE","Q27194667"],["Acomayo",-13.917,-71.681,4532,"PE","Q2582682"],["Paucartambo",-13.316,-71.592,4309,"PE","Q2989631"],["Chalhuanca",-14.295,-73.244,4297,"PE","Q879065"],["Tambobamba",-13.946,-72.175,4063,"PE","Q879051"],["Chinchero",-13.396,-72.06,3765,"PE","Q26764442"],["Palmapampa",-12.768,-73.656,3608,"PE","Q130369727"],["Coasa",-13.987,-70.018,3388,"PE","Q130541388"],["Yanaoca",-14.218,-71.432,3307,"PE","Q2989624"],["Churcampa",-12.723,-74.421,3306,"PE","Q3348281"],["Llochegua",-12.41,-73.906,3224,"PE","Q130369715"],["Chuquibambilla",-14.105,-72.708,3105,"PE","Q879071"],["Ollantaytambo",-13.258,-72.263,3050,"PE","Q916382"],["Antauta",-14.3,-70.292,2908,"PE","Q130541403"],["Maranganí",-14.357,-71.169,2887,"PE","Q13190024"],["Velille",-14.508,-71.886,2883,"PE","Q131399783"],["Santa Rosa",-14.607,-70.787,2858,"PE","Q131399949"],["Quichuas",-12.473,-74.767,2706,"PE","Q130371068"],["Ollachea",-13.794,-70.472,2700,"PE","Q130541390"],["Urubamba",-13.304,-72.117,2700,"PE","Q2304483"],["Ayapata",-13.777,-70.323,2622,"PE","Q130541385"],["Lucre",-13.635,-71.746,2612,"PE","Q13189987"],["Vilcashuamán",-13.653,-73.954,2577,"PE","Q2475760"],["Macari",-14.772,-70.903,2527,"PE","Q13190027"],["Huancabamba",-13.734,-73.35,2492,"PE","Q131187838"],["Quebrada Honda",-12.682,-72.278,2433,"PE","Q13191015"],["Boca Colorado",-12.619,-70.394,2252,"PE","Q107860921"],["Huancarama",-13.645,-73.086,2225,"PE","Q131451845"],["Pampa Cangallo",-13.558,-74.196,2115,"PE","Q130369697"],["Antabamba",-14.365,-72.878,2061,"PE","Q879057"],["Mantaro",-12.324,-73.94,2039,"PE","Q130492438"],["Ancahuasi",-13.457,-72.3,1921,"PE","Q130492417"],["Cabana",-14.289,-73.967,1891,"PE","Q131324820"],["Pillcopata",-12.911,-71.405,1858,"PE","Q21294423"],["Pucyura",-13.479,-72.112,1853,"PE","Q130492418"],["Huancarani",-13.503,-71.655,1842,"PE","Q130492443"],["Huaro",-13.69,-71.641,1833,"PE","Q20622303"],["Querobamba",-14.012,-73.839,1799,"PE","Q2918849"],["Chincheros",-13.518,-73.723,1797,"PE","Q878820"],["Quince Mil",-13.231,-70.754,1759,"PE","Q5573415"],["Paruro",-13.763,-71.849,1750,"PE","Q2989645"],["Huancapi",-13.75,-74.064,1748,"PE","Q950080"],["Maras",-13.333,-72.156,1730,"PE","Q1026235"],["Llalli",-14.933,-70.881,1709,"PE","Q130541405"],["Cachimayo",-13.477,-72.068,1673,"PE","Q130492416"],["Huyro",-13.007,-72.554,1619,"PE","Q130492433"],["Cotabambas",-13.747,-72.356,1604,"PE","Q13189891"],["Mollepata",-13.509,-72.528,1589,"PE","Q130489438"],["Lanlacuni Bajo",-13.439,-70.402,1572,"PE","Q130541389"],["Limatambo",-13.48,-72.443,1562,"PE","Q11161861"],["Huanoquite",-13.682,-72.018,1546,"PE","Q130492440"],["Poroy",-13.497,-72.043,1502,"PE","Q20619475"],["Quellouno",-12.636,-72.557,1496,"PE","Q130312712"],["San Pedro de Coris",-12.578,-74.412,1460,"PE","Q131176072"],["Huando",-12.564,-74.947,1447,"PE","Q131176078"],["Acopía",-14.057,-71.493,1440,"PE","Q13189157"],["Zurite",-13.456,-72.255,1437,"PE","Q130492420"],["El Descanso",-14.534,-71.307,1434,"PE","Q130492423"],["Colquemarca",-14.284,-72.04,1427,"PE","Q131399801"],["Canayre",-12.282,-74.023,1413,"PE","Q130369710"],["Livitaca",-14.313,-71.689,1407,"PE","Q130492427"],["Huamanguilla",-13.011,-74.173,1400,"PE","Q130369713"],["Ajoyani",-14.23,-70.224,1381,"PE","Q130541384"],["San Salvador",-13.492,-71.778,1372,"PE","Q20620856"],["Tawantinsuyo",-12.792,-73.622,1362,"PE","Q130492439"],["San Pedro de Hualla",-13.85,-73.951,1360,"PE","Q62779711"],["Sarhua",-13.667,-74.317,1322,"PE","Q13190743"],["Lucanas",-14.622,-74.233,1297,"PE","Q130369735"],["Acoria",-12.643,-74.862,1280,"PE","Q130312758"],["San José",-14.68,-70.16,1258,"PE","Q130541379"],["Huaccana",-13.388,-73.69,1246,"PE","Q131187855"],["Chuschi",-13.585,-74.352,1245,"PE","Q3655811"],["Accha",-13.971,-71.832,1217,"PE","Q96972647"],["Challabamba",-13.216,-71.648,1205,"PE","Q98550153"],["Villa Virgen",-13.002,-73.513,1155,"PE","Q130492435"],["Mara",-14.086,-72.102,1146,"PE","Q131187857"],["San Cristóbal",-14.743,-74.222,1125,"PE","Q130369740"],["Chirumpiari",-12.808,-73.604,1122,"PE","Q130492437"],["Progreso",-14.073,-72.476,1113,"PE","Q131187866"],["Julcamarca",-13.014,-74.445,1099,"PE","Q131451558"],["La Esmeralda",-12.683,-74.587,1063,"PE","Q131176066"],["Huachocolpa",-13.032,-74.947,1053,Line truncated
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Pucusana",-12.482,-76.798,14891,"PE","Q7258273"],["San Agustín",-11.972,-75.256,14310,"PE","Q49278126"],["Chilca",-12.519,-76.739,13920,"PE","Q16890238"],["Oxapampa",-10.58,-75.4,12826,"PE","Q1014523"],["Supe Puerto",-10.805,-77.743,12786,"PE","Q3504032"],["Supe",-10.797,-77.713,12492,"PE","Q33499647"],["San Jerónimo de Tunán",-11.949,-75.283,11601,"PE","Q33479561"],["Pativilca",-10.696,-77.774,11467,"PE","Q3368805"],["Yanahuanca",-10.491,-76.514,11333,"PE","Q3344095"],["Quilmaná",-12.95,-76.384,10491,"PE","Q27194717"],["Santa Eulalia",-11.897,-76.663,9941,"PE","Q33481268"],["Chupaca",-12.062,-75.287,9877,"PE","Q3344173"],["Santa Rosa de Sacco",-11.567,-75.956,8956,"PE","Q130483348"],["Yauyos",-11.781,-75.499,8637,"PE","Q130483296"],["Caleta de Carquín",-11.092,-77.627,8049,"PE","Q34789278"],["Ambo",-10.131,-76.205,7444,"PE","Q3317423"],["Huayllay",-11.001,-76.373,6736,"PE","Q13191218"],["Huamancaca Chico",-12.081,-75.242,6581,"PE","Q130483323"],["Aucallama",-11.562,-77.173,6504,"PE","Q137716780"],["Huayucachi",-12.138,-75.223,6477,"PE","Q49277584"],["Huariaca",-10.442,-76.19,6175,"PE","Q137708733"],["Saño",-11.957,-75.257,5491,"PE","Q130483293"],["Ricardo Palma",-11.924,-76.66,5358,"PE","Q33475284"],["Hualhuas",-11.972,-75.251,5251,"PE","Q130483291"],["Sayán",-11.133,-77.195,4422,"PE","Q33481992"],["Chongos Bajo",-12.134,-75.268,3764,"PE","Q131394414"],["San Mateo, Huarochirí Province",-11.761,-76.309,3669,"PE","Q27783597"],["Chiquián",-10.151,-77.156,3641,"PE","Q1074644"],["Matahuasi",-11.894,-75.344,3268,"PE","Q130483339"],["Ahuac",-12.086,-75.321,3137,"PE","Q27194427"],["Sausa",-11.794,-75.484,3060,"PE","Q131394441"],["Yauli",-11.666,-76.087,2993,"PE","Q130483360"],["Quilcas",-11.937,-75.259,2989,"PE","Q130483295"],["Palca",-11.346,-75.569,2724,"PE","Q115164510"],["Tres de Diciembre",-12.11,-75.246,2665,"PE","Q130483326"],["El Carmen",-13.5,-76.058,2639,"PE","Q28314364"],["Santa Ana de Tusi",-10.472,-76.354,2632,"PE","Q137708743"],["Lunahuaná",-12.963,-76.142,2617,"PE","Q1877336"],["Viques",-12.16,-75.232,2589,"PE","Q130483294"],["Tate de La Capilla",-14.156,-75.708,2544,"PE","Q33505671"],["San Pedro de Cajas",-11.251,-75.861,2495,"PE","Q25400021"],["Pucucho",-11.822,-75.392,2459,"PE","Q130483300"],["Ninacaca",-10.856,-76.113,2400,"PE","Q55129680"],["Muquiyauyo",-11.814,-75.454,2311,"PE","Q131394979"],["Pucará",-12.172,-75.145,2220,"PE","Q131395032"],["San Lorenzo",-11.847,-75.382,2165,"PE","Q130483315"],["San Rafael",-10.338,-76.182,2056,"PE","Q137700490"],["Santo Domingo del Prado",-11.898,-75.318,2023,"PE","Q130483338"],["Huácar",-10.16,-76.237,2019,"PE","Q137700482"],["Ocros",-10.404,-77.396,2000,"PE","Q3317427"],["Leticia",-11.377,-75.752,1999,"PE","Q119109056"],["Tomayquichua",-10.078,-76.213,1950,"PE","Q26980595"],["Churin",-10.817,-76.883,1834,"PE","Q5118292"],["Iscozacín",-10.184,-75.15,1814,"PE","Q137708750"],["Cauri",-10.142,-76.626,1704,"PE","Q113368834"],["Canta",-11.467,-76.624,1646,"PE","Q3322638"],["Tapuc",-10.455,-76.462,1644,"PE","Q137708744"],["Sincos",-11.892,-75.387,1454,"PE","Q131394982"],["Castrovirreyna",-13.278,-75.316,1449,"PE","Q3348254"],["Vicco",-10.841,-76.236,1400,"PE","Q42894269"],["Río Grande",-14.52,-75.201,1394,"PE","Q33476950"],["San Miguel",-12.015,-75.346,1387,"PE","Q130483331"],["Vilcabamba",-10.479,-76.447,1364,"PE","Q137708746"],["Margos",-10.005,-76.523,1324,"PE","Q137700452"],["Huancaní",-11.864,-75.414,1321,"PE","Q131395005"],["Goyllarisquizga",-10.475,-76.408,1320,"PE","Q137708737"],["Huáchac",-12.02,-75.341,1311,"PE","Q130483322"],["Pazos",-12.259,-75.07,1301,"PE","Q131176134"],["Huacrapuquio",-12.174,-75.219,1297,"PE","Q130483290"],["Huamalí",-11.807,-75.424,1290,"PE","Q130483306"],["Cajatambo",-10.473,-76.994,1275,"PE","Q2638247"],["Chontabamba",-10.603,-75.439,1221,"PE","Q137708736"],["Huachón",-10.636,-75.951,1221,"PE","Q137708738"],["Paccha",-11.473,-75.96,1213,"PE","Q130312656"],["Ticlacayán",-10.534,-76.164,1212,"PE","Q137708742"],["Aco",-11.958,-75.368,1209,"PE","Q130483333"],["Apata",-11.855,-75.354,1206,"PE","Q131394386"],["Asia",-12.779,-76.557,1198,"PE","Q126021564"],["Santa Rosa",-11.877,-75.295,1198,"PE","Q13190718"],["Pozuzo",-10.067,-75.533,1194,"PE","Q278871"],["San Antonio de Rancas",-10.69,-76.317,1193,"PE","Q137708741"],["Marca",-10.089,-77.474,1191,"PE","Q13190032"],["Huay-Huay",-11.723,-75.905,1130,"PE","Q130483346"],["Quichuay",-11.89,-75.286,1128,"PE","Q13190448"],["San Pedro de Pillao",-10.439,-76.495,1099,"PE","Q137708749"],["Jarpa",-12.126,-75.436,1073,"PE","Q131394496"],["Muqui",-11.833,-75.434,1013,"PE","Q130483302"],["Huancabamba",-10.426,-75.524,1012,"PE","Q137708739"],["Huaricolca",-11.512,-75.653,1011,"PE","Q115239543"],["Ataura",-11.803,-75.438,1006,"PE","Q131394405"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Flying Fish Cove",-10.422,105.678,1599,"AU","Q30980"]]}
|
||||
@@ -0,0 +1 @@
|
||||
{"rows":[["Wadeye",-14.233,129.517,2280,"AU","Q18028"]]}
|
||||
Loaded 100 of 1030 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user