Skip to content

Decouple IEM map images from Map.Enabled/Mapbox#29

Merged
MikeWills merged 1 commit into
masterfrom
fix/iem-maps-without-mapbox
Jul 15, 2026
Merged

Decouple IEM map images from Map.Enabled/Mapbox#29
MikeWills merged 1 commit into
masterfrom
fix/iem-maps-without-mapbox

Conversation

@MikeWills

Copy link
Copy Markdown
Owner

Summary

  • MapService.GetMapUrlAsync no longer gates the IEM autoplot paths (#208 for VTEC alerts, #217 for SPS) behind Map.Enabled — those need no account/token and are now always attempted first.
  • Map.Enabled/AccessToken now only gate the Mapbox fallback, via the existing GetMapboxFallbackUrlAsync (shared with the download-retry fallback path in SocialMediaOrchestrator).
  • Updated doc comments, README "Map Images (Mapbox)" section, and docs/TECHNICAL.md "Map Images — Internals" to reflect the new scope of Map.Enabled.

Why

A fresh install with Map.Enabled: false (the shipped default, since Mapbox setup is optional) got zero map images for ordinary NWS warnings/watches/advisories — confirmed live via a Discord post for an Extreme Heat Warning with no image attached — even though IEM's autoplot images need no Mapbox account at all. SPC Outlook/MCD/ERO were already unaffected since they build their own images independently of MapService.

Test plan

  • dotnet build — 0 errors/warnings
  • dotnet test NwsAlertBot.Tests/NwsAlertBot.Tests.csproj — 97/97 passed
  • Live smoke test against a real VTEC alert with Map.Enabled: false and no Mapbox token, confirming an IEM image now attaches (not automatable — no HTTP mocking in this test project; existing tests are pure-logic-only per project convention)

https://claude.ai/code/session_01CfWmHii9XYmPNBhz5dGDxZ

MapService.GetMapUrlAsync gated its whole body -- including the two
no-account IEM autoplot paths (#208 for VTEC alerts, #217 for SPS) --
behind Map.Enabled, a setting documented and named for Mapbox. A fresh
install with no Mapbox account (the shipped default) got zero map
images for ordinary NWS alerts, even though IEM needs no signup.
Confirmed live: a Discord post for an Extreme Heat Warning had no image.

IEM is now always attempted first regardless of Map.Enabled; that
setting (and AccessToken) only gate the Mapbox fallback, routed through
the existing GetMapboxFallbackUrlAsync so both call sites share one
"is Mapbox usable" check. SPC Outlook/MCD/ERO were already unaffected.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CfWmHii9XYmPNBhz5dGDxZ
@MikeWills
MikeWills merged commit 3500ae7 into master Jul 15, 2026
2 checks passed
@MikeWills
MikeWills deleted the fix/iem-maps-without-mapbox branch July 15, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant