mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-08-26 17:31:34 +00:00
fix(activity-log): extend TEXT_HINTS with all observed legacy prefixes + backfill remaining 39 NULL rows (#101)
STEP 1 audit of the live DB revealed 6 distinct prefixes across the 39 residual NULL rows, not just ⏳ WX / ⚠️ Road Incident as originally anticipated: nws_alerts (30): 🌬️ Special Weather Statement (25) — NWS SPS via nws.py ⛈️ Severe Thunderstorm Warning (3) — NWS SVR via nws.py 🌩️ Update: Severe Thunderstorm (1) — NWS update via nws.py ⏳ WX: (1) — legacy composer weather-watch traffic_events (9): ⚠️ Road Incident (7) — incident_handler.py (sub_type incident) 🚫 Road Closed (2) — incident_handler.py (sub_type road_closed/closure) TEXT_HINTS additions: 🌬️ / ⛈️ / 🌩️ → Weather; 🚫 → Traffic. All 6 prefixes are unambiguous (confirmed against formatter source + live data). DB: 39 rows backfilled (audit table only). Final NULL residual = 0. No mesh transmission. Co-authored-by: Matt Johnson <mj@k7zvx.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0857b92788
commit
3ee33015bd
1 changed files with 8 additions and 4 deletions
|
|
@ -62,20 +62,24 @@ const TABLE_LABELS: Record<string, string> = {
|
||||||
// hydro.py → "🌊 …"
|
// hydro.py → "🌊 …"
|
||||||
// swpc.py → "🧲 …" | "☀️ …"
|
// swpc.py → "🧲 …" | "☀️ …"
|
||||||
// quake.py → "🌐 …"
|
// quake.py → "🌐 …"
|
||||||
// nws.py / composer (legacy) → "⏳ WX: …" | "🌡️ …" (heat, PR #96)
|
// nws.py / composer (legacy) → "⏳ WX: …" | "🌡️ …" (heat) | "🌬️ …" | "⛈️ …" | "🌩️ …"
|
||||||
// incident_handler.py (legacy) → "⚠️ Road Incident …"
|
// incident_handler.py (legacy) → "⚠️ Road Incident …" | "🚫 Road Closed …"
|
||||||
// NOTE: more-specific prefixes must appear before shorter ones that share a leading char.
|
// NOTE: more-specific prefixes must appear before shorter ones that share a leading char.
|
||||||
const TEXT_HINTS: Array<[string, string]> = [
|
const TEXT_HINTS: Array<[string, string]> = [
|
||||||
['🔥', 'Fire'],
|
['🔥', 'Fire'],
|
||||||
['🚧', 'Traffic'],
|
['🚧', 'Traffic'],
|
||||||
['⚠️ Road Incident', 'Traffic'], // legacy incident rows (⚠️ = U+26A0+FE0F)
|
['⚠️ Road Incident', 'Traffic'], // legacy road-incident rows (⚠️ = U+26A0+FE0F)
|
||||||
|
['🚫', 'Traffic'], // legacy road-closure rows
|
||||||
['⛷', 'Avalanche'],
|
['⛷', 'Avalanche'],
|
||||||
['🌊', 'Hydro'],
|
['🌊', 'Hydro'],
|
||||||
['🧲', 'Space Wx'],
|
['🧲', 'Space Wx'],
|
||||||
['☀️', 'Space Wx'],
|
['☀️', 'Space Wx'],
|
||||||
['🌐', 'Quake'],
|
['🌐', 'Quake'],
|
||||||
['⏳', 'Weather'], // legacy weather-watch rows: "⏳ WX: …"
|
['⏳', 'Weather'], // legacy weather-watch rows: "⏳ WX: …"
|
||||||
['🌡️', 'Weather'], // legacy heat-alert rows (PR #96 NWS heat format)
|
['🌡️', 'Weather'], // legacy heat-alert rows (NWS heat format)
|
||||||
|
['🌬️', 'Weather'], // legacy NWS wind/SPS rows: "🌬️ Special Weather Statement …"
|
||||||
|
['⛈️', 'Weather'], // legacy NWS severe thunderstorm rows
|
||||||
|
['🌩️', 'Weather'], // legacy NWS thunderstorm-update rows
|
||||||
]
|
]
|
||||||
|
|
||||||
// Type/family tag derived from source_event_table, with text-prefix fallback
|
// Type/family tag derived from source_event_table, with text-prefix fallback
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue