[Bug]: Diff view drops intermediate directories for a nested git repo under a non-git project root

Open
#12,902 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
git, typescript
Domain
desktop, tooling

Research direction

Start in apps/desktop by tracing the diff panel's workspace-file path resolution for a repository nested below a non-git project root. Reproduce the Windows case with the repository two directories deep, then verify that the intermediate directory is preserved and the changed file opens successfully in the diff view.

Written by the indexing model from the issue text.

Description

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

apps/desktop

Steps to reproduce
  1. Open a project whose root is NOT a git repository, e.g. E:\Work\FinBeat.
  2. Inside it keep a git clone two levels deep, e.g. E:\Work\FinBeat\Kubernetes\kubernetes-pak-cl-dev\.git.
  3. Let the agent edit a tracked file in that clone, e.g. Kubernetes/kubernetes-pak-cl-dev/lms-platform/web/backoffice/values.yaml.gotmpl.
  4. Open the changed file in the diff panel.
Expected behavior

The diff opens; the file is resolved as <project root>/Kubernetes/kubernetes-pak-cl-dev/lms-platform/web/backoffice/values.yaml.gotmpl.

Actual behavior

Error: Failed to read workspace file 'kubernetes-pak-cl-dev/lms-platform/web/backoffice/values.yaml.gotmpl' in 'E:\Work\FinBeat'.

The path is built as <repo dir name>/<path relative to the repo root> and joined to the project root. The intermediate Kubernetes/ segment between the project root and the repository is lost, so the file does not exist at the resolved location. Works fine when the repo sits directly under the project root (one level deep).

Impact

Major degradation or frequent failure

Version or commit

T3 Code (Alpha) 0.0.42, Windows desktop build

Environment

Windows 11 Pro 10.0.22621, desktop app, Claude Code harness. Project root is a plain folder (no .git); git repos live at <root>/Kubernetes/<name>/.git.

Logs or stack traces

Screenshots, recordings, or supporting files

No response

Workaround

Open the nested repo folder as a separate T3 Code project, or read the diff via git diff in the terminal

Dominant language
TypeScript
Stars
23.3k
Forks
6k
Avg merge
10h 57m
Merged PRs (30d)
365

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.

More from pingdotgg/t3code

All issues in pingdotgg/t3code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.