fix: pasting a file path lands what dropping it would; covered-board gestures stand down behind modals - #524
Merged
Conversation
…ard gestures stand down behind modals Two more findings from the same felt-surface sweep as #523, both live-reproduced and e2e-pinned: - Paste/drop parity: pasting a local file path (text) landed a sticky note containing the raw path string, while dropping the same file landed the real thing. The drop hook's landing half is now exposed (landFiles) and the board paste door routes single-line absolute paths (quoted and file:// forms normalized) through it -- identical routing, plugin claims, extension enablement, folder-import handoff, and card fallback. A path that doesn't resolve on disk still falls back to the note, never a dead end. Generalizes #523's image-path paste to every file kind the drop door knows. - Modal stand-down (the goal-0183 gesture-leak class, third strike): the board's window-level paste door stayed live while a card page covered the board -- pasting with focus on no field landed a note INVISIBLY behind the dialog (reproduced live). New shared/modalGate helper; the atlas paste/clone-clipboard doors, the composition canvas clipboard doors, and the board's Delete/Backspace handler (extracted to useAtlasDeleteKey at the 500-line seam) all stand down while a role=dialog/alertdialog surface is open. Anchored popovers render role=none and deliberately stay unaffected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second batch from the owner-directed felt-surface sweep (same defect class as #523: structurally blocked interactions and silently swallowed inputs). Both found by live probing, both e2e-pinned.
Paste/drop parity for file paths
Pasting a local file path (text) landed a sticky note containing the raw path string, while dropping the same file landed the real thing — the exact generalization of #523's image-path gap. The native drop hook's landing half is now exposed as
landFiles, and the board paste door routes single-line absolute paths (quoted andfile://forms normalized by the newlocalPathFromPastedTextgate) through it. That inherits the whole drop pipeline verbatim: diagram/sheet/image routing, plugin extension claims, Settings-extension enablement, folder-path → folder-import handoff, and the card fallback with pulse + duplicate notice. A path that doesn't resolve on disk falls back to the recognizer/note flow, so pasted text never dead-ends. Verified live: a pasted.mdpath lands a mirrored DOCUMENT card;.drawiolands a diagram object; a dead path still lands a note.Modal stand-down (goal-0183 gesture-leak class, third strike)
Reproduced live: with a card page open and focus on no field, ⌘V landed a sticky note invisibly behind the dialog. New
shared/modalGate.ts(role=dialog/alertdialogpresence — verified against Primer's installed source; AnchoredOverlay popovers renderrole=noneand deliberately don't engage it). The atlas text-paste and clone-clipboard doors (paste and copy — a hidden-selection ⌘C used to clobber the clipboard), the composition canvas clipboard doors, and the board's Delete/Backspace handler all stand down while a modal owns the screen. The Delete handler moved to its ownuseAtlasDeleteKeyhook at the 500-line seam.Proofs: 2 new e2e cases in
atlas-paste-convert.spec.ts(path-paste parity incl. dead-path fallback; modal-gate no-op + door-returns-on-close), 9 new Vitest cases for the path gate. Full Vitest suite (989) green; paste/clipboard/delete blast-radius specs green. Also live-probed and passing: seeded shape/ink drag+select+context menu, tool hotkeys correctly inert behind dialogs. userdocs + SPEC (mill-docs ce91b2c) updated.🤖 Generated with Claude Code
https://claude.ai/code/session_012im1JxQQV2ahnXzZDdVmZq