Add responsive transfer queues and storage diagnostics#1
Draft
nsoliven wants to merge 21 commits into
Draft
Conversation
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.
What changed
Root cause and behavior
The browser previously watched one global busy flag and reloaded whenever any background job finished. That intersected or cleared selection, while transfer completion could erase paths added during the running copy. Transfers now capture independent, persistent per-event batches, deduplicate active/queued paths, run FIFO, and do not own browser selection state.
macOS also returned a synthetic SMB filesystem value that looked like completely empty capacity. The sidebar now labels that result SMB estimate and uses an amber state instead of claiming it is exact. When a TrueNAS API key is configured, Camera Toolkit resolves the mounted SMB share to its backing ZFS dataset, reads dataset used/available and pool total/free/health, and applies the result only to locations on that specific mounted volume. The row then shows dataset free space plus pool size and its help text includes both dataset and pool details.
The TrueNAS client uses the versioned secure JSON-RPC WebSocket API. API keys stay in macOS Keychain. Self-signed certificates can be explicitly pinned by SHA-256 fingerprint, and later certificate changes are rejected. No NAS endpoint, dataset, username, certificate, or key is committed.
Folder disclosure reads only the directory being expanded, runs outside the UI actor, and displays per-row loading/retry state. Storage reads and transfer work also remain off the main actor.
Safety
Copy and queue actions never delete source files. Free Up Camera appears only after every queued item is verified, shows exact count and size, requires typing
REMOVE, and performs a fresh streaming SHA-256 comparison before removing any source file. One missing or changed file aborts the whole removal.Move to Trash always confirms, uses macOS Trash rather than recursive deletion, validates every target before moving the first one, collapses parent-and-child selections safely, refuses configured locations and drive roots, refreshes the browser and storage state, and reports any partial failure honestly.
Empty-folder deletion uses the OS atomic empty-directory operation, refuses visible or hidden contents and symbolic links, and protects configured locations, ancestors, filesystem roots, and mounted-volume roots.
Validation
swift test— 126 tests passedgit diff --checkscripts/audit-public-repo.sh/Applications/CameraToolkit.appSMB estimatelabels for the mounted libraryExact live TrueNAS capacity intentionally remains unavailable until a read-only API key is saved locally; the app does not invent a number or commit a credential.