Skip to content

Conversation

@alexyaroshuk
Copy link
Contributor

fixes #9921

What does this PR do?

Normalizes path separators when comparing file paths in the session diff filtering logic. On Windows, path.relative() returns paths with backslashes (), but Git always outputs paths with forward slashes (/). This mismatch caused modified files to be filtered out of the session review on Windows.

The fix:
Added .replaceAll("\", "/") to normalize Windows backslashes to forward slashes before comparing against Git's output.

How did you verify your code works?

On Windows, started a new session, tested modify file, delete file and create file operations.

Before

Opencode review cannot see some files have been changed
image

After

Fixed
image

@github-actions
Copy link
Contributor

Hey! Your PR title fix(session diff): normalize path separators for session diff filtering on Windows doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@alexyaroshuk alexyaroshuk changed the title fix(session diff): normalize path separators for session diff filtering on Windows fix(app): normalize path separators for session diff filtering on Windows Jan 23, 2026
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

@adamdotdevin adamdotdevin merged commit 8a216a6 into anomalyco:dev Jan 23, 2026
6 checks passed
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.

# OpenCode Review面板显示异常:有代码更改但显示"No changes in this session yet"

2 participants