Skip to content

fix(server): creating a project without Git says Git is missing - #28231

Closed
jradic wants to merge 1 commit into
pingdotgg:mainfrom
jradic:fix/named-project-missing-git
Closed

jradic wants to merge 1 commit into
pingdotgg:mainfrom
jradic:fix/named-project-missing-git

Conversation

@jradic

@jradic jradic commented Oct 31, 2026

Copy link
Copy Markdown

Problem

Creating a new project on a machine without Git fails with "Failed to create the project folder." The real cause is that git init can't spawn, but createNamedProject wraps every scaffold failure in NamedProjectFolderError, whose fixed message hides it. Reported in #28210 (Windows 11, desktop 0.1.6; ManagedProjectFolders.ts is unchanged on main).

Change

When the scaffold failure is a GitCommandError whose cause is a ChildProcess spawn NotFound (the missing-executable condition), createNamedProject now fails with NamedProjectGitMissingError: "Git is not installed in this environment. Install Git to create a project." Other failures still produce NamedProjectFolderError, and the folder cleanup is unchanged.

The projects.createNew WebSocket handler and the t3_project_create MCP tool both forward error.message, so web, desktop, mobile, and agents get the new text without client changes.

Scope and approval

Fixes #28210. This is a very small, focused fix for an obvious bug: the server knows why project creation failed but reports a generic error. Behavior is otherwise unchanged. Creating a project still requires Git, and this only names that requirement when it's missing. It's the same missing-Git condition #10376 and #14942 handled for repository detection on folder open. Those fixes don't cover the new-project path.

Verification

  • Added a case to ManagedProjectFolders.test.ts that fakes the driver's spawn failure (PlatformError NotFound from ChildProcess.spawn). That matches the reporter's server trace: PlatformError: NotFound: ChildProcess.spawn (git init --initial-branch=main). The case also asserts the folder is removed and no project is created.
    • On main: fails with expected 'NamedProjectFolderError' to equal 'NamedProjectGitMissingError'.
    • With the fix: vp test run src/project/ManagedProjectFolders.test.ts passes 13/13.
  • vp run check:changed passes: format, lint, knip, graphql, typecheck (scripts, evals, apps/server), and tests (14 passed).
  • Not checked: the new toast text end to end in the desktop app. Git is now installed on the machine I tested on. The "before" toast is in the screenshot on Creating a new project without Git installed fails with a generic "Failed to create the project folder" error #28210.

Written with Claude Opus 5.5 in Claude Code.

🤖 Generated with Claude Code

createNamedProject wrapped every scaffold failure in NamedProjectFolderError,
so a missing git binary surfaced as "Failed to create the project folder."
A ChildProcess spawn NotFound from git now fails with
NamedProjectGitMissingError, which names the cause.

Fixes pingdotgg#28210

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:unvouched PR author is not yet trusted in the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 31, 2026
@jradic

jradic commented Oct 31, 2026

Copy link
Copy Markdown
Author

Closing in favor of #28219, which fixes the same thing. Thanks for picking this up so quickly!

@jradic jradic closed this Oct 31, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at 6cae9ac

Macroscope's review found this PR approvable — Project creation now explains when Git is missing instead of reporting a generic folder error. Existing creation behavior and failure cleanup are unchanged, keeping the change narrowly scoped.

You can add or adjust custom eligibility rules. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Creating a new project without Git installed fails with a generic "Failed to create the project folder" error

1 participant