fix(vscode): preserve changes in multi-repo sessions - #13088
Conversation
1fbcc14 to
b5b192d
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5b192dca4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
Files Reviewed (13 files)
Note: this review follows a rebase/squash of the branch. All four previous findings are resolved: the Git fallback in Fix these issues in Kilo Cloud Previous Review Summary (commit b5b192d)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit b5b192d)Status: 4 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)WARNING
SUGGESTION
Files Reviewed (15 files)
The core design is sound: per-session stable Git roots, revision-guarded status refreshes that no longer clobber the UI for background sessions, snapshot-first sources with a file-filtered Git fallback only for non-Git-backed sessions, and real-git integration tests. Session state ( Reviewed by kimi-k3 · Input: 297.5K · Output: 16.3K · Cached: 1.1M Review guidance: REVIEW.md from base branch |
b5b192d to
50c11ae
Compare
Issue
Fixes #13070
Context
In a workspace opened at a non-Git parent containing multiple Git repositories, the extension forgot the repository associated with a session. A tab switch refreshed Git status against the non-Git parent, hiding the Changes chip, while Git-backed Changes sources queried that same parent and displayed no files.
Implementation
Track a stable Git root for each session from completed file-mutating tools and restore it from edit history when a session reloads. Reuse that root for focus refreshes and pass it from the invoking sidebar, editor tab, or Agent Manager provider to the shared Changes panel.
The Changes panel uses the resolved repository for Branch, Staged, and Unstaged sources and for opening files. Session and Turn sources remain backed by server snapshots; the extension does not synthesize session attribution from unrelated working-tree changes when a session was created at a non-Git parent.
Screenshots / Video
Before
After
How to Test
Manual/local verification
app_alpha/README.mdand retained the Changes indicator.Reviewer test steps
app_alphaandapp_beta, then open the parent as the VS Code workspace.app_alpha/README.mdwith a file-mutating tool.app_alphabut no unrelated files fromapp_beta.Checklist