Populate the wizard remote-folder picker from stored credentials (#147) - #193
Merged
Conversation
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 #147.
Problem
During the initial account setup wizard, the dropdown for selecting server folders does not expand and fails to load the list of remote folders. Environment: CachyOS/Arch, Nextcloud, browser-login auth.
Root cause (verified, red-green)
populate_wizard_remote_picker(setup.rs) read the password fromctx.widgets.password_entry.text(), but after login (browser flow inbrowser_flow_succeeded, or manual inmanual_login) the wizard clears the field and stores the secret in the keyring. With an empty field, theif password.is_empty() { return None; }short-circuited before callinglist_remote_folders, so theGtkDropDownopened with an emptyGtkStringList- "does not expand nor list".list_remote_foldersitself was fine; the defect was the credential source. (The Settings picker already resolves from the keyring; the wizard one did not.)Change
src/ui/setup.rs:wizard_remote_picker_password(server, username): resolves from the credential store (get_for_account).fetch_wizard_remote_folders(api, server, username): synchronous and injectable.populate_wizard_remote_pickeruses it viaNextcloudApi::new().3 new tests, including the reproduction
wizard_picker_lists_remote_folders_from_stored_credentials(keyring seeded likeCredentialsStore::set+ fake WebDAV): red with the old empty-field behavior, green with the fix.Caveat
The visual popup expansion in a real GTK session (server + browser login) is not reproducible headless; the fix is verified at the picker-logic level, which is exactly what the wizard runs.
Gate: build OK, clippy clean (
-D warnings), fmt OK, 694 tests.