fix(desktop): patch @dnd-kit/solid to preserve core scroll plugins - #38119
Merged
Brendonovich merged 6 commits intoJul 28, 2026
Merged
Conversation
DragDropProvider in @dnd-kit/solid@0.5.0 reassigns `_manager.plugins` from its createEffect, overwriting the `[ScrollListener, Scroller, StyleInjector, ...plugins]` that @dnd-kit/dom's DragDropManager constructor prepended. Since `Scroller` is not in `defaultPreset.plugins`, any filter/replace of defaults causes `Scroller` to be missing at AutoScroller registration time, and `AutoScroller`'s constructor throws synchronously: Error: AutoScroller plugin depends on Scroller plugin This crashes the renderer on first mount of any screen using a DragDropProvider (home, terminal panel, session side panel, titlebar tab strip). Fix DragDropProvider's createEffect to restore the three core plugins the dom package considers mandatory, mirroring the constructor's prepending behaviour. Upstream: https://github.com/clauderic/dnd-kit (PR TBD)
Contributor
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
The current @dnd-kit/dom patch lives on DragDropManager's plugins setter, but that setter is already defined upstream at index.js:2199 — patching it is fragile and the wrong layer. Move the fix upstream to where the default plugin list is built (defaultPreset at index.js:2180). ScrollListener, Scroller, and StyleInjector should be part of the default preset so any consumer that resolves to defaultPreset.plugins (including @dnd-kit/solid's DragDropProvider) gets the core scroll plugins by default, without relying on a separate setter to prepend them.
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.
Issue for this PR
Closes #38107
Type of change
What does this PR do?
Fixes the
Error: AutoScroller plugin depends on Scroller pluginwhich occurs when navigating to home.DragDropProvider in @dnd-kit/solid@0.5.0 reassigns
_manager.pluginsfrom its createEffect, overwriting the[ScrollListener, Scroller, StyleInjector, ...plugins]that @dnd-kit/dom's DragDropManager constructor prepended. SinceScrolleris not indefaultPreset.plugins, any filter/replace of defaults causesScrollerto be missing at AutoScroller registration time, andAutoScroller's constructor throws synchronously.This crashes the renderer on first mount of any screen using a DragDropProvider.
This is an upstream issue so will propose a fix to DND Kit then the patch can be removed:
Upstream: https://github.com/clauderic/dnd-kit (PR TBD)
The patch superseded the alternative solution of re-adding Scroller back into plugin construction across the codebase:
https://github.com/roborew/opencode/tree/feature/REDUNDANT-fix-desktop-v2-fatal-renderer-error-with-scroller
How did you verify your code works?
Screenshots / recordings
Checklist