mirror of https://github.com/cirruslabs/tart.git
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. |
||
|---|---|---|
| .. | ||
| Util | ||
| DigestTests.swift | ||
| DirectoryShareTests.swift | ||
| DiskImageFormatTests.swift | ||
| DiskutilTests.swift | ||
| DockerConfigTests.swift | ||
| DropCancellationTokenTests.swift | ||
| DropGeometryTests.swift | ||
| DropProgressCopierTests.swift | ||
| FileLockTests.swift | ||
| GuestDropParseTests.swift | ||
| LayerizerTests.swift | ||
| LeaseTest.swift | ||
| LeasesTests.swift | ||
| MACAddressResolverTests.swift | ||
| RegistryTests.swift | ||
| RemoteNameTests.swift | ||
| TokenResponseTests.swift | ||
| URLAbsolutizationTests.swift | ||
| URLAccessDateTests.swift | ||
| VMConfigTests.swift | ||
| WWWAuthenticateTests.swift | ||