Commit graph

346 commits

Author SHA1 Message Date
98e3fcf675 Merge branch 'feature/mesh-intelligence' 2026-06-10 21:03:08 +00:00
b36223146f fix: harden EnvironmentalStore adapter init — isolate failures
- Wrap each adapter registration in try/except via _register_adapter()
- Track failed adapters in _failed_adapters dict with error message
- Add get_status() method for /api/env/status to report failed adapters
- No single adapter failure can abort loading of remaining adapters

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-06-10 20:25:50 +00:00
3dd48b6337 fix: Carbon sweep — TownAnchors + GaugeSites cyan/slate → Carbon tokens
- Replace bg-slate-800/60 and bg-slate-800 with bg-bg-card/bg-bg
- Replace border-slate-700 with border-border
- Replace divide-slate-700/60 with divide-border
- Replace hover:bg-slate-800/50 and hover:bg-slate-700 with hover:bg-bg-hover
- Remove all rounded classes for sharp Carbon edges

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-06-10 19:55:02 +00:00
72611cc148 feat: move Photon geocoder config to config.yaml — public komoot default, local override in deployment config 2026-06-10 19:49:26 +00:00
f65d1d2f59 fix: Carbon sweep — GaugeSites, TownAnchors, Notifications, Alerts — teal/cyan/blue → amber 2026-06-10 19:42:39 +00:00
bce11b2196 fix: Layout.tsx — logo container bg, Carbon nav colors, remove stale blue active states 2026-06-10 19:37:13 +00:00
e181d0c126 feat: MeshAI logo PNG in sidebar, favicon wired 2026-06-10 19:33:58 +00:00
768f6e72ac Merge branch 'feature/mesh-intelligence' 2026-06-10 15:44:54 +00:00
06a5cc23ef fix: Carbon theme — bump muted text tiers for legibility (#333/#444 → #666/#777)
text-[#333] → text-[#666] (63 hits), text-[#444] → text-[#777] (38 hits)
across all tsx/css. Scrollbar thumb #1e1e1e → #2a2a2a.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 15:44:48 +00:00
7de460804f Merge branch 'feature/mesh-intelligence' 2026-06-10 15:37:33 +00:00
d0bf298f89 feat: Carbon theme — amber accent, Inter/JetBrains Mono, sharp corners, traffic-light semantic colors across all components
Global: removed all rounded-lg/md/sm classes, replaced blue-500 with
sky-400 informational, cyan accents with amber across all tsx files.
Environment.tsx + AdapterConfig.tsx: full Carbon color sweep — slate
hierarchy replaced with #333/#444/white tokens, border-border tokens,
font-sans labels, font-mono values. Layout.tsx logo text-[15px].

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 15:37:27 +00:00
f054d80efc Merge branch 'feature/mesh-intelligence' 2026-06-10 14:37:49 +00:00
6b08cdc004 feat: apply Carbon theme — amber accent, Inter/JetBrains Mono, sharp corners, Lucide icons preserved
Carbon palette: #111111/#0d0d0d backgrounds, #1e1e1e borders, traffic-light
data colors (green/red/sky/amber), 10px uppercase card headers, StatCard
colored border-tops, Layout sidebar amber bar + right nav indicator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 14:37:33 +00:00
c0ceddff08 Merge branch 'feature/mesh-intelligence' 2026-06-10 07:19:48 +00:00
88554eb252 feat: dashboard visual overhaul — amber/blue/danger accents, Inter + JetBrains Mono, sharp corners, tighter density
- Tailwind config: semantic color tokens (amber/blue/danger), borderRadius all zero except full, Inter + JetBrains Mono font families
- index.css: Google Fonts imports, sharp scrollbar, scanline card texture, amber-glow utility
- Dashboard.tsx: three-color accent system (amber primary, blue informational, danger alerts), Inter for labels/prose, JetBrains Mono strictly for data values, all rounded corners removed, tighter spacing (p-4 cards, gap-4 grids, space-y-2 lists), underline-style tabs with amber active indicator, band condition dot indicators, source status dots remapped to semantic colors, StatCard supports per-instance value coloring, 36px minimum touch targets on interactive elements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 07:19:38 +00:00
d8867433a1 Merge branch 'feature/mesh-intelligence' 2026-06-10 06:53:59 +00:00
af51c51708 feat: dashboard layout — tabbed alerts/feed, tropo in middle row, fix emoji
- Active Alerts panel now has pill-style tab switcher (Active Alerts | Event Feed)
- LiveEventFeed supports embedded mode (no card wrapper) for tab use
- HepburnTropoCard moved from bottom row to middle row (replaces LiveEventFeed)
- Bottom row removed (empty after tropo card move)
- Fixed broken unicode escapes in BandConditionsCard (satellite, circle, moon emoji)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 06:53:48 +00:00
825df8a3a8 Merge branch 'feature/mesh-intelligence' 2026-06-10 06:15:43 +00:00
3e06aacc3f feat: hepburn tropo card — region selector dropdown persisted to adapter_config
Adds HepburnTropoCard to the dashboard with a 23-region dropdown
selector. Selected region is persisted to adapter_config via
(dashboard, tropo_region) key, defaulting to wam (Western North
America). Image loads from dxinfocentre.com/tr_map/fcst/{code}006.png
with date-based cache busting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 06:15:36 +00:00
ea5b6f5306 Merge branch 'feature/mesh-intelligence' 2026-06-10 06:05:01 +00:00
6989a49f64 fix: periodic health broadcast missing pillars — add full score payload + validity gate
The periodic health_update in main.py only sent score/tier/totals but
no pillars dict. Dashboard setHealth() replaced the full REST response
with this incomplete object, causing all pillar bars to drop to 0.0.

Now sends the complete payload matching mesh_routes.py and ws.py
(pillars, util_percent, flagged_nodes, battery_warnings, recommendations)
and gates on composite > 0 + infra_total > 0 to skip partial state.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 06:04:56 +00:00
6d39da9a31 Merge branch 'feature/mesh-intelligence' 2026-06-10 05:58:03 +00:00
a119de7d86 fix: ws health_update — add coverage pillar + gate broadcast on valid computed score
Coverage pillar was added to mesh_routes.py in 15f2b6c but missed in
the WebSocket serializer, sending undefined for coverage on every WS
push. Also gates the initial health_update broadcast on composite > 0
and infra_total > 0 to prevent partially-initialized HealthScore from
overwriting good REST-fetched data on the frontend.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 05:57:58 +00:00
2a8eb0282b Merge branch 'feature/mesh-intelligence' 2026-06-10 05:54:01 +00:00
5d8a277fa7 feat: dashboard — DB-backed live feed, active alerts, band conditions panel (replace env_store dependency)
- /api/env/active: direct DB queries for fires, nws_alerts, quake_events
  instead of env_store.get_active() (which depends on live NATS data)
- /api/env/swpc: reads band_conditions_broadcasts table, returns ratings
  with slot label (Day/Night Propagation) derived from Mountain Time
- Frontend: replace RFPropagationCard (SFI/Kp/R/S/G charts) with
  BandConditionsCard showing 4-band Good/Fair/Poor ratings
- Remove unused recharts dependency from Dashboard.tsx

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 05:53:55 +00:00
ea22f2154a Merge branch 'feature/mesh-intelligence' 2026-06-10 05:40:26 +00:00
82567c6a90 fix: docker-compose — add 1.1.1.1 fallback to Tailscale MagicDNS resolver
100.100.100.100 resolves .echo6.mesh hostnames (including
central.echo6.mesh for the NATS bus). 1.1.1.1 provides fallback
for public DNS when MagicDNS is unavailable.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 05:40:15 +00:00
c42db799f6 Merge branch 'feature/mesh-intelligence' 2026-06-10 04:26:53 +00:00
6f76c897e5 fix: add missing _dict_to_dataclass branch for EnvironmentalConfig
Without this branch, the environmental config dict falls through to the
bare else clause, storing a raw dict instead of an EnvironmentalConfig
dataclass. This causes AttributeError when accessing env_cfg.enabled or
any nested feed config attributes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 04:26:44 +00:00
c1df20b871 Merge branch 'feature/mesh-intelligence' 2026-06-10 03:56:24 +00:00
15f2b6c89a fix: dashboard — coverage pillar, active alerts env fallback
- Add coverage pillar to /api/health response and _serialize_health_score
- Add coverage to MeshHealth.pillars TypeScript interface
- Add Coverage PillarBar between Utilization and Behavior
- Active Alerts panel: show high-severity env events (immediate/priority)
  as fallback when mesh alerts are empty, with ENV badge

Issues 3 (Live Event Feed) and 4 (RF Propagation): diagnosed as
env feed configuration — SWPC adapter disabled, only ducting feed
loaded, /api/env/active returns 0 events. Not a code bug.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 03:56:12 +00:00
26ba1d96a4 merge: test assertion updates from feature/mesh-intelligence 2026-06-10 03:43:29 +00:00
dcb53ae30c test: update stale assertions post feature/mesh-intelligence merge
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 03:43:06 +00:00
858439c87a merge: feature/mesh-intelligence → main (SWPC standardization, fire halt/tombstone/spotting, NWS truncation + Update detection) 2026-06-10 02:41:10 +00:00
d88c6273ec nws: prefix Update: when incoming alert supersedes a prior broadcast
Add _is_update() helper that checks CAP references field against
nws_alerts table. When any referenced CAP id has last_broadcast_at
set, the wire gets an Update: prefix via _render(prefix=). Applied
in both the new-alert and cold-start-race branches.

References field shape: list of dicts with identifier key containing
the superseded CAP id (urn:oid:...).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 02:40:07 +00:00
860d06c4a3 fix: nws area truncation — configurable word-boundary cap (default 80)
Replace hardcoded 50-char area cap with adapter_config key
nws.area_max_chars (default 80). Truncation now appends ellipsis when
cut, matching the locations_max_chars pattern from the prior commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 02:26:31 +00:00
f5c1724567 fix: nws locations truncation — configurable word-boundary cap (default 120)
Replace hardcoded 40-char locations cap with adapter_config key
nws.locations_max_chars (default 120). Truncation now uses word-boundary
split with ellipsis, matching the swpc _trunc pattern.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-10 02:23:22 +00:00
196e19e76e feat: enable spotting detector — cold-start suppression + pull stub
Stamp last_spotting_broadcast_at on all 23 active fires before enabling
the detector, preventing false positives on first pixel after deploy.
Remove the return None stub from _check_spotting so the convex-hull
perimeter + cooldown logic runs on every attributed FIRMS pixel.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 18:59:51 +00:00
f4930a388f feat: fire halt broadcast + tombstone all-clear (wildfire_halted / wildfire_closed)
Enable _maybe_emit_halt in firms_handler (remove return None stub) so
fires with no FIRMS hotspot activity beyond halt_minimum_seconds emit a
routine wildfire_halted broadcast.

Add tombstone all-clear in wfigs_handler: when a fire is tombstoned and
has last_broadcast_at set (i.e. previously made it to mesh), broadcast a
wildfire_closed message with acres, containment, and location. Fires that
were never broadcast are silently consumed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 17:45:41 +00:00
3ff819eed9 fix: swpc geomag dedup — suppress swpc_alerts/kindex double-broadcast within 10-min window per G-scale
In-memory dict keyed on scale_code (G1-G5) with 600s suppression window.
Only geomag events are deduplicated — flare and proton sub-types have no
cross-adapter overlap. Suppressed events still persist to swpc_events and
event_log (handled=0) for audit trail.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 14:48:35 +00:00
2947af0fe5 fix: swpc _render() — truncate line 2 message at 120-char word boundary
Adds _trunc() helper that cuts at last space before 120 chars and appends
ellipsis. Applied at extraction site and all four _render line2 branches.
Line 3 (SWPC · timestamp) is a formatted fixed string — left unchanged.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 14:39:39 +00:00
be9bcfded4 feat: swpc multi-line wire + GUI wired to real adapter_config keys
swpc_handler.py: rewrite _render() to multi-line format (emoji + New:
prefix + scale/type — detail line — SWPC · time tag). Extract message
and time fields from envelope for line 2/3.

Environment.tsx: replace empty SWPC panel with broadcast threshold
controls — geomag Kp floor (G1-G5), flare class floor (M1-X10),
proton pfu floor (S1-S4). Full adapter_config save/load/discard wiring.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 06:29:18 +00:00
2aa528ae12 docs: avy danger_level scale TODO + fix deploy instructions (no bind mount)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 06:23:29 +00:00
45ca536140 refactor: fire digest — tighter format, 220-byte budget, 7d freshness gate
Query now filters out 100% contained and >7d stale fires. Line format
uses county-only anchor (no Photon geocoder). Greedy 220-byte packing
ensures the digest fits in a single Meshtastic frame.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 05:55:22 +00:00
862d2dce42 feat: auto-cleanup stale fires — prune >7d unflagged + >30d tombstones hourly
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 05:52:42 +00:00
376b0dbb2d feat: add reminders_wfigs.enabled kill switch, default disabled
Adds (reminders_wfigs, enabled) to REGISTRY (default=False) and
gates _tick_adapter() on the flag — when false, wfigs fire reminders
are skipped entirely. Use the digest instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 05:45:25 +00:00
8e810d6e83 fix: enable central feed source toggle for avalanche adapter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 05:32:53 +00:00
a9d4ede68e fix: nullsafe broadcast_pager_alerts in quake panel — prevent geohazards blank page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 05:31:14 +00:00
5624a0bfdb feat: wire avalanche to CENTRAL_AVY — central handler + consumer routing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 05:18:29 +00:00
bf5b346215 fix: avalanche wire format — use _meshai_precomposed bypass so multi-line survives composer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-09 04:17:52 +00:00