Skip to content

Fix windows specific diff viewing issue

Paul Slaughter requested to merge ps-fix-windows-diff-issue into main

We were naively using fsPath which transforms path using backslash separators. This caused a OS specific issue when "Windows" was detected from the user agent.

Screenshots

  1. Emulate a windows user agent
  2. Make a change to any file.
  3. Click on the file in the Source Control tab.
  4. The diff should show up 👍
Before After
Screen_Shot_2022-12-27_at_11.01.59_AM Screen_Shot_2022-12-27_at_10.49.43_AM

How to emulate a windows user agent

  • In Chrome add a "Windows" device by going to Settings > Devices > Add custom device
  • The only important thing to set here is the User agent string
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Example screenshot

Screen_Shot_2022-12-27_at_10.56.44_AM

  • Then click Toggle Device Toolbar and select your new "Windows" device.
Example screenshot

Screen_Shot_2022-12-27_at_10.59.58_AM

Edited by Paul Slaughter

Merge request reports