Refuse folder drops at hover, skip them in mixes

04's settled ruling: the attachment model is flat top-level files, so a
drag containing only folders never engages — no highlight, no proposal,
the standard incompatible-payload cursor — and a mixed drag proposes for
its files only, importing them at the drop while a loss row names the
skipped folders. Hover reads the providers' registered types (anything
conforming to public.directory refuses, packages included); commit
re-partitions authoritatively from the filesystem, so a synthetic
payload that hides its type still can't land a folder. The create path
now only ever fires with at least one importable file — the
mint-fail-remove dance is gone from the folder case and stays reserved
for genuine mid-batch failures.

Claude-Session: https://claude.ai/code/session_01SR4XGjmBE16ZUYWpfFHXwY
This commit is contained in:
2026-07-28 07:29:43 -04:00
parent 7be4eec9fd
commit 1487b391ad
4 changed files with 379 additions and 33 deletions
+4
View File
@@ -48,6 +48,10 @@ struct FileDropTarget: Equatable, Sendable {
/// How many files ride along the create path's shadow run length, one shadow per card that
/// will land. Read off the session's item providers at hover time, floored at one.
///
/// **Folders are not counted** (04-interactions.md Drag and drop: "a mixed drag proposes for
/// its files only"): `FinderDrop.importableCount` reads the providers' declared types, so a
/// mixed drag draws shadows for its files alone and a folders-only drag never proposes at all.
var fileCount: Int
}