You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Summary
Two issues addressed:
### 1. Trunk branch warning was confusing on local workspaces
Local runtime doesn't use trunk branch at all (it works directly in the
project directory). The trunk branch selector was already hidden for
local runtime, but the backend still required a trunk branch value -
this led to confusing validation errors.
**Fix:** Made `trunkBranch` optional in the API. Backend now only
validates trunk branch for worktree/SSH runtimes that actually need it.
### 2. Git repo requirement was unnecessary
Users should be able to add any directory as a project, even if it's not
a git repository. Non-git directories are perfectly valid for local
runtime which just runs Claude in the directory.
**Fix:**
- Removed git repository validation from `validateProjectPath`
- Added `isGitRepository` helper to check git status separately
- `listBranches` returns empty array (not error) for non-git repos
- Runtime selector disables worktree/SSH with tooltip "Requires git
repository"
- UI auto-selects local runtime for non-git directories
### Changes
| File | Change |
|------|--------|
| `src/common/orpc/schemas/api.ts` | Make `trunkBranch` optional |
| `src/common/orpc/schemas/message.ts` | `recommendedTrunk` nullable |
| `src/node/utils/pathUtils.ts` | Remove git requirement, add
`isGitRepository` helper |
| `src/node/services/projectService.ts` | Return empty branches for
non-git |
| `src/node/services/workspaceService.ts` | Trunk branch validation only
for worktree/SSH |
| `src/browser/components/RuntimeIconSelector.tsx` | New `disabledModes`
prop with tooltip |
| `src/browser/components/ChatInput/CreationControls.tsx` | Force local
runtime for non-git |
### Testing
- Updated `pathUtils.test.ts` - validates non-git directories pass
- Updated `projectCreate.test.ts` - validates non-git projects work with
local runtime
- All existing tests continue to pass
_Generated with `mux`_
0 commit comments