Skip to content

fix(app): normalize path separators for session diff filtering on Windows - #10291

Merged
adamdotdevin merged 1 commit into
anomalyco:devfrom
alexyaroshuk:fix/session-diff-windows-path-separator-cleanup
Jan 23, 2026
Merged

adamdotdevin merged 1 commit into
anomalyco:devfrom
alexyaroshuk:fix/session-diff-windows-path-separator-cleanup

Conversation

@alexyaroshuk

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
xenonwellz pushed a commit to xenonwellz/opencode that referenced this pull request Jan 28, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
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