Repository navigation
fix(git): preserve rename sources in staged diff reviews - #34779
Conversation
42e189c to
bb31431
Compare
|
No actionable comments were generated in the recent review.
|
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…fork flag as rest Upstream stablyai#34779 added oldPath to the web diff destructuring; naming the fork's skipRenderLimit there too ran the line past the formatter's width. Collecting it as rest keeps the fork to one extra line in the call.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…fork flag as rest Upstream stablyai#34779 added oldPath to the web diff destructuring; naming the fork's skipRenderLimit there too ran the line past the formatter's width. Collecting it as rest keeps the fork to one extra line in the call.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…fork flag as rest Upstream stablyai#34779 added oldPath to the web diff destructuring; naming the fork's skipRenderLimit there too ran the line past the formatter's width. Collecting it as rest keeps the fork to one extra line in the call.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…fork flag as rest Upstream stablyai#34779 added oldPath to the web diff destructuring; naming the fork's skipRenderLimit there too ran the line past the formatter's width. Collecting it as rest keeps the fork to one extra line in the call.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…fork flag as rest Upstream stablyai#34779 added oldPath to the web diff destructuring; naming the fork's skipRenderLimit there too ran the line past the formatter's width. Collecting it as rest keeps the fork to one extra line in the call.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…fork flag as rest Upstream stablyai#34779 added oldPath to the web diff destructuring; naming the fork's skipRenderLimit there too ran the line past the formatter's width. Collecting it as rest keeps the fork to one extra line in the call.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…fork flag as rest Upstream stablyai#34779 added oldPath to the web diff destructuring; naming the fork's skipRenderLimit there too ran the line past the formatter's width. Collecting it as rest keeps the fork to one extra line in the call.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…fork flag as rest Upstream stablyai#34779 added oldPath to the web diff destructuring; naming the fork's skipRenderLimit there too ran the line past the formatter's width. Collecting it as rest keeps the fork to one extra line in the call.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Upstream changed providers' getDiff arity (stablyai#34779), UpdaterState (stablyai#34104), DiffSectionBody props (stablyai#36577, stablyai#35004), combined diff list props (stablyai#36921), the native chat setting (stablyai#36110), recovery launches waiting for the prompt (stablyai#36210), conflict-resolution props (stablyai#35347) and row-opening params (stablyai#36301). The saved-event case for a write whose views all closed is dropped: upstream no longer notifies then (stablyai#31617), as decided for this rebase.
…elative path Upstream stablyai#34779 looks up staged renames by file.relativePath, which for a folder tab is relative to the folder while git status paths are relative to the repo, so a folder tab never got its branchOldPath.
Problem
Opening a staged rename (
git mv, with or without edits) from Staged Changes showed every line as added. The staged diff loader readHEAD:<destination>, which does not exist for a renamed file, so the original side was empty.Fix
readGitBlobAtOidPath(worktreePath, 'HEAD', options.oldPath ?? filePath, options).oldPathis part of the staged read's cache/in-flight key.oldPathis threaded through desktop IPC (validated at the host boundary, inside the existing WSL wake wrapper), runtime RPC, the git provider, the web API and mobile diff/tab handoff. Staged tabs keep it in the existingbranchOldPathfield, and status reconciliation updates or clears it. Mobile file tabs invalidate their preview when it changes.Validation
staged-rename-diff-real-git.test.ts(real Git: a pure rename, and an edited rename followed by a later unstaged edit) fails without the fix and passes with it.pnpm tcandORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2pass after rebasing onto current main.