🤖 feat: create new git projects from the getting-started screen - #3923
Conversation
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 66f0ce633f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex review fixes for #3923: - reject initGit beneath a registered parent project (nested repo would invalidate the sub-project same-repository hierarchy) - claim the leaf directory with a non-recursive mkdir so concurrent creates of the same path cannot delete each other's work - roll back a .git created in a pre-existing directory when git init or the initial commit fails, so retries are not rejected as non-empty - let the three-mode selector wrap inside narrow dialogs and pin a phone-viewport story
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 479b5a18c4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…itGit parent check - Windows CI: recursive mkdir of the parent throws EEXIST when a path component is a file; report it like ENOTDIR instead of misreading it as a leaf-creation race - Codex P2: run the initGit nested-repository rejection against the canonical path too, so a symlinked alias into a registered checkout cannot bypass it
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 058dfac082
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codex round-3 fixes for #3923: - re-check the canonical parent inside the serialized transform so a parent registered concurrently (reached via symlink) cannot end up owning a nested repository - serialize git initialization per canonical path so two initGit creates of the same pre-existing empty directory cannot interleave init and rollback - verify config persistence after the transform (saveConfig swallows write failures) and roll back before reporting an error - mark .git rollback before running git init so a failing init that leaves a partial .git is cleaned up too
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d2271c6a3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The hierarchy-changed-descendant branch deliberately keeps the tree for the winning descendant, but the .git this losing request created would wrap the winner's checkout in an unregistered outer repository and make retries fail the non-empty check. Remove only the .git we created.
|
@codex review |
This comment has been minimized.
This comment has been minimized.
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5aeb130849
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- gitInit (the public banner path) now takes the same per-canonical-path claim as create(), so concurrent initializations cannot double-commit or delete each other's .git via the failure rollback - when a plain create registers the same pre-existing directory while an initGit create is mid-flight, the losing initGit now strips the .git it created instead of leaving the winner's project silently converted into a repository
|
@codex review |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ae9c936ac8
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
GIT_DIR/GIT_WORK_TREE in Xum's environment win over -C, redirecting git init and the initial commit into an unrelated external repository while the new project registers without a .git. Reuse the backup feature's GIT_SCOPE_ENV_UNSET for both commands.
|
@codex review |
This comment has been minimized.
This comment has been minimized.
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #2340
Problem
The getting-started screen (and the Add Project modal) only accepts an existing directory or a repo to clone. When prototyping something new, users want Xum to create the project itself.
Change
projects.createaccepts an optionalinitGitflag. With it set,ProjectService.createrejects an existing non-empty directory, creates the directory if needed, and initializes it as a git repository (git init -b main+ an initial empty commit, extracted from the existinggitInitpath so worktree/SSH runtimes get a born branch) before registering the project. On git failure, a directory we created is cleaned up.ProjectAddFormgains a third mode, "New project" (lucideFolderPlus), reusingProjectCreateFormwith acreateNewGitRepoprop. Bare names resolve to the default projects directory via the existing backend resolution; the frontend consumesnormalizedPath+projectConfigfrom the backend response. Surfaced on both the onboarding wizard's projects step and the Add Project modal. Keyboard accessible via the existing ToggleGroup + Enter-to-submit handling.Testing
make static-checkbun test src/node/services/projectService.test.ts(initGit success on a new path, existing empty dir, non-empty dir rejection, file-path rejection, git-failure cleanup; red-green verified)bun test src/browser/components/ProjectCreateModal/ProjectCreateModal.cloneAbort.test.tsxmain, worktree workspace creation, non-empty-dir error case, existing modes regression, keyboard-only flow.Generated with
xum• Model:anthropic:claude-fable-5• Thinking:xhigh