Skip to content

fix(jupyter-widget): MapLibre overlay setProps no longer recurses - #10768

Merged
chrisgervang merged 5 commits into
masterfrom
chr/jupyter-widget-maplibre-setprops
Oct 4, 2026
Merged

chrisgervang merged 5 commits into
masterfrom
chr/jupyter-widget-maplibre-setprops

Conversation

@chrisgervang

@chrisgervang chrisgervang commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Background

With map_provider="maplibre", the jupyter-widget replaces the overlay's setProps so that updates only change layers. The replacement calls deckOverlay.setProps on itself, so the first update from the notebook (e.g. deck.update()) throws RangeError: Maximum call stack size exceeded and the map never changes.

Change List

  • overlay-utils.js: forwardLayerUpdates keeps a bound reference to the original MapLibreOverlay.setProps and forwards only layers
  • maplibre-utils.js: install the override through forwardLayerUpdates
  • Unit test: apply the helper to a MapLibreOverlay without a map and check that layer updates are forwarded and other props are not. The test creates no map and mocks nothing, since a maplibre-gl mock in the shared headless page broke the ScreenGridLayer spec that runs after it in CI

Verified with the jupyter-widget headless specs together with the screen-grid spec, and yarn lint.

@chrisgervang chrisgervang added this to the v9.4 milestone Sep 29, 2026
@chrisgervang
chrisgervang marked this pull request as ready for review September 29, 2026 06:07
@chrisgervang chrisgervang mentioned this pull request Sep 29, 2026
12 of 17 tasks
@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Fixes infinite recursion in map overlay property updates.

The PR appears safe to merge; the layer-update override no longer calls itself, and no outstanding finding remains.

Summary

The PR replaces the recursive MapLibre overlay setProps override with a helper that retains the original method and forwards only layer updates.

  • Wires the helper into Jupyter’s MapLibre map setup.
  • Adds a headless test for layer forwarding and filtering of other props.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  N[Notebook update] --> H[forwardLayerUpdates override]
  H -->|layers only| O[Original MapLibreOverlay.setProps]
  O --> D[Deck layer update]
Loading

Reviews (6) · Last reviewed commit: "Merge branch 'master' into chr/jupyter-w..."

@chrisgervang
chrisgervang force-pushed the chr/jupyter-widget-maplibre-setprops branch from 4d6427e to 2f2aa93 Compare September 29, 2026 16:10
@coveralls

coveralls commented Oct 3, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.586% (+0.02%) from 82.562% — chr/jupyter-widget-maplibre-setprops into master

@chrisgervang chrisgervang modified the milestones: v9.4, v9.4 patch releases Oct 4, 2026
@chrisgervang
chrisgervang merged commit 295811d into master Oct 4, 2026
5 checks passed
@chrisgervang
chrisgervang deleted the chr/jupyter-widget-maplibre-setprops branch October 4, 2026 00:27
@chrisgervang chrisgervang mentioned this pull request Oct 7, 2026
53 of 66 tasks
chrisgervang added a commit that referenced this pull request Oct 22, 2026
…0768)

* fix(jupyter-widget): MapLibre overlay setProps no longer recurses

* test(jupyter-widget): exercise the MapLibre setProps override without mocking maplibre-gl

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GoghM5SYvzaConbutwAw21

---------

Co-authored-by: Claude <[email protected]>
(cherry picked from commit 295811d)
@chrisgervang

Copy link
Copy Markdown
Collaborator Author

Released in deck.gl 9.4.1 as @deck.gl/[email protected].

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.

4 participants