Repository navigation
chore: bump to deck.gl 9.4 and deck.gl-raster 0.8 - #1272
Merged
Merged
Conversation
- Bump @deck.gl/* to ^9.4.0 and @luma.gl/* to ^9.4.2, in both package.json and the pnpm overrides that keep a single copy of each. - Bump the @developmentseed/* family to ^0.8.1 together. deck.gl-raster 0.8 requires deck.gl 9.4, and this removes the duplicate 0.6.1 and 0.7.0 copies of @developmentseed/affine that were bundled. - Declare @deck.gl/aggregation-layers, @deck.gl/geo-layers, @deck.gl/widgets and @luma.gl/core directly. They were imported or required as peers but only installed transitively. - Override the loaders.gl packages that deck.gl and luma.gl depend on to ~4.4.5. @luma.gl/gltf 9.4 requires ~4.4.5 while deck.gl accepts ^4.4.3, and loaders.gl packages pin exact versions of each other, so otherwise seven loaders.gl packages are bundled twice. - Group @developmentseed/* with deck.gl in dependabot. Stay on @deck.gl/mapbox rather than the new @deck.gl/maplibre: in 9.4.0, @deck.gl/maplibre draws layers with a beforeId above every MapLibre layer on first load (visgl/deck.gl#10733). Add UI tests that clicking a feature sets selected_index for scatterplot, path, polygon and solid polygon layers, since deck.gl 9.4 changed how picking colors are generated. Co-Authored-By: Claude Opus 5.5 <[email protected]>
kylebarron
enabled auto-merge (squash)
September 29, 2026 16:37
kylebarron
added a commit
that referenced
this pull request
Sep 29, 2026
> [!NOTE] > This PR was written by Claude (Claude Code), not by @kylebarron. ## Problem `selected_index` is documented as the row that was clicked, usable as `gdf.iloc[layer.selected_index]`. Three things made it wrong: 1. **A click on the first row was ignored.** `onClick` returned early on `!pickingInfo.index`, and index 0 is falsy. deck.gl uses `-1`, not `0`, when nothing was picked. 2. **With more than one record batch, the index was the row's position within its batch.** Each batch is rendered as its own deck.gl layer, and the picking info from `@geoarrow/deck.gl-geoarrow` is relative to that layer's batch. For a 4-row table in batches of 2, clicking the 4th row gave `selected_index == 1`. Lonboard splits large tables into batches automatically, so this affects anyone with large data. 3. **Clicking a `HeatmapLayer` set `selected_index` to an arbitrary number**, such as `2490556` for a 3-row table. deck.gl's `HeatmapLayer` doesn't support picking: it draws the heatmap's colors in the picking pass, and deck.gl decodes the color under the cursor as an index. There was no issue for these. The first two were found while testing the deck.gl 9.4 upgrade (#1272) and exist on deck.gl 9.3 too. The third was found while fixing them. ## Changes This PR has two commits, so the heatmap change can be dropped or split out. **Commit 1: the index** - `onClick` moves from `BaseLayerModel` to `BaseArrowLayerModel`. It receives the batch index of the layer that was clicked, returns when `index < 0`, and adds the number of rows in all earlier batches. - The H3, A5, geohash and S2 models called `baseLayerProps()` without a batch index. They now pass it. **Commit 2: the heatmap** - `HeatmapModel` sets `pickable: false`, as `BitmapModel` already does. ## Behavior changes to be aware of - Anyone who worked around the old value, for example by adding the batch offset themselves, will now get an index that is offset twice. For tables with a single batch, the only change is that row 0 works. - H3, A5, geohash and S2 layers with extension props given as arrays (e.g. `get_filter_value`) used the first batch's values for every batch. They now use each batch's own values. This is a side effect of passing the batch index. - Layers that aren't backed by an Arrow table (bitmap, bitmap tile, raster, surface) no longer get an `onClick` handler. They never set `selected_index` before either: they always report index 0, which the old check discarded. - A heatmap is no longer pickable, so it no longer blocks clicks and hovers on layers underneath it. The Python `pickable` trait has no effect on a heatmap. The tooltip, the side panel and `Map.on_click` are unaffected. They use the picked row object and the coordinate, not the index. ## Tests `tests/ui/test_picking.py` goes from 4 tests to 26. Each one clicks a feature in the browser and checks the value Python receives. | Test | Checks | |---|---| | `test_click_sets_selected_index` ×4 (existing) | Last row of a single batch | | `test_click_first_row_sets_selected_index` ×4 | Row 0 gives 0 | | `test_click_in_later_batch_sets_table_index` ×12 | 6 rows in batches of 2; rows 2, 3 and 5 | | `test_click_multipolygon_in_later_batch_sets_table_index` | Counts rows, not the parts of a multi-part geometry | | `test_click_h3_cell_sets_table_index` ×3 | An H3 layer in two batches; rows 0, 2 and 3 | | `test_click_on_empty_map_does_not_set_selected_index` | A click on empty map sets nothing | | `test_click_heatmap_does_not_set_selected_index` | A click on a heatmap sets nothing | The ×4 and ×12 tests are parametrized over scatterplot, path, polygon and solid polygon layers. Against `main`'s frontend code, 21 of the 26 fail and 5 pass. The 5 are the 4 existing tests and the empty-map click. Geohash, S2, text, column, point cloud, arc and trips layers were also clicked in a browser with the fix, on tables in two batches, and gave the right index. Those checks aren't part of the test suite. ## Checks - `pytest`: 250 passed, 1 skipped. - `pnpm test`: 6 passed. - `biome check`: clean. - `tsc --noEmit`: 7 errors, the same 7 as `main`. ## Not verified - The A5 layer wasn't clicked in a browser. It uses the same code path as the H3, geohash and S2 layers. - Raster and surface layers were checked by reading the code only. 🤖 Written by [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
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.
Note
This PR was written by Claude (Claude Code), not by @kylebarron.
Closes #1262
Upgrades to deck.gl 9.4 (the last v9 release), luma.gl 9.4, and deck.gl-raster 0.8. deck.gl-raster 0.8 requires deck.gl 9.4.
Changes
@deck.gl/*→ ^9.4.0 and@luma.gl/*→ ^9.4.2. Both are updated inpackage.jsonand in theoverridesinpnpm-workspace.yaml. Those overrides keep a single copy of each package, and they had held the lockfile at 9.3 even afterpackage.jsonwas bumped.@developmentseed/affine,deck.gl-raster,morecantileandraster-reproject→ ^0.8.1 together. This removes the duplicate@developmentseed/affine0.6.1 and 0.7.0 copies thatmainbundles today. It brings in deck.gl-raster's fixes:isLoadedreturning false while metadata loads;onError.@deck.gl/aggregation-layers,@deck.gl/geo-layers,@deck.gl/widgetsand@luma.gl/coreare now declared. They were imported insrc/, or required as peers, but only installed because pnpm installs missing peers automatically. The staleaggregation-layers9.3.1 peer was what caused an "unmet peer" warning.@luma.gl/gltf9.4 requires loaders.gl ~4.4.5, while deck.gl 9.4 accepts ^4.4.3.@developmentseed/*is grouped with deck.gl, so the family moves together.Not switching to
@deck.gl/maplibreyet9.4 adds
@deck.gl/maplibreas the MapLibre replacement for@deck.gl/mapbox. But in 9.4.0 it draws interleaved layers that setbeforeIdabove every MapLibre layer on first page load (visgl/deck.gl#10733). That would break lonboard'sbefore_id, so this PR stays on@deck.gl/mapbox^9.4.0. deck.gl-raster made the same call; see developmentseed/deck.gl-raster#661. The fix, visgl/deck.gl#10734, is open. The switch fromMapboxOverlaytoMapLibreOverlayinsrc/renderers/overlay.tsxcan happen once a release includes it; that's tracked in #1273.Verification
Picking. deck.gl 9.4 drops the auto-generated
instancePickingColorsattribute. Nothing in lonboard reads it, but the existing UI tests never actually asserted that picking works. Newtests/ui/test_picking.pyclicks a feature and checks that Python receives the rightselected_index, for scatterplot, path, polygon and solid polygon layers. It passes onmain(deck.gl 9.3) and on this branch.Static HTML exports. 15 exports were checked in headless Chromium on both
mainand this branch: five layer types (scatterplot, path, polygon, text, H3) in each of theoverlaid,interleavedandreverse-controlledmodes.Raster. A local tiled GeoTIFF rendered through
RasterLayer.from_geotiffand deck.gl-raster 0.8 displays correctly.Replacing a map. Swapping one map for another in the same output reuses the MapLibre instance (
reuseMaps). It renders correctly in bothoverlaidandinterleavedmodes, with no "WebGL context already attached" error. That's the problem deck.gl-raster#668 hit under React StrictMode.Checks:
pnpm install --frozen-lockfile: clean, with no peer-dependency warnings.biome check: clean.tsc --noEmit: the same 8 errors asmain, with identical messages.pytest: 226 passed, 1 skipped.Things to know
visgl:webgl-onlyexport condition to drop it, but it has no effect here, becausebuild.mjsaliases each@deck.gl/*package to a directory path, and export conditions only apply to bare package names. Using it would mean pointing the aliases at thedist.webgl-onlybuilds; that's left for a follow-up.WebGL uniform block reflection failed for "gouraudMaterialUniforms"/"lightingUniforms"for lit layers such as polygons. Rendering is correct. This is [Bug] 9.4.0 uniform block reflection validation rejects GLSL bool members and array-of-struct members that match in layout visgl/luma.gl#3187, fixed on luma.glmasterin fix(webgl): validate bool and struct array uniforms visgl/luma.gl#3190 but not backported to the 9.4 branch (9.4.1 and 9.4.2 don't include it).0.17.0-beta.2.🤖 Written by Claude Code