From 3ee33015bdc9264ccfb4de1ad85d0d58e58d203d Mon Sep 17 00:00:00 2001 From: malice Date: Wed, 8 Jul 2026 17:03:25 -0600 Subject: [PATCH] fix(activity-log): extend TEXT_HINTS with all observed legacy prefixes + backfill remaining 39 NULL rows (#101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Co-authored-by: Claude Sonnet 4.6 --- work/dashboard-frontend/src/pages/ActivityLog.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/work/dashboard-frontend/src/pages/ActivityLog.tsx b/work/dashboard-frontend/src/pages/ActivityLog.tsx index 6709314..e3d93f0 100644 --- a/work/dashboard-frontend/src/pages/ActivityLog.tsx +++ b/work/dashboard-frontend/src/pages/ActivityLog.tsx @@ -62,20 +62,24 @@ const TABLE_LABELS: Record = { // hydro.py → "🌊 â€Ļ" // swpc.py → "🧲 â€Ļ" | "â˜€ī¸ â€Ļ" // quake.py → "🌐 â€Ļ" -// nws.py / composer (legacy) → "âŗ WX: â€Ļ" | "đŸŒĄī¸ â€Ļ" (heat, PR #96) -// incident_handler.py (legacy) → "âš ī¸ Road Incident â€Ļ" +// nws.py / composer (legacy) → "âŗ WX: â€Ļ" | "đŸŒĄī¸ â€Ļ" (heat) | "đŸŒŦī¸ â€Ļ" | "â›ˆī¸ â€Ļ" | "đŸŒŠī¸ â€Ļ" +// incident_handler.py (legacy) → "âš ī¸ Road Incident â€Ļ" | "đŸšĢ Road Closed â€Ļ" // NOTE: more-specific prefixes must appear before shorter ones that share a leading char. const TEXT_HINTS: Array<[string, string]> = [ ['đŸ”Ĩ', 'Fire'], ['🚧', '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'], ['🌊', 'Hydro'], ['🧲', 'Space Wx'], ['â˜€ī¸', 'Space Wx'], ['🌐', 'Quake'], ['âŗ', '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