fix(opencode): normalize embedded WebUI paths on Windows#19333
Open
stenci wants to merge 1 commit intoanomalyco:devfrom
Open
fix(opencode): normalize embedded WebUI paths on Windows#19333stenci wants to merge 1 commit intoanomalyco:devfrom
stenci wants to merge 1 commit intoanomalyco:devfrom
Conversation
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Author
|
The typecheck failure looks unrelated to this PR. The only file changed here is Recent Could someone rerun the |
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.
Issue for this PR
Closes #19332
Type of change
What does this PR do?
Windows desktop dev was failing after the embedded WebUI change because
packages/opencode/script/build.tsgeneratedopencode-web-ui.gen.tswith backslashes in string literals.That broke generated code like
assets\xml-.../C:\...\assets\xml-..., where\xis treated as the start of an escape sequence by Bun while parsing the generated module.This changes the generated import paths and file map keys to use forward slashes, which keeps the generated module valid on Windows while preserving the same file mapping.
How did you verify your code works?
I reproduced the failure on Windows by updating local
devto currentupstream/devand runningstart_desktop.cmd.Before this change, desktop startup failed with a syntax error in generated
opencode-web-ui.gen.ts.After this change,
bun run dev:desktopgets past that generated-file syntax error and desktop dev starts correctly.Screenshots / recordings
N/A
Checklist