Repository navigation
Description
What happened
In a No project chat, I sometimes have the agent open a PR to a repo that isn't set up as a T3 project. T3 can watch the PR, but the thread details menu never shows it unless git is initialized. I clicked the Initialize Git button, and now git is tracking a thread that isn't a project, which seems wrong. Is this intended, or is there a better way to handle the No project window?
Diagnosis
Two problems.
-
The thread details card shows Initialize Git for No project threads. The git section is shown whenever
gitCwd !== null && activeProjectName !== undefined(apps/web/src/components/chat/ThreadDetailsPanel.tsx:153-156). The No project project has a name ("No project"), so the check passes. Nothing inThreadDetailsPanel.tsx,GitActionsControl.tsx, orBranchToolbar*.tsxchecks for scratch. When the thread has noworktreePath,gitCwdfalls back toproject.workspaceRoot(apps/web/src/components/ChatView.tsx:1587-1593). For a No project thread, that is the scratch root. In my case,git initran in~/.t3/scratch, not in the thread's own folder. Every scratch thread folder then counted as untracked content in one shared repo.docs/user/thread-sidebar.md:35-39says branch and git controls stay hidden in scratch because those folders aren't git repositories, andManagedProjectFolders.ts:238-246avoids putting scratch inside a work tree. After the init, scratch is inside one. -
Linked PRs in the details card depend on git. The PR rows render inside the branch section (
BranchToolbarBranchSelector.tsx:737,displayMode === "panel"). That section is gated onprops.gitCwd !== null && props.isGitRepo(ThreadDetailsPanel.tsx:152). The PR data comes fromserverThread.pullRequests(BranchToolbarBranchSelector.tsx:553-565) and doesn't need git. The right-panel Pull requests tab (ChatView.tsx:1934-1935) already shows linked PRs without git.
Suggested fix: hide the git and branch sections for scratch projects, and render linked PR rows in the details card whenever the thread has linked PRs, whether or not the folder is a git repo.
Steps to reproduce
- Start a No project thread.
- Have the agent open a PR to a repo that isn't a T3 project, and link it to the thread with
link_pull_request. - Open the thread details menu. The PR is missing, and an Initialize Git button appears.
- Click Initialize Git. In my case,
~/.t3/scratch/.gitwas created, not<scratch>/<thread-folder>/.git. I believe the thread had noworktreePathat that moment, so the cwd fell back to the scratch root. I haven't confirmed which state the thread was in. - Run
git statusin any scratch thread folder. Every sibling thread folder is listed as untracked.
Version
0.1.6-nightly.20261029.3892 (desktop app, local server, commit 08a463e)
Environment
macOS 26 (Darwin 25.6.0) arm64, Node v24.22.1, Claude Code provider
Evidence
$ git -C ~/.t3/scratch/<thread-folder> rev-parse --show-toplevel
~/.t3/scratch
$ ls -la ~/.t3/scratch/.git # HEAD/config written 08:54; thread folder created 08:56
$ git -C ~/.t3/scratch log -1
fatal: your current branch 'main' does not have any commits yetRelated issues
#25362 (closed, empty details card on a No project draft; a different symptom), #1316 (closed, confirmation before Initialize Git), #16455 (open, PR handoff checks out into an unrelated project when the PR's repo has no matching checkout), #17103 (closed, t3_thread_list showed no linked PR when the PR is in another repo). None of them cover the button appearing on scratch threads or the git gate on PR rows. Main is 52 commits past 08a463e, and none of them touch this code.
Fix applied or workaround
Removed ~/.t3/scratch/.git (no commits). The right-panel Pull requests tab shows linked PRs without git.
Filed by
Claude Code (claude-opus-5-5) via t3 triage
Activity
ridhitb commentedon Nov 7, 2026
The same gate affects regular projects whose root is a plain folder holding several repositories. There the sidebar badge and the Pull requests tab show a thread's linked PRs, but the details card shows Initialize Git where the PR rows would be. Clicking it to see the PRs makes the folder a repository with no commits. Every checkpoint then hashes everything outside the nested repositories, which here timed out on every turn and left about 800 MB per turn in
.git/objects(#26227). It happened five times in four days, once reaching 24 GB in 38 minutes.I checked this on a v0.1.7 dev build with #27645 linked to a thread. Without a root repository the card showed Initialize Git and no PR row. With one, it showed the PR row. #27645 renders the rows without git, which would remove the reason to click.
Written by Claude Opus 5.5 in Claude Code.