fix(file-tree): give the whole row to the drop zone, and unwire the nested long-press
Two defects a Codex review found in the previous commit and in PR #648. The folder's drop zone stopped at the action. Once the ⋯ became a sibling of the header, `data-tree-drop-dir` and the drag handlers were still on the header, and `resolveFileTreeDropZone` walks UP from whatever the pointer hit — so dragging an entry over the ⋯ strip of a destination folder found no zone on desktop, and on the web the dragover/drop handlers never fired there either. The move just silently did nothing. When a row has actions the wrapper IS the row now: it carries the drop marker, `rowProps`, and the highlight, and the header keeps only what belongs to the header. That also lets the drag source's `opacity-70` dim the action along with the rest of the row. `rowProps` is typed against HTMLElement because the row element is a button or a div depending on whether the row has actions. Long-press on a nested row opened the wrong menu. A folder's trigger encloses its expanded descendants' triggers, and PR #648 spread `useLongPressToOpenMenu` onto every one of them — so a single touch pointerdown armed a timer per ancestor, and each fired its own contextmenu from its OWN element. Long-pressing a file two levels deep opened three menus, the outermost winning the screen. Radix's built-in long-press survives nesting because all the triggers share one bubbling event that the innermost preventDefaults; separate dispatches carry no such interlock. The hook is unwired — which is what the PR description said the tree does anyway — leaving the ⋯ button as the touch entry point and Radix's own long-press underneath it. The hook and its tests stay, now carrying the nesting warning. Also corrected the asChild rationale in the two row comments: React builds this DOM with appendChild, so the old wrapper span really did contain the row div — the reason to merge onto the row is the inline span's effect on the row's w-max/min-w-full sizing, not a parser split. Geometry verified against the built CSS in headless Chrome: the drop marker resolves from the ⋯ for both folder rows and spans the full 525.4px row; the ⋯ aligns at the same x on file and folder rows and never overlaps a name, including the longest one.
X
xintaofei committed
2142b711d08cd640ecc86be0470181bf449e9155
Parent: 58f90c9