tart/Tests
Dal Rupnik b954c0d56c feat: live byte progress and best-effort cancel for file-promise drops
Covers two of the file-promise trade-offs (A + B from the review):

A. Progress: poll bytes streamed into the (shared) per-item subdir while
   the opaque receivePromisedFiles runs, feeding the toast's live size
   readout instead of a dead spinner. Best-effort — providers that write
   a temp file and atomically rename only become visible at the end.

B. Cancellation: DropCancellationToken gains an onCancel hook; the
   promise path cancels its operation queue and unblocks the wait loop
   on ⊗ instead of sitting on the 30 s timeout. Cooperative providers
   abort; either way we stop waiting and clean up at once.

C (true determinate % via NSItemProvider.loadFileRepresentation) is
intentionally NOT implemented: macOS AppKit drags don't vend
NSItemProvider, and NSFilePromiseReceiver exposes no Progress/cancel
surface, so a real percentage isn't reachable without an undocumented
hack. The size poller is the honest ceiling.

Also: capture the dispatch group locally in RelocationGate.drain to drop
a Sendable-capture warning. Adds DropCancellationTokenTests.
2026-05-20 10:15:08 +02:00
..
TartTests feat: live byte progress and best-effort cancel for file-promise drops 2026-05-20 10:15:08 +02:00