fix(desktop): use macOS Available space for card ingest #191

Merged
spark merged 2 commits from task/BIT-190-card-ingest-macos-free-space into main 2026-11-06 14:18:12 +00:00
Owner

Fixes #190

Summary

  • Card ingest free-space check used statvfs (~28 GB truly empty) while System Settings Available (~97 GB) includes APFS purgeable space.
  • On macOS, read NSURLVolumeAvailableCapacityForImportantUsageKey (fallback to statvfs). Keep the 1 GiB headroom.
  • Tests for day packing and ImportantUsage ≥ statvfs.

Evidence (this machine)

  • Card: 7245 JPEG · 85.6 GB → Desktop
  • Old check: needed+1 GiB ≈ 86.7 GB vs ~26 GB free → refuse
  • New check: vs ~97 GB Available → fits

Test plan

  • cargo test --lib card::tests
  • Rebuild desktop app and re-run ingest from EOS_DIGITAL to Desktop
Fixes https://git.bitreport.pt/BitReport.pt/photoreport/issues/190 ## Summary - Card ingest free-space check used `statvfs` (~28 GB truly empty) while System Settings Available (~97 GB) includes APFS purgeable space. - On macOS, read `NSURLVolumeAvailableCapacityForImportantUsageKey` (fallback to `statvfs`). Keep the 1 GiB headroom. - Tests for day packing and ImportantUsage ≥ statvfs. ## Evidence (this machine) - Card: 7245 JPEG · 85.6 GB → Desktop - Old check: needed+1 GiB ≈ 86.7 GB vs ~26 GB free → refuse - New check: vs ~97 GB Available → fits ## Test plan - [x] `cargo test --lib card::tests` - [ ] Rebuild desktop app and re-run ingest from EOS_DIGITAL to Desktop
spark added 1 commit 2026-11-06 14:04:33 +00:00
fix(desktop): use macOS Available space for card ingest
ci / rust (pull_request) Successful in 5m46s
ci / typescript (pull_request) Failing after 9m34s
04fae7ca7f
statvfs only counted empty APFS blocks, so ingest refused ~86 GB copies while System Settings still showed ~97 GB Available (purgeable). Read ImportantUsage capacity instead.
spark added 1 commit 2026-11-06 14:06:15 +00:00
chore(desktop): 0.3.28 for card ingest free-space fix
ci / rust (pull_request) Successful in 5m44s
ci / typescript (pull_request) Failing after 9m28s
ccffa85877
spark merged commit 3d8ab3d866 into main 2026-11-06 14:18:12 +00:00
Sign in to join this conversation.