fix(earthquakes): address review follow-ups on click arbitration

A drifting touch tap or a cockpit-mode tap on a fire, quake or vessel card
beside an aircraft did nothing: the cards deferred to the aircraft, whose
click handler ignores such taps. Pick owners can now declare the clicks
they ignore (registerPickOwner(..., { declinesClick })); flights and
military decline a drag or a cockpit tap and CCTV declines any click that
is not clean, so a card over them keeps that tap.

Also from review:
- the selected quake's contour rings sit on the ground the disc is draped
  on, re-read through the heights service while they paint;
- a label's fly-to frames the whole disc for large quakes;
- a quake that ages out of the feed clears its selection as evicted;
- id-less quakes are named by their content, not their row;
- the Bhote Koshi trigger-record callout opens its source on a click, as
  its keyboard action does, and yields like the other cards;
- the card's place line is cut to 48 characters, its link hint shows only
  with an opener, and its accessible name carries depth, place and time; a
  link-less card's click and keyboard action fly to the quake;
- camera trace comparison scales its tolerance with the value and wraps
  heading and roll.
This commit is contained in:
manjunath22466 committed 2026-11-18 19:19:41 +05:30
1 parent fde5f95b45
commit 7312280817
33 files changed
+702 -76

No files matched your search

+28 -3
View File
@@ -37,7 +37,7 @@ test('normalizeEarthquakeSnapshot parses valid GeoJSON earthquake features', ()
});
});
test('normalizeEarthquakeSnapshot generates index-based stable IDs when id is missing or blank', () => {
test('normalizeEarthquakeSnapshot names id-less events by their content, not their row', () => {
const geojson = {
features: [
{
@@ -55,10 +55,35 @@ test('normalizeEarthquakeSnapshot generates index-based stable IDs when id is mi
const rows = normalizeEarthquakeSnapshot(geojson);
assert.equal(rows.length, 2);
assert.equal(rows[0].stableId, 'event-1');
assert.equal(rows[0].stableId, 'event-1711930000000:139.6917:35.6895:25:3.5');
assert.equal(rows[0].usgsId, null);
assert.equal(rows[1].stableId, 'event-2');
assert.equal(
rows[1].stableId,
'event-1711931000000:-70.6693:-33.4489:45.2:5.1',
);
assert.equal(rows[1].usgsId, '');
// A row inserted ahead of them keeps each id-less quake's id, so a selected
// one stays selected across the refresh.
const inserted = normalizeEarthquakeSnapshot({
features: [
{
id: 'us7000new',
geometry: { type: 'Point', coordinates: [10, 20, 5] },
properties: { mag: 4, place: 'New', time: 1711932000000 },
},
...geojson.features,
],
});
assert.deepEqual(
inserted.map((row) => row.stableId).slice(1),
rows.map((row) => row.stableId),
);
// Two id-less events that match exactly stay apart.
const twins = normalizeEarthquakeSnapshot({
features: [geojson.features[0], geojson.features[0]],
});
assert.equal(twins.length, 2);
assert.notEqual(twins[0].stableId, twins[1].stableId);
});
test('normalizeEarthquakeSnapshot filters events below M2.5 without dropping the feed', () => {