Skip to content

No loading, error, or degraded states: failed data loads leave an empty map and SYS NOMINAL #10

Closed

Description

@GeoBradDev

Severity: Medium

When data is loading, fails, or is unavailable, the user sees nothing. The map just stays empty, with no explanation and no way to retry.

Evidence

  • useAirports and usePorts both return { loaded, error }, but App ignores both (https://github.com/GeoBradDev/WebGPU-Example/blob/1f58d46/src/App.jsx#L55-L56). If the GitHub CSV or ports.geojson request fails, the layer is silently empty and the toggle still says ON.
  • No loading indicator appears during the multi-second airport download and parse.
  • Basemap style load failures (BASEMAP_STYLE from CARTO) are not handled. MapLibre's onError is not wired up.
  • The header always shows "SYS NOMINAL" (https://github.com/GeoBradDev/WebGPU-Example/blob/1f58d46/src/App.jsx#L29-L31), even when data failed to load or WebGPU is missing. The status message is hard-coded.
  • When WebGPU is missing, the panel shows "WebGL Fallback" and "COMPUTE --" with no explanation of what is unavailable or why.

Steps to reproduce

  1. In DevTools, block requests to raw.githubusercontent.com.
  2. Reload. No airports appear, AIRPORTS still shows ON, the header says SYS NOMINAL, and no error is shown.

Recommended fix

  • Show a per-layer status in the layer panel: loading spinner or text, feature count when loaded, and an error message with a Retry button.
  • Derive the header status from real state: NOMINAL, DEGRADED (a layer failed), or LOADING.
  • Handle map onError and show a fallback message if the basemap fails.
  • Add a short note or tooltip explaining what WebGPU-only features are unavailable.

Acceptance criteria

  • Each data layer shows loading, loaded (with count), and error states.
  • A failed request can be retried without reloading the page.
  • The header status reflects actual app health.
  • Tests cover the error state of useAirports and usePorts rendering in the UI.

Effort: M

Activity

  1. added
    bugSomething isn't working
    uxUser experience
    on Nov 7, 2026
  2. GeoBradDev commented on Nov 8, 2026

    @GeoBradDev
    OwnerAuthor

    Related degraded state found while fixing #8 (PR #20): RENDER now comes from deck.gl's onDeviceInitialized callback (src/components/MapView.jsx, DeckGLOverlay). If deck fails to create a device, RENDER stays Detecting... forever, and after a lost WebGL context it still shows WebGL2. This fits this issue's "header status reflects actual app health" goal. Suggested addition to the acceptance criteria: a render-device failure or context loss shows an error state in the GPU panel (for example RENDER Failed) and makes the header status DEGRADED.

  3. GeoBradDev commented on Nov 8, 2026

    @GeoBradDev
    OwnerAuthor

    Another silent failure, found while fixing #15 (PR #21): if the heatmap WGSL fails to compile or the pipeline is invalid, useGPUHeatmap (src/hooks/useGPUHeatmap.js, the compute section after createShaderModule) still reports success, so an empty heatmap is drawn and the toggle shows ON. WebGPU validation errors are asynchronous, so they need pushErrorScope('validation') / popErrorScope() or getCompilationInfo(); useGPUCompute already does this after #11. Suggested addition to the acceptance criteria: a heatmap compute failure, including a shader or pipeline validation error, shows the heatmap layer as failed, not as loaded.

  4. added a commit that references this issue on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingseverity:mediumMedium severity findinguxUser experience

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions