pingdotgg / pingdotgg/t3code

[Bug]: Explain checkout failures caused by uncommitted changes when creating a thread

Open
#7,928 0 comments 0 reactions 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/web, apps/desktop

Steps to reproduce
  1. Open T3 Code on a repository using the current checkout (rather than a separate worktree).
  2. Make changes that remain uncommitted and that would be overwritten by switching to the branch/ref for a new thread.
  3. Create a new chat thread.
  4. T3 attempts to switch the repository ref with git checkout.
Expected behavior

T3 should surface a clear, actionable error, for example:

Git checkout failed because the current branch has uncommitted changes that would be overwritten. Commit, stash, or discard those changes before creating a new thread.

The message should identify this as a normal Git safety check rather than an unexplained T3 failure.

Actual behavior

The UI displays a generic notification:

Failed to switch ref.

Git command failed in GitVcsDriver.switchRef.checkout (...): git checkout failed

This does not explain that uncommitted changes in the current local branch are the reason git checkout failed, nor what the user needs to do to proceed.

Impact

Major degradation or frequent failure

Version or commit

T3 Code desktop app (observed 2026-08-22; version not captured)

Environment

macOS; local Git checkout with uncommitted files.

Workaround

Commit, stash, or discard the pending working-tree changes before creating the thread.

Supporting screenshot

The observed notification showed only the generic GitVcsDriver.switchRef.checkout failure; the underlying Git reason was not shown.

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 at GitVcsDriver.switchRef.checkout and trace how its git checkout error reaches notifications in apps/desktop and apps/web. Reproduce the failure with uncommitted changes that would be overwritten, then verify the notification identifies Git’s safety check and tells users to commit, stash, or discard changes instead of showing only the generic failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, typescript
Domain
desktop, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.