You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The opencode Desktop UI freezes for approximately 10–12 seconds when rendering file diffs. #31195
The opencode Desktop UI freezes for approximately 10–12 seconds when rendering file diffs. During the freeze the window becomes unresponsive and the OS may show a "not responding" warning.
To Reproduce
Open a session with a file diff visible in the conversation (e.g., after a tool edit or a write operation)
The UI freezes for ~10–12 seconds
The window recovers on its own
Expected behavior
The UI should remain responsive. Diff rendering should be asynchronous or yield to the event loop so the renderer does not block.
Stack trace (from window.log)
renderer unresponsive { window: 'main', currentURL: 'oc://renderer/index.html' }
renderer responsive { window: 'main', currentURL: 'oc://renderer/index.html' }
renderer unresponsive samples (12 samples)
at execEditLength (oc://renderer/assets/main-EPcHbCKO.js:42291:7)
at LineDiff.diffWithOptionsObj (oc://renderer/assets/main-EPcHbCKO.js:42340:21)
at LineDiff.diff (oc://renderer/assets/main-EPcHbCKO.js:42261:17)
at diffLines (oc://renderer/assets/main-EPcHbCKO.js:42491:19)
at structuredPatch (oc://renderer/assets/main-EPcHbCKO.js:42529:35)
at createTwoFilesPatch (oc://renderer/assets/main-EPcHbCKO.js:42656:22)
at parseDiffFromFile (oc://renderer/assets/main-EPcHbCKO.js:44283:32)
at fileDiffFromContent (oc://renderer/assets/session-CGwfdNgW.js:18980:10)
at fileDiffFromPatch (oc://renderer/assets/session-CGwfdNgW.js:18914:28)
at resolveFileDiff (oc://renderer/assets/session-CGwfdNgW.js:18884:47)
The call chain shows a synchronous diff computation (execEditLength → structuredPatch → createTwoFilesPatch) that blocks the SolidJS reactive graph, freezing the UI.
Additional context
The freeze is consistently reproducible when viewing diffs. The diff library being used appears to compute the LCS/edit distance synchronously on the main thread without yielding. Potential mitigations:
Offload large diffs to a Web Worker or use requestIdleCallback
Virtualize or truncate very large diffs
Use a streaming diff implementation that yields periodically
Plugins
No response
OpenCode version
1.16.2
Steps to reproduce
When I type a question, when I open OpenCode Desktop, or out of nowhere, OpenCode freezes for about 10 or 15 seconds.
Activity
github-actions commentedon Jun 7, 2026
This issue might be a duplicate of existing issues. Please check:
execEditLength→structuredPatch→createTwoFilesPatch→parseDiffFromFile). Identical stack trace pattern, same OS and version range.parseDiffFromFile()on the main thread with the same suggested mitigations.Please check whether your issue is already covered by those reports, and consider adding your observations there if so.
github-actions commentedon Aug 7, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.