Commit cf8bcb6
committed
fix(add-repository): make local repository dialog submission reliable
Tighten the Add Local Repository dialog so choosing a valid repository path and immediately pressing Add consistently runs the add flow instead of silently stalling in the dialog.
Changes:
- resolve the entered local path before submit-time validation so `validatePath(...)` uses the same normalized path handling as the live `onPathChanged(...)` validation path
- wait for the folder-picker path to finish landing in component state before allowing the chosen path to be used for submission
- keep the rest of the add-existing-repository flow unchanged so successful submissions still dismiss the dialog, add the repository, and select it
Behavioral effect:
The Add Local Repository dialog no longer ends up in a no-op state where a repository path appears valid in the picker flow but submit-time validation never reaches `_addRepositories(...)`. Choosing a worktree path from the folder picker and immediately pressing Add now reliably adds the repository.
Testing:
- yarn eslint app/src/ui/add-repository/add-existing-repository.tsx
- yarn compile:prod1 parent 7aae8cf commit cf8bcb6
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
81 | 83 | | |
82 | 84 | | |
83 | 85 | | |
| |||
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | | - | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| |||
0 commit comments