Repository navigation
Conversation
Files can request its working set before browsing a folder. Establish the domain session on that path, persist the order assigned by Files, and let an expired working-set anchor reload favorites from Realm after the provider restarts. Assisted-by: Codex:gpt-6.2-astra Signed-off-by: zouxianxian <187847046+zxxwyt@users.noreply.github.com>
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.
Closes #4410
Nextcloud folders could disappear from Favorites after Apple Files restarted. Files can request its working set before anyone opens a folder. At that point the provider could lack an account session, and the favorite ranks it held in memory were lost on restart.
The provider now opens the session for the requested domain and reads its favorite folders from Realm. It persists the order Files assigns per account and includes server favorites that Files has yet to rank. When the provider restarts, it expires the previous working-set anchor so Files can reload the list.
Verification
I also tested Favorites in Apple Files against a live Nextcloud instance and confirmed that the favorites remained available after reopening Files.
First/NestedandSecondand draggedNestedto the top. After terminating and relaunching Files, both folders opened from Favorites in the saved order. After removingSecondand relaunching again, onlyNestedremained. WebDAV confirmed favorite values of 1 and 0 respectively.FileProviderFavoriteRanksTestsandFileProviderWorkingSetChangesTestson an iPad Pro 13-inch (M5) simulator with iPadOS 26.0.1 and Xcode 27.2. All five tests passed with zero skips.On a further relaunch, Files opened in On My iPhone. Before browsing the Nextcloud location, Codex returned to Browse and opened the existing
Nestedfavorite directly. The removedSecondentry was absent.The local build resolved GoogleAppMeasurement 13.2.0 and GoogleAdsOnDeviceConversion 3.8.0 to satisfy Firebase 13.2.0.
🤖 AI (if applicable)
Codex helped implement the working-set and favorite-rank changes, wrote regression tests, ran the checks above and drafted this description.