Skip to content

fix: remount expanded file diff when content changes#799

Merged
Mng-dev-ai merged 1 commit into
mainfrom
fix/diff-file-remount-on-content-change
Jul 8, 2026
Merged

fix: remount expanded file diff when content changes#799
Mng-dev-ai merged 1 commit into
mainfrom
fix/diff-file-remount-on-content-change

Conversation

@Mng-dev-ai

Copy link
Copy Markdown
Owner

Summary

  • VirtualizedFileDiff caches its fileDiff on first hydration (this.fileDiff ??= fileDiff), so refetching a file with changed content never re-renders updated lines while a diff row stays expanded.
  • Keys FileDiffRenderer by reviewKeyByFile (content hash), forcing a remount when the underlying diff content changes, instead of reusing the stale cached instance.

VirtualizedFileDiff caches its fileDiff on first hydration
(this.fileDiff ??= fileDiff), so a refetch with changed content never
renders fresh lines. Keying FileDiffRenderer by the file's review
content hash forces a remount when the underlying diff changes.
@Mng-dev-ai Mng-dev-ai marked this pull request as ready for review July 8, 2026 23:28
@Mng-dev-ai Mng-dev-ai merged commit 1b9c481 into main Jul 8, 2026
2 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