49 lines
2.4 KiB
Markdown
49 lines
2.4 KiB
Markdown
# Batch G Worker D: 5-29 block menu DnD helper boundary
|
|||
|
|
|
||
|
|
Project root: `/mnt/Data1T/mnote-worktrees/0525-g-worker-d-5-29-block-dnd-helpers`
|
||
|
|
|
||
|
|
## Goal
|
||
|
|
|
||
|
|
Move a narrow, testable helper boundary for block handle drag/drop hit testing out of `rust/spikes/leptos-tiptap-spike/src/lib.rs`.
|
||
|
|
|
||
|
|
This is a candidate patch only. Codex will review and selectively merge.
|
||
|
|
|
||
|
|
## Allowed files
|
||
|
|
|
||
|
|
- `rust/spikes/leptos-tiptap-spike/src/lib.rs`
|
||
|
|
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/mod.rs`
|
||
|
|
- `rust/spikes/leptos-tiptap-spike/src/editor_runtime/block_hover_state.rs`
|
||
|
|
- You may add one new file under `rust/spikes/leptos-tiptap-spike/src/editor_runtime/`, preferably `block_dnd.rs` or a more precise local name.
|
||
|
|
|
||
|
|
Do not edit generated island files. Do not edit mnote-web files.
|
||
|
|
|
||
|
|
## Expected shape
|
||
|
|
|
||
|
|
- Prefer extracting pure geometry/classification helpers used by `pointer_in_handle_corridor`, `drop_indicator_from_target`, or `drop_indicator_from_point`.
|
||
|
|
- Do not move Leptos signals, DOM listener closures, editor command dispatch, or HTML reorder behavior.
|
||
|
|
- Preserve current block menu delete/undo and drag/reorder behavior.
|
||
|
|
- Keep `DropPlacement`, `DropIndicatorState`, and `HoveredBlockState` ownership consistent with `block_hover_state.rs`.
|
||
|
|
- If a helper needs DOM rect values, pass primitives/structs in from `lib.rs`; do not invent a second editor-stage lookup layer.
|
||
|
|
|
||
|
|
## Verification
|
||
|
|
|
||
|
|
Run these from the project root:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
cargo fmt --manifest-path rust/Cargo.toml --all --check
|
||
|
|
cargo check --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml
|
||
|
|
cargo build --manifest-path rust/spikes/leptos-tiptap-spike/Cargo.toml --target wasm32-unknown-unknown --release
|
||
|
|
wasm-bindgen rust/spikes/leptos-tiptap-spike/target/wasm32-unknown-unknown/release/mnote_leptos_tiptap_spike.wasm --target web --out-dir rust/spikes/leptos-tiptap-spike/generated/island --out-name mnote-leptos-tiptap-spike-island
|
||
|
|
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task489-block-menu-delete-undo-smoke.js
|
||
|
|
NODE_PATH=/mnt/Data1T/mnote/node_modules node scripts/task488-local-attachment-link-delete-undo-smoke.js
|
||
|
|
```
|
||
|
|
|
||
|
|
If `wasm-bindgen` changes generated files, report that fact but keep generated files out of the candidate diff unless required by the task.
|
||
|
|
|
||
|
|
## Required output
|
||
|
|
|
||
|
|
- Produce `process-handoff.md`, `process-handoff.json`, `result.json`, and `final.md`.
|
||
|
|
- Include modified files, exact verification commands, pass/fail evidence, risks, and remaining work.
|
||
|
|
- Do not commit.
|
||
|
|
- Do not modify `/mnt/Data1T/mnote`.
|