Repository navigation
feat(react)!: copy the fiber renderer from deck.gl-community as @deck.gl/react - #11245
Merged
Merged
Conversation
Copies `modules/react-fiber/src` from visgl/deck.gl-community at 090b2439 (v10.0.0-alpha.3) byte for byte. Source files keep their path under `modules/react/src`. Tests move out of `src/**/__tests__` into `test/modules/react/fiber`, keeping their names except that browser tests (`*.browser.test.tsx`) and the reconciler and shared tests become `*.spec.*` files for the headless project. This commit does not build on its own: the next commit makes the mechanical edits (license headers, the package name and import paths), and the one after switches the package root. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
No behavior changes: - Each copied file gets the deck.gl license header with the Deckgl Fiber Renderer copyright line, as agreed in #11036. - `@deck.gl-community/react-fiber` becomes `@deck.gl/react`, in doc comments, `RENDERER_PACKAGE_NAME` and the DevTools test. - Test imports of the module (`../config`, `../../dom/mapbox`, ...) now name `@deck.gl/react/<path>`, and imports of test helpers point at their new location. The entry points test reads `modules/react/package.json`, and the tree-shaking test bundles from `modules/react/src/wrappers`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
Biome, after the previous commit lengthened their import paths. No other change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
BREAKING CHANGE: `@deck.gl/react` now exports the React Fiber renderer. The previous API stays available at `@deck.gl/react/legacy`. The packaging follows #11036: - `package.json` exports the renderer's subpaths (`/mapbox`, `/maplibre`, `/google-maps`, `/core`, `/layers`, `/geo-layers`, `/aggregation-layers`, `/mesh-layers`, `/widgets`, `/reconciler`) next to `/legacy`, with `react-reconciler`, `its-fine` and `client-only` as dependencies and React `^19.2.0` peers. `build-cjs.mjs` already shares any entry, so it needs no change. - `LICENSE` and the README credit the Deck.gl Fiber Renderer. - A `react` vitest project runs the jsdom unit and type tests, with the `clearMocks` and `reportError` setup the deck.gl-community config used. The headless project also runs `*.spec.tsx`. - The legacy tests import `@deck.gl/react/legacy`, and the test that the root re-exported `/legacy` is removed. - The website, which runs React 18, resolves the bare root to `/legacy`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
Each one checks something that differs in deck.gl, not in the copied code: - entrypoints: deck.gl's package also exports `./legacy` and requires `@deck.gl/widgets` for it. - wrappers: deck.gl master added `_ColorScaleWidget`, which has no wrapper yet. - devtools: the headless project shares one page, so an earlier file has already loaded the renderer when this test imports it. - utils: "false in Node.js" runs in Chromium in the headless project. Each skip has a comment saying why. The follow-up PR re-enables them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
This was referenced Nov 19, 2026
chrisgervang
marked this pull request as ready for review
November 19, 2026 19:36
[Medium impact] The changes reach React applications using deck.gl, including apps that embed maps or share a Deck across canvases. The latest change adds no new finding, but the outstanding repository requirements must be satisfied before merging. SummaryMoves
No new findings from the latest test configuration change. The three previous findings remain outstanding, including in PRs #11246 and #11247. Reviews (2) · Last reviewed commit: "test(react): run the renderer's specs ou..." · Reviewed by Greptile |
Finalized Decks don't release their WebGL context yet. In the shared headless page, master's specs leave 14 contexts open, two short of Chromium's limit; the renderer's specs add more and reach it, and the test device is then lost for every later file (266 failures in CI on #11245). Until #11221 releases those contexts, the headless project excludes `test/modules/react/fiber/**/*.spec.*`, so it runs the same files as master; they still run in the `browser` project. The renderer's jsdom tests still run in the `react` project. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
chrisgervang
pushed a commit
that referenced
this pull request
Nov 19, 2026
…down From Greptile's review of #11245: - The DOM root's layout cleanup detaches the overlay and calls `onDeckChange(null)` first. If either throws (an `onDeckChange`, a ref cleanup or a custom detach), the cleanup now still clears the overlay and unmounts the root, so Deck does not keep running. A test throws from `onDeckChange(null)` and checks the root is unmounted; it fails without the change. - Each wrapper component in `/core`, `/layers`, `/geo-layers`, `/aggregation-layers`, `/mesh-layers` and `/widgets` gets a one-line TSDoc comment, as `AGENTS.md` asks. - `flattenTree` and `organizeList` name their variables (`roots`, `instance`, `descriptors`, `node`) instead of `arr`, `val`, `acc` and `curr`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
chrisgervang
pushed a commit
that referenced
this pull request
Nov 19, 2026
#11245 was squash-merged, so its copied files arrive on master as new files and every file this branch changed conflicts. Each conflict keeps this branch's version, which is the copy plus the review changes; `setup.ts` and the two `react` project settings that used it stay removed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
opensource-fork-sync Bot
pushed a commit
to cla7aye15I4nd/opensource-visgl__deck.gl
that referenced
this pull request
Nov 19, 2026
…from it (visgl#11252) visgl#11245 added the "Deckgl Fiber Renderer contributors" copyright line to every copied file. visgl#11036 puts it only on files adapted from the Deck.gl Fiber Renderer at 9e348b6. These 48 files were written later in deck.gl-community and have no counterpart there (the map roots, `deck-canvas`, `attach-*`, the error boundary, the shared hooks, the wrappers and their tests), so the line is removed. Files adapted from the renderer keep it. Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn Co-authored-by: Claude <[email protected]>
This was referenced Nov 20, 2026
Awake999
pushed a commit
to Awake999/deck.gl
that referenced
this pull request
Nov 20, 2026
…sgl#11246) * feat(react): copy the fiber renderer from deck.gl-community Copies `modules/react-fiber/src` from visgl/deck.gl-community at 090b2439 (v10.0.0-alpha.3) byte for byte. Source files keep their path under `modules/react/src`. Tests move out of `src/**/__tests__` into `test/modules/react/fiber`, keeping their names except that browser tests (`*.browser.test.tsx`) and the reconciler and shared tests become `*.spec.*` files for the headless project. This commit does not build on its own: the next commit makes the mechanical edits (license headers, the package name and import paths), and the one after switches the package root. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * chore(react): make the copied renderer's mechanical edits No behavior changes: - Each copied file gets the deck.gl license header with the Deckgl Fiber Renderer copyright line, as agreed in visgl#11036. - `@deck.gl-community/react-fiber` becomes `@deck.gl/react`, in doc comments, `RENDERER_PACKAGE_NAME` and the DevTools test. - Test imports of the module (`../config`, `../../dom/mapbox`, ...) now name `@deck.gl/react/<path>`, and imports of test helpers point at their new location. The entry points test reads `modules/react/package.json`, and the tree-shaking test bundles from `modules/react/src/wrappers`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * style(react): format the two tests whose import paths grew Biome, after the previous commit lengthened their import paths. No other change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * feat(react)!: make the copied renderer the @deck.gl/react root BREAKING CHANGE: `@deck.gl/react` now exports the React Fiber renderer. The previous API stays available at `@deck.gl/react/legacy`. The packaging follows visgl#11036: - `package.json` exports the renderer's subpaths (`/mapbox`, `/maplibre`, `/google-maps`, `/core`, `/layers`, `/geo-layers`, `/aggregation-layers`, `/mesh-layers`, `/widgets`, `/reconciler`) next to `/legacy`, with `react-reconciler`, `its-fine` and `client-only` as dependencies and React `^19.2.0` peers. `build-cjs.mjs` already shares any entry, so it needs no change. - `LICENSE` and the README credit the Deck.gl Fiber Renderer. - A `react` vitest project runs the jsdom unit and type tests, with the `clearMocks` and `reportError` setup the deck.gl-community config used. The headless project also runs `*.spec.tsx`. - The legacy tests import `@deck.gl/react/legacy`, and the test that the root re-exported `/legacy` is removed. - The website, which runs React 18, resolves the bare root to `/legacy`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * test(react): skip four copied tests until the follow-up adapts them Each one checks something that differs in deck.gl, not in the copied code: - entrypoints: deck.gl's package also exports `./legacy` and requires `@deck.gl/widgets` for it. - wrappers: deck.gl master added `_ColorScaleWidget`, which has no wrapper yet. - devtools: the headless project shares one page, so an earlier file has already loaded the renderer when this test imports it. - utils: "false in Node.js" runs in Chromium in the headless project. Each skip has a comment saying why. The follow-up PR re-enables them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * fix(react): apply the deck.gl review of the copied renderer The changes made while visgl#11182 and visgl#11183 were reviewed, on top of the copy: - Re-suspended content is hidden: `cloneHiddenInstance` marks its copy, and the tree flattening skips hidden instances (Greptile on visgl#11182). - Updates without an explicit priority use the live event priority, so a click is discrete (Greptile on visgl#11182). - `unmountAtNode` commits the unmount before it finalizes Deck, so effect cleanups still see it (Bugbot on visgl#11182). - The DOM root imports the reconciler, and the map roots the root component, through their entries, so each CommonJS bundle requires one copy of the renderer instead of inlining it (Ib on visgl#11183). `/reconciler` exports the error boundary as `_RootErrorBoundary` for that. - `_ColorScaleWidget`, added to `@deck.gl/widgets` on master, gets a wrapper. - DevTools registration is a function, `registerWithDevTools`, so a test can call it in the headless project's shared page. - TSDoc on the internal declarations (Greptile on visgl#11182). Tests: the four tests the copy skipped are adapted and re-enabled; new tests cover each fix above, the CommonJS entries and the peer versions. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * fix(react): finish unmounting when an app callback throws during teardown From Greptile's review of visgl#11245: - The DOM root's layout cleanup detaches the overlay and calls `onDeckChange(null)` first. If either throws (an `onDeckChange`, a ref cleanup or a custom detach), the cleanup now still clears the overlay and unmounts the root, so Deck does not keep running. A test throws from `onDeckChange(null)` and checks the root is unmounted; it fails without the change. - Each wrapper component in `/core`, `/layers`, `/geo-layers`, `/aggregation-layers`, `/mesh-layers` and `/widgets` gets a one-line TSDoc comment, as `AGENTS.md` asks. - `flattenTree` and `organizeList` name their variables (`roots`, `instance`, `descriptors`, `node`) instead of `arr`, `val`, `acc` and `curr`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * test(react): run the renderer's specs outside headless until visgl#11221 Finalized Decks don't release their WebGL context yet. In the shared headless page, master's specs leave 14 contexts open, two short of Chromium's limit; the renderer's specs add more and reach it, and the test device is then lost for every later file (266 failures in CI on visgl#11245). Until visgl#11221 releases those contexts, the headless project excludes `test/modules/react/fiber/**/*.spec.*`, so it runs the same files as master; they still run in the `browser` project. The renderer's jsdom tests still run in the `react` project. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * chore(react): credit the Deckgl Fiber Renderer only on files adapted from it visgl#11245 added the "Deckgl Fiber Renderer contributors" copyright line to every copied file. visgl#11036 puts it only on files adapted from the Deck.gl Fiber Renderer at 9e348b6. These 48 files were written later in deck.gl-community and have no counterpart there (the map roots, `deck-canvas`, `attach-*`, the error boundary, the shared hooks, the wrappers and their tests), so the line is removed. Files adapted from the renderer keep it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * test(react): check that re-suspended content comes back once it resolves The Suspense test stopped once the fallback showed, with a promise that never resolved, so it would pass even if hidden content never returned. It now resolves the promise and checks that the content is back and the fallback gone (Greptile on visgl#11246). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * style(react): make the CommonJS import comments inline The DOM root and the three map roots explained, in a comment above the import, why they import through an entry file. Each is now a short comment on the import line. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * style(react): drop the comments on the map roots' entry imports Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * ci: run the React renderer's browser specs in their own job until visgl#11221 The renderer's `*.spec.*` files are excluded from the shared headless page until visgl#11221 releases WebGL contexts, so neither `test-coverage` nor `test-webgpu` runs them. A new `test-react-renderer` job runs them in the `browser` project under Xvfb, in a Chromium of their own (Ib on visgl#11246). Locally: 21 files, 224 tests pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * test(react): check isBrowserEnvironment in Node.js and jsdom again fiber.gl covered both environments: `utils.test.ts` ran in Node.js and checked `isBrowserEnvironment` is false, `utils-browser.test.ts` ran in jsdom and checked it is true. As `*.spec.ts` files they ran in the headless Chromium, which ignores `@vitest-environment`, so the Node.js check had become a second browser check. Both are `*.test.ts` files in the `react` project again, with their environment docblocks, as `dom/ssr.test.ts` already is. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn * style(react): drop the comment on the DOM root's reconciler import `cjs-entries.node.spec.ts` already fails if the import stops going through the `/reconciler` entry, so the comment is not needed. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn --------- Co-authored-by: Claude <[email protected]>
Awake999
pushed a commit
to Awake999/deck.gl
that referenced
this pull request
Nov 20, 2026
DeckCanvas came over with the faithful copy of the community react-fiber package (visgl#11245), but it doesn't use the renderer and was never part of the upstream plan that the TSC reviewed. It came from a proof of concept (visgl/deck.gl-community#846) whose RFC (visgl#10392) is still a draft, and it wraps deck.setProps until core has setPropsSource. It moves to the community @deck.gl-community/react package instead. Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn Co-authored-by: Claude <[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.
For #11036
Background
A cross-repo cherry-pick of
modules/react-fiber/srcfrom visgl/deck.gl-community at 090b2439 (v10.0.0-alpha.3). The code is copied unchanged so it can be compared with the community source. The changes from the deck.gl review of #11182 and #11183 follow in a separate PR. The commits are meant to be read one at a time.Change List
test/modules/react/fiber@deck.gl-community/react-fiberto@deck.gl/react@deck.gl/react/<path>@deck.gl/reactroot: export the renderer; previous API stays at/legacy^19.2.0; addsreact-reconciler,its-fine,client-onlyreactvitest project for jsdom and type tests/legacy(React 18)test/modules/react/fiber/**/*.spec.*from headless until fix(core): release the WebGL context of a finalized Deck's own device #11221; their WebGL contexts lose the test deviceVerified locally: pre-commit (lint, node and
reactprojects, 49 files), the full headless project (290 files, as on master), and the renderer's headless specs run on their own.Note
High Risk
Major architectural overhaul replacing the primary React bindings with a React 19 reconciler and introducing multiple new subpath entry points. The previous API is moved to
@deck.gl/react/legacy, which represents a breaking change for existing consumers.Overview
Replaces the
@deck.gl/reactpackage with a custom React 19 Fiber reconciler ported from the community Fiber renderer, moving the previous React component API to@deck.gl/react/legacy.The new renderer uses
react-reconcilerin persistence mode to render Deck.gl layers, views, widgets, and effects directly as JSX elements. Dedicated wrapper components and package subpath exports are added across@deck.gl/core,@deck.gl/layers,@deck.gl/geo-layers,@deck.gl/aggregation-layers,@deck.gl/mesh-layers, and@deck.gl/widgets.Adds first-party overlay roots for Mapbox, MapLibre, and Google Maps with automatic lifecycle management and map attachment. Also introduces
DeckCanvasand a centralized registry to support multi-canvas rendering against a sharedDeckinstance.Reviewed by Cursor Bugbot for commit c6bde00. Bugbot is set up for automated code reviews on this repo. Configure here.
Generated by Claude Code