Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@
"@anthropic-ai/sdk": "^0.79.0",
"@aws-sdk/client-s3": "^3.1009.0",
"@clerk/clerk-js": "^5.56.0",
"@deck.gl/aggregation-layers": "^9.2.6",
"@deck.gl/core": "^9.2.6",
"@deck.gl/geo-layers": "^9.2.6",
"@deck.gl/layers": "^9.2.6",
"@deck.gl/mapbox": "^9.2.6",
"@deck.gl/aggregation-layers": "^9.2.11",
"@deck.gl/core": "^9.2.11",
"@deck.gl/geo-layers": "^9.2.11",
"@deck.gl/layers": "^9.2.11",
"@deck.gl/mapbox": "^9.2.11",
"@dodopayments/convex": "^0.2.8",
"@protomaps/basemaps": "^5.7.1",
"@sentry/browser": "^10.39.0",
Expand All @@ -111,7 +111,7 @@
"canvas-confetti": "^1.9.4",
"convex": "^1.32.0",
"d3": "^7.9.0",
"deck.gl": "^9.2.6",
"deck.gl": "^9.2.11",
"dodopayments-checkout": "^1.8.0",
"dompurify": "^3.1.7",
"fast-xml-parser": "^5.3.7",
Expand Down
8 changes: 7 additions & 1 deletion src/components/DeckGLMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ export class DeckGLMap {
private aptGroups: import('@/types').APTGroup[] = [];
private aptGroupsLoaded = false;
private aptGroupsLayerFailed = false;
private satelliteImageryLayerFailed = false;
private iranEvents: IranEvent[] = [];
private aisDisruptions: AisDisruptionEvent[] = [];
private aisDensity: AisDensityZone[] = [];
Expand Down Expand Up @@ -833,6 +834,11 @@ export class DeckGLMap {
if (error.message.includes('apt-groups-layer')) {
this.aptGroupsLayerFailed = true;
}
if (error.message.includes('satellite-imagery-layer')) {
this.satelliteImageryLayerFailed = true;
console.warn('[DeckGLMap] Satellite imagery layer failed (likely Intel GPU driver incompatibility) — rebuilding layer stack without it');
try { this.deckOverlay?.setProps({ layers: this.buildLayers() }); } catch { /* map mid-teardown */ }
}
Comment on lines +837 to +841
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 showLayerWarning() shows the wrong message for a GPU shader failure

showLayerWarning(threshold) was built to tell users "You have more than {threshold} layers active, which may degrade performance" (see t('components.deckgl.layerWarningBody', { threshold }) in src/utils/layer-warning.ts). Calling it here for a GPU shader compilation failure will display a deeply misleading message — the user will believe they have too many layers active, when the real cause is an Intel GPU driver incompatibility.

The apt-groups-layer handler deliberately does not call showLayerWarning() (it only sets the flag), so this is also inconsistent with the existing pattern.

A dedicated warning — even a simple console.warn plus a toast/notification — that explains satellite imagery was disabled due to a GPU compatibility issue would be far more helpful to the user.

Suggested change
if (error.message.includes('satellite-imagery-layer')) {
this.satelliteImageryLayerFailed = true;
showLayerWarning(WARN_THRESHOLD);
}
if (error.message.includes('satellite-imagery-layer')) {
this.satelliteImageryLayerFailed = true;
// TODO: show a GPU-specific warning to the user here
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Removed the misleading showLayerWarning() call. Replaced with a descriptive console.warn targeting the Intel GPU driver incompatibility scenario. The onError callback now logs a clear GPU-specific message instead of incorrectly telling users they have too many layers active.

Comment on lines +837 to +841
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Layer not immediately removed after failure

After setting satelliteImageryLayerFailed = true, no explicit rebuild of the layer stack is triggered. The failed layer remains in deck.gl's render list until the next natural buildLayers() call (e.g., on moveend or zoomend). For the apt-groups-layer this is acceptable since it's a static dataset, but satellite imagery is actively fetched on every viewport change — users may see the broken layer linger.

Consider adding a debouncedRebuildLayers() call to flush the failed layer immediately:

Suggested change
if (error.message.includes('satellite-imagery-layer')) {
this.satelliteImageryLayerFailed = true;
showLayerWarning(WARN_THRESHOLD);
}
if (error.message.includes('satellite-imagery-layer')) {
this.satelliteImageryLayerFailed = true;
showLayerWarning(13);
this.debouncedRebuildLayers();
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Added debouncedRebuildLayers() call immediately after setting satelliteImageryLayerFailed = true. The failed satellite imagery layer is now removed from deck.gl's render list on the very next frame, rather than waiting for the next moveend/zoomend event. Combined with the GPU-specific console.warn (addressing P1), this gives users immediate feedback and correct layer state.

},
});

Expand Down Expand Up @@ -1722,7 +1728,7 @@ export class DeckGLMap {
layers.push(this.createRenewableInstallationsLayer());
}

if (mapLayers.satellites && filteredImageryScenes.length > 0) {
if (mapLayers.satellites && filteredImageryScenes.length > 0 && !this.satelliteImageryLayerFailed) {
layers.push(this.createImageryFootprintLayer(filteredImageryScenes));
}

Expand Down
Loading