Problem
The directory-account form is reset even when addDirectoryAccount rejects. A user who enters a label and directory, hits an error, and wants to retry must re-enter both values.
Where
apps/desktop-tauri/src/surfaces/settings/providers/AccountsPanel.tsx
The helper catches the rejection, but the submit path calls resetForm() unconditionally afterward.
Expected behavior
- Clear the form only after a successful account creation.
- Preserve the entered label and directory on failure.
- Keep the existing error message visible so the user can correct and retry.
Tests
Add a rejected-promise regression test that verifies both fields are preserved, plus a success case that verifies they are cleared.
Problem
The directory-account form is reset even when
addDirectoryAccountrejects. A user who enters a label and directory, hits an error, and wants to retry must re-enter both values.Where
apps/desktop-tauri/src/surfaces/settings/providers/AccountsPanel.tsxThe helper catches the rejection, but the submit path calls
resetForm()unconditionally afterward.Expected behavior
Tests
Add a rejected-promise regression test that verifies both fields are preserved, plus a success case that verifies they are cleared.