zui icon indicating copy to clipboard operation
zui copied to clipboard

Dragging a query folder to the bottom makes it disappear & breaks further operations

Open philrz opened this issue 1 year ago • 1 comments

Repro is with Brim commit 24d658. This issue seems somewhat similar in spirit to #1906.

Repro steps as shown in the attached video:

  1. Drag the Brimcap Queries folder into the app
  2. Make a new folder and add a query into it
  3. Drag the new folder to become the bottom entry under the Brimcap folder
  4. Drag the new folder just below the bottom of the Brimcap folder entries

At that last step, the new folder disappears from the interface and the following error appears in DevTools:

Uncaught TypeError: Cannot read properties of undefined (reading 'model')
    at /Users/phil/work/brim/dist/js/state/Queries/reducer.js:64
    at immerClass.ts:80
    at Immer.produce (immerClass.ts:96)
    at curriedProduce (immerClass.ts:80)
    at combination (/Users/phil/work/brim/node_modules/redux/lib/redux.js:465)
    at k (<anonymous>:2235:16)
    at D (<anonymous>:2251:13)
    at <anonymous>:2464:20
    at Object.dispatch (/Users/phil/work/brim/node_modules/redux/lib/redux.js:219)
    at e (<anonymous>:2494:20)

Further attempts to do operations in the query library do not succeed, and DevTools keeps getting spammed with errors like:

Uncaught Invariant Violation: Cannot call hover after drop.
    at invariant (/Users/phil/work/brim/node_modules/@react-dnd/invariant/dist/invariant.cjs.development.js:31:15)
    at checkInvariants (/Users/phil/work/brim/node_modules/dnd-core/dist/cjs/actions/dragDrop/hover.js:43:28)
    at DragDropManagerImpl.hover (/Users/phil/work/brim/node_modules/dnd-core/dist/cjs/actions/dragDrop/hover.js:23:5)
    at Object.hover (/Users/phil/work/brim/node_modules/dnd-core/dist/cjs/classes/DragDropManagerImpl.js:86:38)
    at /Users/phil/work/brim/node_modules/react-dnd-html5-backend/dist/cjs/HTML5BackendImpl.js:271:23

https://user-images.githubusercontent.com/5934157/191072309-ebee4519-d41d-4778-9b4b-bd33c6111893.mp4

philrz avatar Sep 19 '22 17:09 philrz

Thanks for reporting.

jameskerr avatar Sep 21 '22 17:09 jameskerr