feature(core): OneDrive transport settings, locator, and watcher recordUncommented flag
Adds SendTransport/TransportSettings (UserDefaults-backed, mirrors FolderSettings) and OneDriveLocator, which finds a OneDrive-* sync root under ~/Library/CloudStorage and resolves the Redline send/watch folder inside it (MMD-named roots preferred). TransportSettings.effectiveFolders() is the one function that combines the transport choice with FolderSettings/OneDriveLocator. ReturnWatcher gains recordUncommented (default true, today's AirDrop behaviour): when false, a document with zero human marks is neither recorded into the ledger nor returned by scanNow. This is needed because in OneDrive mode the outbox and watch folder are the same folder, so a freshly written, unmarked PDF must not be treated as a return — only a later, actually marked-up save of the same file should be. Adds ShotdeckError.oneDriveFolderUnavailable(path:) for when the OneDrive folder is missing or unwritable at send time. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012ZiTXPbPCSjzPVsfoweAbp
This commit is contained in:
@@ -10,6 +10,7 @@ public enum ShotdeckError: Error, LocalizedError, Sendable {
|
||||
case pdfCompositionFailed(reason: String)
|
||||
case airDropUnavailable
|
||||
case noCommentedReturns
|
||||
case oneDriveFolderUnavailable(path: String)
|
||||
|
||||
public var errorDescription: String? {
|
||||
switch self {
|
||||
@@ -31,6 +32,8 @@ public enum ShotdeckError: Error, LocalizedError, Sendable {
|
||||
return "AirDrop is not available right now."
|
||||
case .noCommentedReturns:
|
||||
return "None of the returned PDFs have comments on them."
|
||||
case .oneDriveFolderUnavailable(let path):
|
||||
return "Your OneDrive folder is not available: \(path). Check that OneDrive is signed in, or choose another folder in Settings."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user