Repository navigation
Conversation
Files can request its working set before opening the Nextcloud location. Open its account session at that point and expire anchors from previous processes so Files can reload favorites with their saved order. Remove those ranks when the account is deleted. Assisted-by: Codex:gpt-6.2-astra
The extension database singleton only records the shared database URL at launch. On a cold working-set request, account lookup needs the existing schema check and Realm configuration before it can read the saved account. Assisted-by: Codex:gpt-6.2-astra
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. This follows the requested changes in #4506.
Apple Files can ask for its working set before the user opens the Nextcloud location. On a cold start the provider had no account session, so enumeration could return before reporting any favorites.
setupAccount. This matters on a cold start because the extension’s database singleton initially stores only the shared database URL. The existing authentication flow anditem(for:)are unchanged.Verification
Xcode 27.2 ran
FileProviderFavoriteRanksTestsandFileProviderWorkingSetChangesTestson an iPad Pro 13-inch (M5) simulator running iPadOS 26.0.1. All five tests passed with zero skips. They cover stored ranks after reopening, account removal and isolation, and invalidation of anchors from an earlier launch.On iPhone 17 and iPad Pro simulators connected to Nextcloud Server 32.0.15, the favorites remained visible after terminating and relaunching both Apple Files and the File Provider extension. On iPhone, a nested favorite and a top-level favorite retained the order assigned in Files. After removing one favorite and restarting again, only the retained test folder appeared; WebDAV confirmed favorite values of 1 and 0. There is a separate navigation issue on cold start: the first tap on a favorite opened the Nextcloud root on both devices; a second tap opened the selected folder and displayed its test file.
🤖 AI (if applicable)
Codex helped implement the changes, write and run the tests, and draft this description.