Skip to content

fix(desktop): patch @dnd-kit/solid to preserve core scroll plugins - #38119

Merged
Brendonovich merged 6 commits into
anomalyco:devfrom
roborew:feature/fix-desktop-v2-fatal-renderer-error-with-scroller
Jul 28, 2026
Merged

fix(desktop): patch @dnd-kit/solid to preserve core scroll plugins#38119
Brendonovich merged 6 commits into
anomalyco:devfrom
roborew:feature/fix-desktop-v2-fatal-renderer-error-with-scroller

Conversation

@roborew

@roborew roborew commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #38107

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Fixes the Error: AutoScroller plugin depends on Scroller plugin which occurs when navigating to home.

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.

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?

  1. Navigate to home and the error no longer occurs.
  2. Dragging to reorder projects.

Screenshots / recordings

Screenshot 2026-07-21 at 14 31 25 Screenshot 2026-07-21 at 14 36 37

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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)
@github-actions

Copy link
Copy Markdown
Contributor

Hey! Your PR title fix(desktop v2): patch @dnd-kit/solid to preserve core scroll plugins doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@roborew roborew changed the title fix(desktop v2): patch @dnd-kit/solid to preserve core scroll plugins fix(desktop): patch @dnd-kit/solid to preserve core scroll plugins Jul 21, 2026
roborew added 3 commits July 21, 2026 15:53
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.
@Brendonovich
Brendonovich merged commit 7c89824 into anomalyco:dev Jul 28, 2026
8 of 9 checks passed
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.

fix(desktop v2) fatal renderer error with Auto Scroller

2 participants