Aug 25 - Fix inspection lost photos

This commit is contained in:
2026-08-25 09:40:20 -04:00
parent e31cd7e1ff
commit 3f30e2c7bd
4 changed files with 138 additions and 0 deletions
+10
View File
@@ -38,6 +38,16 @@ final class PendingPhoto {
var uploadRetryCount: Int = 0
var createdAt: Date
/// Why the last upload attempt failed, for diagnosis.
///
/// Nothing recorded this before: a photo could burn all five attempts and
/// cost an inspection its evidence with no trace anywhere of the reason
/// the device showed only "failed" and the server logs only SUCCESSFUL
/// uploads. Cleared on a successful upload.
///
/// Optional so existing SwiftData stores migrate lightweight (rule 8).
var lastUploadError: String?
// Capture metadata (sent to the server, burned into the photo)
// Recorded when the shutter fires, NOT when the upload runs the app is
// offline-first, so a photo taken at 09:14 may not sync until 16:00 and