Collapsed submodule row shows stale change counts after commit and push
What happened
In Thread Details, the collapsed row for a Git submodule still showed +40 / −0 after the submodule and its parent repository were committed and pushed. The submodule was clean and up to date with origin/main. The count should have disappeared when the working tree became clean.
Diagnosis
The collapsed repository row displays cached working-tree totals from a local-only status subscription. The status watcher filters filesystem events to the HEAD file. In this case, the commit moved refs/heads/main and the push moved refs/remotes/origin/main. The symbolic HEAD file stayed unchanged. That could explain why the row missed the refresh. The screenshot and Git output confirm the mismatch. The refresh failure has yet to be reproduced independently. Repository row · Status watcher
Steps to reproduce
- Open a local T3 Code Desktop thread in a Git repository with a checked-out submodule.
- Edit a tracked file in the submodule from the thread. In Thread Details, leave the submodule's repository row collapsed once it shows a nonzero count.
- Commit and push the submodule changes via Git on the same branch. Commit and push the updated submodule pointer in the parent repository.
- Check the collapsed row after both working trees are clean. In the observed run it still showed
+40 / −0, while the parent row showed+0 / −0.
Version
T3 Code Desktop and local server 0.1.12-nightly.20261124.5191.
Environment
macOS arm64, Darwin 25.3.0, local desktop backend.
Evidence
The submodule's HEAD, the parent repository's submodule pointer, and GitHub's main all pointed to 88a38bfa. git status --short --branch returned only ## main...origin/main, and git diff --numstat origin/main returned no output. The pushed commit added 40 lines across two files, matching the stale count.
Related issues
#20282 covers submodule edits missing from the per-turn diff. This report concerns a stale working-tree count in Thread Details.
Fix applied or workaround
Git status confirms the working tree is clean. A UI workaround has yet to be verified.
Filed by
Codex, GPT-6.2 Sol, via T3 Code triage.