Repository navigation
fix(core): give duplicate view ids one controller in ViewManager - #11065
Merged
Merged
Conversation
ViewManager keys controllers, view event managers and viewport lookups by view id. With two views sharing an id, `_rebuildViewports` created a controller for each, and the second overwrote the first in `controllers[id]`, so the overwritten one was never finalized. Later rebuilds reused the surviving controller for both views, applying both layouts to it in turn. Warn with "Multiple views with same id" when views change, as LayerManager does for layers. Keep drawing every view, since two `MapView`s without an explicit id share the default id, but give controllers and event managers only to the first view with each id, matching `getView` and `getViewport`. This resolves the TODO in `_buildViewportMap`. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
[Medium impact] The PR appears safe to merge; no actionable issues were found. Summary
Reviews (2) · Last reviewed commit: "Merge branch 'master' into chr/view-mana..." · Reviewed by Greptile |
This was referenced Nov 22, 2026
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
This was referenced Nov 23, 2026
Collaborator
Author
|
Released in deck.gl 9.4.2, as #11295 on 9.4. |
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.
Closes #11067
Background
Every view is still drawn, because two
MapViews without an explicit id share the default id. Controllers and view event managers go only to the first view with each id, which matchesgetViewandgetViewport, so no controller is created thatViewManagercan't finalize. The warning is issued when views change, not on every view state update.Change List
ViewManager: warn "Multiple views with same id" when views changeViewManager: only the first view per id gets a controllerVerified with the core headless suite (635 tests) and
yarn lint.🤖 Generated with Claude Code
https://claude.ai/code/session_01LGNhMnSJ94uYgx7ihcVwPn
Note
Low Risk
Low risk bug fix that prevents orphaned controllers when duplicate view IDs exist without altering viewport rendering.
Overview
Prevents controller leaks when multiple views share the same ID in
ViewManager.While all duplicate views continue to be drawn as viewports, only the first view with a given ID is now assigned a controller and event manager. In addition,
ViewManagernow emits a warning when duplicate view IDs are detected during view updates.Reviewed by Cursor Bugbot for commit 1636303. Bugbot is set up for automated code reviews on this repo. Configure here.