diff --git a/CHANGELOG.md b/CHANGELOG.md index c82aeff..c873512 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to CodeCraft. Versions follow [Semantic Versioning](https://semver.org/); until 1.0, minor versions may contain breaking changes. +## [Unreleased] + +### Fixed + +- **New project from a Git repository:** the wizard no longer clones into the factory area by default + ("target folder already exists" when the factory had checked out the same repository); your workspace is + preselected, and the factory area is labelled as such in the folder list. + ## [v202611-00053] – 2026-11-17 ### Fixed diff --git a/server/src/api.rs b/server/src/api.rs index 120c89a..74d242e 100644 --- a/server/src/api.rs +++ b/server/src/api.rs @@ -1830,8 +1830,13 @@ async fn list_roots(Extension(user): Extension, State(app): State "/".to_string(), + Ok(p) => p.display().to_string(), + // Outside the workspace (e.g. the factory area): show where it is, not "workspace". + Err(_) => format!("{} (factory)", r.file_name().and_then(|n| n.to_str()).unwrap_or("")).replace(" ()", ""), + }; + json!({"path": r, "name": name}) }) .collect(); Json(json!(roots)) diff --git a/web/src/components/NewSession.tsx b/web/src/components/NewSession.tsx index b236a9a..469e15d 100644 --- a/web/src/components/NewSession.tsx +++ b/web/src/components/NewSession.tsx @@ -193,7 +193,7 @@ export function NewSession({ onMenu, onCreated }: { onMenu: () => void; onCreate if (!model && config?.default_model) setModel(config.default_model); }, [config, model]); useEffect(() => { - if (!rootPath && roots.length) setRootPath(roots[roots.length - 1].path); + if (!rootPath && roots.length) setRootPath(roots[0].path); }, [roots, rootPath]); // Old software is analysed in deep mode; websites default to clean room. useEffect(() => { diff --git a/web/src/whatsnew.ts b/web/src/whatsnew.ts index 481a58e..27b519c 100644 --- a/web/src/whatsnew.ts +++ b/web/src/whatsnew.ts @@ -3,6 +3,10 @@ * under "unreleased"; scripts/release.sh renames the key to the release version. */ export const WHATS_NEW: Record = { + unreleased: { + en: ["Fixed: cloning a repository for a new project no longer ends up in the factory area"], + de: ["Behoben: Klonen eines Repositorys für ein neues Projekt landet nicht mehr in der Factory-Ablage"], + }, "202611-00054": { en: ["README: new section explaining the code factory"], de: ["README: neuer Abschnitt zur Code-Factory"],