Skip to content

Comments

fix(desktop): change detection on Windows, especially Cygwin#13659

Merged
Hona merged 9 commits intoanomalyco:devfrom
edemaine:review-changes-fixes
Feb 22, 2026
Merged

fix(desktop): change detection on Windows, especially Cygwin#13659
Hona merged 9 commits intoanomalyco:devfrom
edemaine:review-changes-fixes

Conversation

@edemaine
Copy link
Contributor

@edemaine edemaine commented Feb 14, 2026

What does this PR do?

Fixes #12849: the Review tab on Desktop now works for me on Windows. The root cause turned out to be that I was using Cygwin's git, which reports paths in a slightly funny way (/cygpath/c/... instead of C:\...). But it's an easy fix. While I was figuring things out, I also improved a few related things related to the review panel and change detection.

I separated out the changes into four commits, for easier review or dropping some changes if you don't approve them:

  1. Fix watcher path normalization on Windows: Normalize Windows watcher/file paths more robustly (e.g. mixed case). Previously, file changes didn't always show up when the file was open in a panel.
  2. Tell user if no git/VCS detected, so changes are disabled: I had to query the server with /project/current to discover that VCS/git wasn't detected, which was the root cause for changes not being detected. I didn't even know changes were VCS based, though it makes sense. (I guessed as much in Review tab always empty on Windows #12849.) Now the user gets a helpful message if they open a non-VCS project, or as in my case, VCS wasn't correctly detected. This explains the no-changes behavior for non-VCS projects.
  3. Enable file watcher in non-VCS projects: Previously, file watching was only enabled on projects with VCS. But file watching is used to keep the file/tree views up-to-date, and they make sense even in non-VCS projects. I bumped into this while testing (1).
  4. Support Cygwin/WSL paths when working with git: This fixes the main issue I was having: git on my path is from Cygwin, which reports paths as /cygdrive/c/... instead of C:\.... I also included support for /mnt/c/... style paths in case someone is using WSL git. Both of these path mappings only apply to win32 systems, so they should be relatively safe, and broaden support. I know Cygwin is niche, but I hope you'll consider the minor change necessary to support it. (For me it's a pain to run two types of Git, because they don't cooperate well on .git files.)
  5. Refactor Windows path handling into shared helper: I found code in the bash tool that handled Windows paths of the form /c/... that should behave the same as (4), so I factored out a shared helper and used it there as well.

How did you verify your code works?

  • I did a bunch of manual testing within bun run dev:desktop, in particular to see that file watching works better now. Also made changes to a file within a VCS project and saw them appear in the Changes panel.
  • Desktop watcher fix has a new test that passes
  • packages/app tests pass
  • packages/opencode has broader Windows test failures currently (many path-format expectation mismatches), but the number of failures went down from 74 to 43. I also have some more commits that reduce the number down to 8, but I think I'll leave them for a subsequent PR (fix: Windows path support and canonicalization #13671) as it targets far outside the Review tab.

@Hona
Copy link
Member

Hona commented Feb 22, 2026

vouch @edemaine

opencode-agent bot pushed a commit that referenced this pull request Feb 22, 2026
@Hona Hona enabled auto-merge (squash) February 22, 2026 23:17
@Hona Hona disabled auto-merge February 22, 2026 23:48
@Hona Hona merged commit a74fedd into anomalyco:dev Feb 22, 2026
6 of 8 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.

Review tab always empty on Windows

2 participants