Repository navigation
Q: The "Edited N files" card counts every workspace change during the turn, not only this session's edits #12245
|
What the card shows vs. what it means The “Edited 11 files / +381 −479” card after a turn reads as “files this session edited”. In a git workspace it is actually every file whose content changed in the workspace during that turn, regardless of who changed it. Observed case (Desktop 0.2.0-rc.2, Windows 11, Why it behaves that way —
So the summary is workspace-scoped, while the UI label is session-scoped. Two sessions (or a session plus a background script, or the user editing in an editor) share one workspace, and each turn's diff picks up everyone's writes. Impact
Suggestion (either is fine, both are cheap)
Documenting the git-repo vs non-repo behavior difference would also close the surprise in the second bullet of “Impact”. Not filing this as a bug: the diff itself is correct, the attribution is what reads wrong. |
Replies: 2 comments 1 reply
|
Separate Git worktrees provide a workaround for the current snapshot behavior. Ordinary subdirectories don't isolate it, because From the repository, create a worktree for each task and open each session in its corresponding directory. git worktree add -b task-a ../project-task-a HEAD
git worktree add -b task-b ../project-task-b HEADThese start from committed One caveat with filtering to captured paths is that captures cover filesystem-tool mutations, not arbitrary shell writes. That filter would lose shell-only edits. It also wouldn't establish ownership when another process changes a path this session captured. So I'd favor your workspace-scoped label for the existing metric. Worktrees reduce interference between concurrent sessions without presenting the diff as proof of which session made each edit. Another process writing into the same worktree would still appear. I checked the current snapshot helpers with real Git on Linux. A write in another subdirectory appeared in the first session's delta; a write in another worktree didn't. These were helper-level checks, not a Windows Desktop test. |
|
Thanks — the worktree caveat and the shell-only-writes point both land, and they change my preference. You are right that filtering to captured paths is not a safe fix: it drops shell edits and still cannot attribute a path another process wrote into a captured file. Dropping that suggestion; keeping the metric with a workspace-scoped label (your option 2: "changes in this workspace during the turn", with the concurrency caveat). On worktrees: agreed they reduce interference without pretending to be attribution. Recording it as the recommended isolation workaround for concurrent sessions, with your two caveats — (a) they start from committed HEAD and uncommitted work is not carried over; (b) a writer inside the same worktree still shows up in that session's delta. Also noting your test scope so nobody over-reads it: helper-level checks with real Git on Linux, not a Windows Desktop run. I am on Windows Desktop; if I reproduce the subdirectory case there I will add it here. No action requested — recording the outcome is enough. I will update the issue body to "label change, not data fix". |
Separate Git worktrees provide a workaround for the current snapshot behavior. Ordinary subdirectories don't isolate it, because
locateGitWorkspaceresolves each session's directory to the repository root.From the repository, create a worktree for each task and open each session in its corresponding directory.
These start from committed
HEAD. Existing uncommitted changes are not copied into them.One caveat with filtering to captured paths is that captures cover filesystem-tool mutations, not arbitrary shell writes. That filter would lose shell-only edits. It also wouldn't establish owners…