feat: Cold Spot Detector / Atmospheric Disturbance Index on Device Bay
Real-time anomaly visualization for temperature/pressure readings on the device-feed dashboard, folklore's two most iconic paranormal markers: sudden cold spots and rapid barometric swings. - lib/coldSpot.ts: pure, directly-testable rolling-baseline tracker (time-aware EMA, since hardware doesn't report on a fixed schedule), cold-spot and pressure-anomaly classifiers, and a composite Atmospheric Disturbance Index that rewards correlated anomalies (a lone signal caps at 50/100; only both deviating together can reach 100) — modeled on evilMeter.ts's threaded-state pattern. - components/ColdSpotPanel.tsx/.css: frost treatment + sparkline for temperature, ripple treatment for pressure, and a crescent-arc composite gauge (GhostLog's evil-meter gauge as the visual family reference) that only appears once a device has reported both sensors. - DevicesPage.tsx: owns per-device baseline state, feeds it from `reading` frames, falls back to the existing generic row for any non-numeric temperature/pressure value. 26 new coldSpot.test.ts cases (warm-up, genuine vs. fluctuation, correlated-vs-solo index, gappy/out-of-order data) and 7 new DevicesPage integration tests. Full suite: 302/302 passing, tsc clean, i18n coverage clean (en/es). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -474,6 +474,16 @@
|
||||
"open": "feed live",
|
||||
"unstable": "feed unstable…",
|
||||
"closed": "feed offline"
|
||||
},
|
||||
"coldSpot": {
|
||||
"callout": "COLD SPOT — {{deviation}} {{unit}} below baseline"
|
||||
},
|
||||
"pressureAnomaly": {
|
||||
"callout": "PRESSURE ANOMALY — {{magnitude}} {{unit}} swing, atmosphere shifting"
|
||||
},
|
||||
"disturbance": {
|
||||
"title": "ATMOSPHERIC DISTURBANCE",
|
||||
"ariaLabel": "atmospheric disturbance index"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -474,6 +474,16 @@
|
||||
"open": "transmisión en vivo",
|
||||
"unstable": "transmisión inestable…",
|
||||
"closed": "transmisión desconectada"
|
||||
},
|
||||
"coldSpot": {
|
||||
"callout": "PUNTO FRÍO — {{deviation}} {{unit}} bajo la base"
|
||||
},
|
||||
"pressureAnomaly": {
|
||||
"callout": "ANOMALÍA DE PRESIÓN — variación de {{magnitude}} {{unit}}, la atmósfera cambia"
|
||||
},
|
||||
"disturbance": {
|
||||
"title": "PERTURBACIÓN ATMOSFÉRICA",
|
||||
"ariaLabel": "índice de perturbación atmosférica"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user