fix: use current page port instead of hardcoded 4096#5949
Merged
adamdotdevin merged 1 commit intoanomalyco:devfrom Dec 22, 2025
Merged
fix: use current page port instead of hardcoded 4096#5949adamdotdevin merged 1 commit intoanomalyco:devfrom
adamdotdevin merged 1 commit intoanomalyco:devfrom
Conversation
Fixes anomalyco#5928 When accessing via localhost/127.0.0.1, use location.host to preserve the actual port the server is running on, instead of hardcoding to 4096. Co-Authored-By: Claude <[email protected]>
adamdotdevin
added a commit
that referenced
this pull request
Dec 22, 2025
This reverts commit d04a72a.
Contributor
Author
|
Thanks for the quick review! I noticed it was reverted - is there anything I should adjust for the fix? Happy to submit a new PR if needed. |
Member
Unfortunately this broke the tauri desktop app! |
majiayu000
added a commit
to majiayu000/opencode
that referenced
this pull request
Dec 22, 2025
This fix addresses issue anomalyco#5928 where `opencode --port=8080` fails because the port is hardcoded to 4096. The previous fix (anomalyco#5949) was reverted because it broke the Tauri desktop application. This implementation: - Preserves the priority of `window.__OPENCODE__` check for Tauri apps - Only adds localhost/127.0.0.1 detection as a fallback before "/" - Uses `location.host` to dynamically get the correct port for web browsers - Does not affect Tauri desktop app which has its own port management Fixes anomalyco#5928 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Contributor
Author
|
Hi @adamdotdevin , I fix this problem in #5967. |
rekram1-node
pushed a commit
that referenced
this pull request
Dec 27, 2025
Co-authored-by: Claude <[email protected]>
rekram1-node
pushed a commit
that referenced
this pull request
Dec 27, 2025
This reverts commit d04a72a.
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.
Summary
location.hostfor localhost/127.0.0.1 to preserve actual server portopencode --port=8080to work correctly with web interfaceFixes #5928