Skip to content

fix(ui): avoid blocking on large file diffs#30962

Open
xpluspro wants to merge 2 commits into
anomalyco:devfrom
xpluspro:fix/ui-large-diff-freeze
Open

fix(ui): avoid blocking on large file diffs#30962
xpluspro wants to merge 2 commits into
anomalyco:devfrom
xpluspro:fix/ui-large-diff-freeze

Conversation

@xpluspro
Copy link
Copy Markdown

@xpluspro xpluspro commented Jun 5, 2026

Issue for this PR

Closes #30906

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Large whole-file patches were reconstructed and passed through the synchronous Myers diff algorithm in the renderer, which could freeze the UI.

This change keeps patches above the existing 500 changed-line threshold or 500,000 characters on the partial patch parser path. Smaller patches still render as complete diffs.

How did you verify your code works?

Ran:

cd packages/ui && bun test src/components/session-diff.test.ts

All 12 tests passed. Added regression tests for large patches and patches with many changed lines.

Screenshots / recordings

Not applicable. This changes diff processing behavior without changing the UI.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

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.

Desktop v1.16.0 Windows: renderer unresponsive / UI freeze when computing diff of large files

1 participant