Repository navigation
fix(editor): retain combined diff bodies on metadata updates - #35611
Conversation
a048d47 to
ffce88b
Compare
cd37876 to
f7b520b
Compare
[Medium impact] The PR appears safe to merge; no actionable new issues were found. SummaryKeeps loaded combined-diff bodies and measured heights when only entry metadata changes.
No actionable new issues were found. Review used the full PR range because the current and previously reviewed commits have different merge bases with the target commit.
|
f7b520b to
ab79718
Compare
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 19 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
ELI5
When one file's change counts update in a live combined diff, keep the other loaded files and their row heights. Revisit the view without rereading every file.
What Changed
Why
The current restore effect rebuilds every section for a single metadata delta. The complete entry-set → restore → loader/retry → status revalidation → persistence chain reproduces the unnecessary body loss and rereads. This patch adds bounded reconciliation for the stable-key case and keeps the existing reset path for structural changes.
Stacked on #35570: target branch
OrcaWin/combined-diff-path-revalidation, baseffce88b3403b4ee6e2f490accdc0532bcab23e40. Retained siblings require that PR's path-scoped revalidation. #35594's viewport queue work is independent and is not included here.Linked Issue
Refs #35479. This is a partial fix; backend subprocess cost, fetch concurrency and end-to-end latency remain outside this patch.
Visual Proof
N/A — no control, layout or interaction changes. No scrolling smoothness, latency or frame-rate claim is made.
Testing
combined-diff-metadata-retention.test.tsxdrives the real entry-set → restore → loader/retry → revalidation → persistence hooks with a mocked section fetch. Each case fails with the production files restored to the #35570 base:setSectionspersistence nudge).generationdependency on the initial-load effect).ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2passed on this head. With #35594 merged on top, all 137 combined-diff tests pass; the typecheck then needsgeneration: 0added to the loader props in #35594'scombined-diff-viewport-load-order.test.tsxharness (whichever lands second carries that line). No Electron, native macOS/Windows or live SSH run; this renderer-only change adds no transport fields or platform APIs.Review
Parent review caught and corrected destination-cache suppression across different view keys before publication. Remaining linear metadata/policy comparison is necessary because the existing cache signature omits submodule admission. No-op status arrays retain the same section array and perform no scheduled work.
Existing #35048 owns physical read cancellation; integration must preserve its separate reset cleanup. This patch retains current whole-reset cancellation behavior.
Agent skill upstream boundary
Checklist