docs/plans/2026-04-10-dnd-missing-context-runtime-guard.md
Prevent @platejs/dnd from throwing Expected drag drop context when a Plate surface renders without an active react-dnd manager, while keeping normal browser DnD behavior intact.
apps/www already wraps the app tree in Providers with DndProvider.aboveSlate in dnd-kit.tsx with DndProvider.2026-03-28-next-prerendered-client-editors-need-dnd-hooks-to-noop-on-the-server.md already established that this error is often a runtime-environment contract bug, not missing provider plumbing.useDragNode and useDropNode on both DOM availability and DndContext.dragDropManager.useDragNode.ts and useDropNode.ts.DndContext from react-dnd/dist/core/index.js because Bun did not reliably surface that export from the package root during tests.useDraggable.spec.tsx with a missing-context regression case..bun / .pnpm React invalid-hook-call failure mode; pnpm run reinstall cleared it.pnpm --filter @platejs/dnd test -- useDraggable.spec.tsxbun test packages/dnd/src/components/useDraggable.spec.tsxpnpm turbo build --filter=./packages/dnd --filter=./apps/wwwpnpm turbo typecheck --filter=./packages/dnd --filter=./apps/wwwpnpm lint:fixbrowser-use --connect http://127.0.0.1:9222 verification on / and /cn with no console errors, no page errors, and no Expected drag drop context crash text