Skip to content

GulfWatch layer renders loading as an all-clear state across every emirate #8

Description

@tg12

Summary

The GulfWatch layer renders every emirate as a clear state whenever alert data has not loaded yet. Loading and unavailable conditions are collapsed into a visually healthy map state.

Evidence

  • client/src/modules/monitor/components/GulfWatchLayer.tsx#L28-L54 explicitly treats alerts absence as a fallback where all emirates render as clear.
  • The fill and outline layers always render once GeoJSON is present; only active labels/markers depend on loaded alerts.
  • There is no separate loading, stale, or unavailable representation for the polygon layer.

Why this matters

  • Users can interpret an unloaded alert feed as a verified all-clear state.
  • This is especially dangerous on a threat-alert surface, where absence of data should never masquerade as absence of threat.
  • Visual calm becomes the default even before source state is known.

Attack or failure scenario

The GulfWatch API is slow, unavailable, or fails during page load. The map still renders UAE emirates with clear-state styling, encouraging the user to infer there are no active alerts.

Root cause

The component uses a healthy-state visual fallback to avoid an empty map instead of representing unknown or loading state honestly.

Recommended fix

  1. Add explicit loading/unavailable state for GulfWatch polygons.
  2. Avoid clear-state styling until alert freshness has been confirmed.
  3. Expose stale/source-state metadata to the map layer.
  4. Add tests covering alert absence, loading, and API failure paths.

Acceptance criteria

  • GulfWatch does not render a healthy all-clear state before alert data is verified.
  • Unknown/loading/unavailable states are visually distinct from clear conditions.
  • Source freshness is available to the layer or parent UI.

Suggested labels

  • bug
  • data-quality
  • ux
  • production-readiness

Severity

High — the map currently turns missing alert data into a visually reassuring state on a threat-monitoring surface.

Confidence

Confirmed — the component explicitly renders all emirates as clear when alerts have not loaded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions