Repository navigation
fix: show loading, error, and degraded states with retry (#10) - #22
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…m status (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…as success (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…failed or unsupported (#10) The heatmap compute now pushes validation and out-of-memory error scopes, pops them after the last readback, and races the readbacks against device.lost, so an asynchronous shader or pipeline validation error ends in status error instead of ready. Adds the status model and a stable retry. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…the layer panel (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
… error and SYS NOMINAL (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…from real state (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…graded (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…d keep the narrow header status announced (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…r an empty airports file (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…ows (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…waiting without airports (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…#10) The adapter probe for finding B adds a requestAdapter call at mount, so the compute run count is measured by the device request each run makes. Passes before and after the probe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…ed without airports (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…as target (#10) Real MapLibre error events carry the map as target; react-maplibre sends target: null only when the map cannot be created (finding C). Passes before and after that fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…ayers are still shown (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…ER Failed (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…nder failed (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…r device (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…E layout (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…ATA README note (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
… 0 rows (#10) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Failed or slow loads used to leave an empty map, the toggle still said ON, and the header always said
SYS NOMINAL. Now the app reports its real state:LOADING..., a count such as72,690 FEATURES, orLOAD FAILED, with the error in the tooltip and aRETRYbutton (Retry Airports,Retry Sea Ports). Retry refetches without a page reload and moves focus to the layer checkbox, so focus is never dropped.useAirportsandusePortsgain a stableretryand work with today's fetch, so the Airports layer downloads a 12.7 MB unpinned third-party CSV and parses it on the main thread #9 pipeline work is not affected.AWAITING AIRPORTS,NO AIRPORT DATA,COMPUTING...,READY, orCOMPUTE FAILEDwithRetry Heatmap.useGPUHeatmapnow wraps the compute inpushErrorScope('validation')andpushErrorScope('out-of-memory')scopes and races it against device loss. Asynchronous shader or pipeline validation errors now count as failures, not success (issue comment 2). The adapter is checked once at mount: if the adapter is null, the row is hidden and the panel saysWEBGPU UNAVAILABLE: HEATMAP AND COMPUTE BENCHMARK OFF.SYS LOADING,SYS NOMINAL, orSYS DEGRADED, computed by a purederiveSystemStatusinsrc/status/systemStatus.js. The status element isrole="status"witharia-live="polite", and the list of issues is in its title and in visually hidden text. On narrow screens it stays out of the visual layout (as in Layout breaks on mobile: header text overlaps and panels overflow at 375px #5) but is clipped instead ofdisplay: none, so screen readers still announce it. The collapsed "Sensor layers" toggle shows<n> FAILEDand its accessible name includes that count.Failedif deck reports an error before its device exists, or if MapLibre itself cannot be created. It showsLostwhen the initialized device'slostpromise resolves while the map is mounted. Both make the header DEGRADED.onErrorwith nosourceIdbeforeloadshowsBASEMAP UNAVAILABLE/DATA LAYERS STILL SHOWN. If the map could not be created at all, it showsMAP UNAVAILABLE/WEBGL2 REQUIREDinstead.Unchanged: #4 names and popup focus, #5 layout breakpoints, #7 contrast (every new
color:rule is inTEXT_PAIRS, and RETRY is at least 24x24 with a 2px focus ring), #8 RENDER fromonDeviceInitialized, #11 benchmark, #15 projection.Plan
docs/plans/2026-11-07-issue-10-loading-error-degraded-states.md, committed at ef231b3 before any code. Revisions during the work, each made in the commit that departed from the plan:waitingcounts as LOADING only while airports are loading. Otherwise empty airports would leave the header on LOADING forever.src/App.header.test.jsx.NO AIRPORT DATAalso shows when airports load with 0 airports (AC4); the adapter is checked at mount (AC4, Risks); map creation failure is handled (AC6, AC7); a late deck error after unmount is ignored (AC6); the file list and Proof name every test; the unsupported wording now matches the code.Test evidence
Gate on 570c5f0, every command exited 0:
npm ci: 0 vulnerabilitiesnpm run lint: cleannpm test: 43 files, 391 tests passed (baseline on origin/main was 32 files, 290 tests)npm run build: built; the 500 kB chunk warning was already therenpm audit --omit=dev --audit-level=high: 0 vulnerabilitiesFrozen defect tests, each committed red before its fix:
src/App.status.test.jsx: the issue reproduction. A failed airports or ports load showed no error and the header saidSYS NOMINAL.src/hooks/useGPUHeatmap.asyncValidation.test.js: an async validation error was reported as success.src/App.emptyAirports.test.jsx,src/hooks/useGPUHeatmap.adapterProbe.test.js,src/components/MapView.mapCreate.test.jsx,src/components/MapView.lateError.test.jsx: review findings.Live drive:
vite previewwith Playwright 1.64.1, headless Chromium, swiftshader WebGPU. The implementer and a separate verifier each drove it:raw.githubusercontent.comaborted): AIRPORTS showedLOAD FAILEDwith RETRY, HEATMAP showedNO AIRPORT DATA, and the header readSYS DEGRADED: AIRPORTS FAILED.LOADING..., then72,690 FEATURES. The heatmap reachedREADYand the headerSYS NOMINAL. A window marker survived andperformance.timeOriginwas unchanged, so the page did not reload.1,081 FEATURESand NOMINAL.basemaps.cartocdn.comaborted):BASEMAP UNAVAILABLEappeared, the data layers still drew, and the header readSYS DEGRADED: BASEMAP FAILED.popErrorScope):COMPUTE FAILED, then Retry Heatmap,COMPUTING...,READY.navigator.gpu: the note showed and the header listedWEBGPU UNAVAILABLE.MAP UNAVAILABLE/WEBGL2 REQUIRED, RENDERFailed.WEBGL_lose_context.loseContext(): RENDERLost, and the header readSYS DEGRADED: RENDER LOST.Review findings
First round: three Claude finders (bugs and compliance; security; outside the diff) and two Fable finders (bugs and compliance; edge cases), then delta rounds.
Fixed:
AWAITING AIRPORTSforever. Raised by Claude (three finders); Fable noted it.WEBGPU UNAVAILABLEcould be missing. Raised by Claude and by Fable (both finders).DATA LAYERS STILL SHOWNand RENDER stayedDetecting.... Raised by Claude.render failedinto the global store. Raised by Claude.NO AIRPORT DATAcases, the file list, unsupported wording). Raised by Claude.Left as nits:
unsupported(an adapter present at mount but null on retry), the focused row unmounts and focus falls tobody. Raised by Claude.src/App.emptyAirports.test.jsxheader comment says "0 rows" where the code means 0 airports. It is left as is because frozen tests are not edited.Dismissed:
Verifier: no findings.
Notes:
sourceIdand are ignored by design (AC7).Docs reconciled
src/status/, store health), Known limitations (airports, basemap, RENDER).eslint-disablecomments are the pre-existing ones.Closes #10
🤖 Generated with Claude Code
https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf