Before submitting
Area
apps/mobile
Steps to reproduce
- Set the default thread env mode to New worktree (global setting, project setting, or
t3.json).
- Add a project folder that is not a git repository.
- On mobile, open New task for that project and type a prompt.
Expected behavior
The draft falls back to Current checkout, the same as desktop. A worktree cannot exist without a git repository, so worktree mode should never be the resolved default for a non-git project.
Actual behavior
The workspace control stays on New worktree, the branch control shows Choose branch with nothing to choose, and Start stays disabled.
Desktop already handles this case: resolveSendEnvMode in apps/web/src/components/ChatView.logic.ts returns local when isGitRepo is false (#1914, #1936). Mobile resolves the default in apps/mobile/src/features/threads/new-task-flow-provider.tsx through resolveDefaultThreadEnvMode without checking isRepo, although it already queries vcsEnvironment.status for the project. NewTaskDraftScreen.tsx then blocks the send on workspaceMode === "worktree" && !selectedBranchName, and a task queued offline in that state stays parked in the outbox.
The comment in packages/shared/src/threadEnvMode.ts says both platforms must agree on the resolved mode. The non-git fallback only exists on web today.
Impact
Minor bug or occasional failure
Version or commit
Server: T3 Code (Nightly) 0.0.34-nightly.20260821.1147. Mobile: Android client, current build as of 2026-08-22. Source checked on main at 2c4158f.
Environment
macOS server, Android client
Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
Tap the workspace toggle to Current checkout before sending, or set that project's default thread env mode to local.
Before submitting
Area
apps/mobileSteps to reproduce
t3.json).Expected behavior
The draft falls back to Current checkout, the same as desktop. A worktree cannot exist without a git repository, so worktree mode should never be the resolved default for a non-git project.
Actual behavior
The workspace control stays on New worktree, the branch control shows
Choose branchwith nothing to choose, and Start stays disabled.Desktop already handles this case:
resolveSendEnvModeinapps/web/src/components/ChatView.logic.tsreturnslocalwhenisGitRepois false (#1914, #1936). Mobile resolves the default inapps/mobile/src/features/threads/new-task-flow-provider.tsxthroughresolveDefaultThreadEnvModewithout checkingisRepo, although it already queriesvcsEnvironment.statusfor the project.NewTaskDraftScreen.tsxthen blocks the send onworkspaceMode === "worktree" && !selectedBranchName, and a task queued offline in that state stays parked in the outbox.The comment in
packages/shared/src/threadEnvMode.tssays both platforms must agree on the resolved mode. The non-git fallback only exists on web today.Impact
Minor bug or occasional failure
Version or commit
Server: T3 Code (Nightly) 0.0.34-nightly.20260821.1147. Mobile: Android client, current build as of 2026-08-22. Source checked on
mainat 2c4158f.Environment
macOS server, Android client
Logs or stack traces
No response
Screenshots, recordings, or supporting files
No response
Workaround
Tap the workspace toggle to Current checkout before sending, or set that project's default thread env mode to local.