Skip to content

fix: Text Comparer not showing any diff on macOS and Linux - #1689

Merged
veler merged 1 commit into
DevToys-app:mainfrom
novalagung:fix/macos/text-comparer
Sep 29, 2026
Merged

veler merged 1 commit into
DevToys-app:mainfrom
novalagung:fix/macos/text-comparer

Conversation

@novalagung

@novalagung novalagung commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • New feature or enhancement
  • UI change (please include screenshot!)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Internationalization and localization
  • Other (please describe):

What is the current behavior?

Issue Number: #1296 #1623 #1562 #1541

On macOS and Linux, the Text Comparer shows both panes but never renders any +/- highlighting. Monaco editor computes diffs in a web worker, and labels that worker with a URL fragment:

app://localhost/.../vs/base/worker/workerMain.js#editorWorkerService

macOS (WKWebView) and Linux (WebKitGTK) are both WebKit, and WebKit passes the fragment to the custom scheme handler. Both platforms carried the same RemovePossibleQueryString, which cut the URL at ? but not at #, so the file lookup missed and the worker received Blazor's placeholder text as its script:

SyntaxError: Unexpected identifier 'is'

No worker means no diff computation, so no decorations. Windows is unaffected because WebView2 is Chromium and doesn't pass the fragment to its resource handler.

What is the new behavior?

Build Worker request Text Comparer
before 125 bytes, There is no content at … no highlighting
after the fix 309 809 bytes of worker source highlighting

Verified on macOS 26.5 arm64 and Ubuntu 26.04.

Other information

Quality check

Before creating this PR:

  • Did you follow the code style guideline as described in CONTRIBUTING.md
  • Did you build the app and test your changes?
  • Did you check for accessibility? On Windows, you can use Accessibility Insights for this.
  • Did you verify that the change work in Release build configuration
  • Did you verify that all unit tests pass
  • If necessary and if possible, did you verify your changes on:
    • Windows
    • macOS
    • Linux

@novalagung

novalagung commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor Author

friendly ping for @veler @btiteux, this PR fixes issue reported by user about the Text Comparer on working on MacOS & Linux

@ymoslem

ymoslem commented Sep 12, 2026 •

Copy link
Copy Markdown

I confirm that this is a bug that needs fixing. It would be good if the maintainers review this PR.

@NJRBailey

Copy link
Copy Markdown

I can confirm this PR fixes the issue on my MacBook Pro M2

Current release:
image

Local build with this PR:
image

@veler veler left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, this is awesome, thank you very much, and sorry for the late answer!

@veler
veler merged commit 452922f into DevToys-app:main Sep 29, 2026
@novalagung
novalagung deleted the fix/macos/text-comparer branch September 30, 2026 06:13
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.

4 participants