Skip to content

fix(editor): scope combined diff status invalidation by path - #35570

Merged
OrcaWin merged 1 commit into
mainfrom
OrcaWin/combined-diff-path-revalidation
Oct 29, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
OrcaWin/combined-diff-path-revalidation

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​46 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​46
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​59 $\color{#cf222e}{\Huge{\mathbf{−}}}$​25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​34

A status change on one path could invalidate every loaded combined-diff row. For example, changing the staged side of one file while reviewing unstaged changes left the view's entries stable but revalidated all loaded siblings. Revalidation now compares per-path metadata, so only sections for changed paths lose their loaded state. The existing cache signature and dirty, in-flight, collapsed, offscreen, coalescing, and watch-gap recovery behavior are preserved.

This addresses part of #35479; whole-view resets when visible entry metadata changes, serial loading, queue order, and per-file Git reads remain separate work. No runtime latency or frame-rate improvement is claimed.

Testing

  • One regression test in use-combined-diff-section-revalidation.test.tsx drives the real entry-set and revalidation hooks: reordered status records reload nothing, and a staged-side change or disappearance on one path reloads only that path's loaded row. It fails with the two production files restored to main.
  • ORCA_BACKGROUND_LAUNCH=1 pnpm check:changed --maxWorkers=2: 22/22 checks passed on the rebased head. No app was launched.

Visual Proof

N/A — this changes invalidation admission without changing the rendered design. No rendered latency or frame-rate improvement is claimed.

Agent skill upstream boundary

  • Not applicable: this change copies or translates no upstream skill-installer content.

@OrcaWin
OrcaWin force-pushed the OrcaWin/combined-diff-path-revalidation branch from a048d47 to ffce88b Compare October 29, 2026 04:30
@OrcaWin
OrcaWin marked this pull request as ready for review October 29, 2026 04:44
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You'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 14 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1618b9d6-2676-4ee9-a677-db5b6789db2f
Commits

Reviewing files that changed from the base of the PR and between 3ce252c and ffce88b.

Files selected for processing: 3
  • src/renderer/src/components/editor/combined-diff/load-sections/use-combined-diff-section-revalidation.test.tsx
  • src/renderer/src/components/editor/combined-diff/load-sections/use-combined-diff-section-revalidation.ts
  • src/renderer/src/components/editor/combined-diff/resolve-changes/combined-diff-git-status-signature.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge; no actionable issues were found.

Summary

This PR limits status-driven combined-diff reloads to loaded rows whose own path metadata changed.

  • Combined-diff rows reload only when their own file status changes.

Reviews (1) · Last reviewed commit: "fix(editor): scope combined diff status ..." · Reviewed by Greptile

@OrcaWin
OrcaWin merged commit 662fd6a into main Oct 29, 2026
68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant