Merged
Conversation
Contributor
Reviewer's GuideWraps sync operations in robust error handling and refactors directory selection logic in the Flutter sync provider, and updates the macOS Runner to support secure state restoration with updated folder access entitlements. Sequence diagram for improved sync item addition with error handlingsequenceDiagram
actor User
participant UI as Flutter UI
participant SyncNotifier
participant FilePicker
participant ClientSettingsProvider
participant Snackbar
User->>UI: Initiate addSyncItem
UI->>SyncNotifier: addSyncItem(context, item)
alt saveDirectory is null
SyncNotifier->>FilePicker: getDirectoryPath()
FilePicker-->>SyncNotifier: selectedDirectory
alt selectedDirectory is empty
SyncNotifier->>Snackbar: syncNoFolderSetup
SyncNotifier-->>UI: return
else selectedDirectory is valid
SyncNotifier->>ClientSettingsProvider: setSyncPath(selectedDirectory)
end
end
SyncNotifier->>Snackbar: syncAddItemForSyncing
SyncNotifier->>SyncNotifier: syncSeries/syncMovie
SyncNotifier->>Snackbar: startedSyncingItem/unableToSyncItem
Note over SyncNotifier: If error occurs
SyncNotifier->>Snackbar: somethingWentWrong
SyncNotifier-->>UI: return
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
There was a problem hiding this comment.
Hey @PartyDonut - I've reviewed your changes - here's some feedback:
- It looks like the entitlements files weren’t updated with the com.apple.security.files.user-selected.read-write entitlement, which is required for folder read/write access—please add it to both DebugProfile.entitlements and Release.entitlements.
- The try/catch in addSyncItem now wraps the entire method and may swallow non‐I/O errors; consider narrowing the try block or catching specific exceptions to avoid masking other issues.
- The new applicationSupportsSecureRestorableState override in AppDelegate.swift seems unrelated to folder permissions, so please confirm its necessity or move it to a separate PR.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- It looks like the entitlements files weren’t updated with the com.apple.security.files.user-selected.read-write entitlement, which is required for folder read/write access—please add it to both DebugProfile.entitlements and Release.entitlements.
- The try/catch in addSyncItem now wraps the entire method and may swallow non‐I/O errors; consider narrowing the try block or catching specific exceptions to avoid masking other issues.
- The new applicationSupportsSecureRestorableState override in AppDelegate.swift seems unrelated to folder permissions, so please confirm its necessity or move it to a separate PR.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Julien9969
pushed a commit
to Julien9969/Fladder
that referenced
this pull request
Sep 7, 2025
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.
Pull Request Description
This adds the needed permissions for macOS. Fixing the bug report where Isar/drift was unable to open the database because of read/write errors.
Issue Being Fixed
Resolves #416