anomalyco / anomalyco/opencode
Web UI Git Changes panel shows entire file as changed instead of line-level diff
@Hona is already working on this.
Since Aug 12, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
Description
The OpenCode Web UI (opencode web) incorrectly renders an entire tracked file as changed in the Git Changes panel, even when the underlying Git diff contains only a single-line change.
The same diff is rendered correctly in the OpenCode TUI.
Reproduction Steps
- Use any Git repository with a tracked source file.
- Make a small change to a single line, such as an indentation or whitespace change.
- Run:
git diff -- <file>
- Confirm that Git reports only a single-line hunk, for example:
@@ -10,7 +10,7 @@
- example line
+ example line
- Open the same repository using the OpenCode TUI:
opencode
-
Confirm that the TUI correctly displays only the modified line.
-
Open the same repository using:
opencode web
-
Open the Git Changes panel.
-
The Web UI displays the entire file as changed instead of displaying only the actual changed line.
Expected Behavior
The Web UI Git Changes panel should display the same hunk-level diff provided by Git.
Only the lines actually added or removed should be highlighted.
Actual Behavior
The Web UI displays the entire file as changed, even though the underlying Git diff contains only a single-line hunk.
Evidence
The same repository state produces different results:
Git CLI
↓
Correct single-line diff
OpenCode TUI
↓
Correct single-line diff
OpenCode Web UI
↓
Entire file appears changed
This suggests that the underlying Git diff is correct and that the issue is likely occurring during Web UI diff processing or rendering.
Environment
- OS: Windows
- OpenCode version:
1.18.16 - Git version:
2.52.0.windows.1 - OpenCode interface: Web UI
Additional Verification
The issue is reproducible with a simple one-line whitespace/indentation change.
The raw git diff does not show the entire file as modified.
The OpenCode TUI correctly renders the same diff.
Therefore, this does not appear to be a Git whole-file diff or an EOL conversion issue.
Expected Result Across Interfaces
Both interfaces should represent the same underlying Git diff:
Git diff
↓
TUI → single changed line
Web UI → single changed line
Instead, the current behavior is:
Git diff
↓
TUI → correct
Web UI → entire file changed
Request
Please investigate the Web UI Git Changes diff rendering to determine why a valid hunk-level Git diff is being rendered as a full-file change.
Plugins
No response
OpenCode version
1.18.16
Steps to reproduce
No response
Screenshot and/or share link
Operating System
Windows 11
Terminal
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.