Skip to content

fix(app): show review diffs for non-git VCS backends - #46684

Merged
Hona merged 1 commit into
anomalyco:v2from
mayamika:plugin-vcs-review
Sep 3, 2026
Merged

Hona merged 1 commit into
anomalyco:v2from
mayamika:plugin-vcs-review

Conversation

@mayamika

@mayamika mayamika commented Sep 1, 2026 •

Copy link
Copy Markdown

Issue for this PR

Fixes #46472

Type of change

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

What does this PR do?

Makes the session review panel work for non-git VCS backends — Mercurial or any plugin-registered one.

normalizeProjectInfo rewrote every backend except git to undefined, and the review model gated its diff queries on vcs === "git", so the panel never left the empty state even though the server already returns those diffs. Dropped the rewrite and changed the five gates to check for any backend instead.

How did you verify your code works?

  • Opened the review panel on a Mercurial repository — file list and diff show up.
  • Added a unit test for normalizeProjectInfo.

Screenshots / recordings

Before
before
before2

After
after
before2

Checklist

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

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

The project schema accepts any VCS backend, but normalizeProjectInfo rewrote everything except git to undefined and the review model gated its diff queries on `vcs === "git"`. Mercurial and plugin-registered backends therefore got the "create a Git repository" empty state even though the server returns their diffs through the VCS dispatcher. Drop the rewrite and gate on any backend instead.

Co-Authored-By: Claude Opus 5 <[email protected]>
@Hona
Hona merged commit 4beaffb into anomalyco:v2 Sep 3, 2026
6 checks passed
@mayamika
mayamika deleted the plugin-vcs-review branch September 3, 2026 09:31
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants