New project: preselect the workspace, label the factory folder
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
843194b429
commit
a0c95a035c
4 files changed
+20
-3
No files matched your search
@@ -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
|
||||
|
||||
+7
-2
@@ -1830,8 +1830,13 @@ async fn list_roots(Extension(user): Extension<User>, State(app): State<AppState
|
||||
.user_roots(Some(&user.id))
|
||||
.into_iter()
|
||||
.map(|r| {
|
||||
let rel = r.strip_prefix(&ws).map(|p| p.display().to_string()).unwrap_or_default();
|
||||
json!({"path": r, "name": if rel.is_empty() { "/".to_string() } else { rel }})
|
||||
let name = match r.strip_prefix(&ws) {
|
||||
Ok(p) if p.as_os_str().is_empty() => "/".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))
|
||||
|
||||
@@ -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(() => {
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
* under "unreleased"; scripts/release.sh renames the key to the release version.
|
||||
*/
|
||||
export const WHATS_NEW: Record<string, { en: string[]; de: string[] }> = {
|
||||
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"],
|
||||
|
||||
Reference in new issue
Block a user