Skip to content

Web UI Git Changes panel shows entire file as changed instead of line-level diff #41979

Closed as not planned

Description

@vijay-cw

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

  1. Use any Git repository with a tracked source file.
  2. Make a small change to a single line, such as an indentation or whitespace change.
  3. Run:
git diff -- <file>
  1. Confirm that Git reports only a single-line hunk, for example:
@@ -10,7 +10,7 @@
-    example line
+      example line
  1. Open the same repository using the OpenCode TUI:
opencode
  1. Confirm that the TUI correctly displays only the modified line.

  2. Open the same repository using:

opencode web
  1. Open the Git Changes panel.

  2. 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

Image

Operating System

Windows 11

Terminal

No response

Activity

  1. github-actions commented on Oct 12, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions