pingdotgg / pingdotgg/t3code

[Bug]: Mobile keeps New worktree default for non-git projects and cannot start a task

Open Beginner friendly
#7,926 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
23k
Forks
5.9k
Avg merge
11h 14m
Merged PRs (30d)
357

Description

Before submitting
  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.
Area

apps/mobile

Steps to reproduce
  1. Set the default thread env mode to New worktree (global setting, project setting, or t3.json).
  2. Add a project folder that is not a git repository.
  3. 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 2c4158f87a.

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in apps/mobile/src/features/threads/new-task-flow-provider.tsx, then compare its default resolution with resolveSendEnvMode in apps/web/src/components/ChatView.logic.ts. Check the existing vcsEnvironment.status data for non-git projects and verify that NewTaskDraftScreen.tsx can start a task and queue it offline with Current checkout selected automatically.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, typescript
Domain
mobile
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
86/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.