Repository navigation
fix(cli): resolve tray runtime import to a file:// URL so --tray works on Windows - #11332
Merged
diegosouzapw merged 1 commit intoAug 24, 2026
Conversation
…s on Windows loadSystray() in bin/cli/runtime/trayRuntime.ts passed the absolute path join(RUNTIME_DIR, "node_modules", SYSTRAY_PACKAGE) straight to dynamic import(). import() resolves its specifier as a URL: on Windows the leading drive letter (e.g. C:) is parsed as an unsupported URL scheme and the ESM loader rejects it, so `omniroute server --tray` never loads the tray. POSIX paths double as valid URLs, so CI stayed green and diegosouzapw#11238 missed this call site (its regression guard only scans bin/cli/**/*.mjs template-literal imports). Wrap the path in pathToFileURL().href via a small systrayModuleSpecifier() helper, and add a regression test asserting the specifier is a file:// URL.
diegosouzapw
merged commit Aug 24, 2026
644dd32
into
diegosouzapw:release/v3.8.50
14 of 16 checks passed
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…s on Windows (diegosouzapw#11332) Merged via consolidated batch validation. Fixes omniroute server --tray on Windows: absolute paths passed to dynamic import() are parsed as URLs, and a Windows drive letter (C:) isn't a supported URL scheme. Resolves via pathToFileURL. Own regression test passes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
loadSystray()inbin/cli/runtime/trayRuntime.tspassed the absolute pathjoin(RUNTIME_DIR, "node_modules", SYSTRAY_PACKAGE)straight to dynamicimport().import()resolves its specifier as a URL: on Windows the leading drive letter (C:) is parsed as an unsupported URL scheme and the ESM loader rejects it, soomniroute server --traynever loads the tray. POSIX absolute paths double as valid URLs, so CI stayed green and #11238 missed this call site (its regression guard only scansbin/cli/**/*.mjstemplate-literal imports).Fix: build the specifier through
pathToFileURL(...).hrefvia a small exportedsystrayModuleSpecifier()helper, and add a regression test asserting the specifier is afile://URL.Verified:
node --teston the new test plustray-systray-loader-4605,cli-tray-systray2,windows-esm-import-paths— all green. Same defect class as #11238/#11240.