Skip to content

Populate the wizard remote-folder picker from stored credentials (#147) - #193

Merged
gnacho merged 1 commit into
mainfrom
fix/147-wizard-dropdown
Aug 26, 2026
Merged

Populate the wizard remote-folder picker from stored credentials (#147)#193
gnacho merged 1 commit into
mainfrom
fix/147-wizard-dropdown

Conversation

@gnacho

@gnacho gnacho commented Aug 26, 2026

Copy link
Copy Markdown
Owner

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 from ctx.widgets.password_entry.text(), but after login (browser flow in browser_flow_succeeded, or manual in manual_login) the wizard clears the field and stores the secret in the keyring. With an empty field, the if password.is_empty() { return None; } short-circuited before calling list_remote_folders, so the GtkDropDown opened with an empty GtkStringList - "does not expand nor list". list_remote_folders itself 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_picker uses it via NextcloudApi::new().

3 new tests, including the reproduction wizard_picker_lists_remote_folders_from_stored_credentials (keyring seeded like CredentialsStore::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.

@gnacho
gnacho merged commit cc68cc2 into main Aug 26, 2026
2 checks passed
@gnacho
gnacho deleted the fix/147-wizard-dropdown branch August 26, 2026 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Initial setup wizard: remote folder dropdown does not expand or populate

1 participant