fix(clone): refresh the preview after the preflight, tidy wording and the invariants paragraph

This commit is contained in:
Devvyn committed 2026-11-06 12:45:55 +08:00
1 parent d2c75784d3
commit a4bd35b704
3 files changed
+18 -3

No files matched your search

+3 -2
View File
@@ -4291,7 +4291,7 @@ Object.assign(CodemanApp.prototype, {
openCloneCasePathPicker() {
const input = document.getElementById('cloneCasePath');
PathPicker.open({
title: 'Choose the folder to clone into',
title: 'Choose the folder to clone inside',
initialPath: input.value.trim(),
directoriesOnly: true,
onSelect: (path) => {
@@ -4401,6 +4401,7 @@ Object.assign(CodemanApp.prototype, {
// the case name is validated against), but never over a name the user typed.
const nameInput = document.getElementById('cloneCaseName');
if (nameInput && !this._cloneNameEdited && parse.suggestedName) nameInput.value = parse.suggestedName;
this.updateCloneCasePathPreview();
const where = parse.owner ? `${parse.provider} ${parse.owner}/${parse.repo}` : `${parse.provider} ${parse.repo}`;
if (data.gitAvailable === false) {
@@ -4455,7 +4456,7 @@ Object.assign(CodemanApp.prototype, {
const customFolder = !!document.getElementById('cloneCustomPathToggle')?.checked;
if (customFolder && !(document.getElementById('cloneCasePath')?.value || '').trim()) {
this.showToast('Choose the folder to clone into', 'error');
this.showToast('Choose the folder to clone inside', 'error');
return;
}