Merge #774 head 51264ec0 into the release branch

Takes the contributor's wording for the picker title and the toast, the
preview refresh after the preflight and the clearer 409 text, and keeps
the fuller tests and the invariants paragraph from the release branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Codeman maintainer committed 2026-11-06 08:48:19 +01:00
commit 9c39b2a9cc
3 files changed
+33 -9

No files matched your search

+4 -6
View File
@@ -4298,7 +4298,7 @@ Object.assign(CodemanApp.prototype, {
openCloneCasePathPicker() {
const input = document.getElementById('cloneCasePath');
PathPicker.open({
title: 'Choose the parent folder for the clone',
title: 'Choose the folder to clone inside',
initialPath: input.value.trim(),
directoriesOnly: true,
allowNewFolder: true,
@@ -4408,10 +4408,8 @@ Object.assign(CodemanApp.prototype, {
// The server's suggestion wins over the local guess (it is the same function
// 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();
}
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) {
@@ -4466,7 +4464,7 @@ Object.assign(CodemanApp.prototype, {
const customFolder = !!document.getElementById('cloneCustomPathToggle')?.checked;
if (customFolder && !(document.getElementById('cloneCasePath')?.value || '').trim()) {
this.showToast('Choose the parent folder for the clone', 'error');
this.showToast('Choose the folder to clone inside', 'error');
return;
}
+1 -1
View File
@@ -758,7 +758,7 @@ export function registerCaseRoutes(
? ApiErrorCode.ALREADY_EXISTS
: ApiErrorCode.INVALID_INPUT,
prepared.code === 'EXISTS'
? `${customPath} already has files in it. Pick an empty folder, or a folder that does not exist yet.`
? `${customPath} already has files in it. The clone target must be empty or not exist yet.`
: prepared.reason
);
}