Skip to content

server: ensure frontend has correct port for PTY websocket connections#5898

Merged
adamdotdevin merged 3 commits intoanomalyco:devfrom
ashutoshpw:fix/pty-websocket-port
Dec 22, 2025
Merged

server: ensure frontend has correct port for PTY websocket connections#5898
adamdotdevin merged 3 commits intoanomalyco:devfrom
ashutoshpw:fix/pty-websocket-port

Conversation

@ashutoshpw
Copy link
Copy Markdown
Contributor

@ashutoshpw ashutoshpw commented Dec 21, 2025

This PR fixes the PTY WebSocket URL construction by injecting the server port into the frontend HTML via a script tag. This ensures that the frontend can correctly resolve the PTY connection even when running on a different port than the default.

  • packages/desktop/src/app.tsx: fallback to window.location.origin for sdk url
  • packages/opencode/src/server/server.ts: inject server port into frontend HTML via script tag

Resolves #5844

@adamdotdevin
Copy link
Copy Markdown
Member

Closing in favor of #5949 but thank you for submitting!

@adamdotdevin adamdotdevin reopened this Dec 22, 2025
@adamdotdevin adamdotdevin merged commit a05915d into anomalyco:dev Dec 22, 2025
adamdotdevin added a commit that referenced this pull request Dec 22, 2025
rekram1-node pushed a commit that referenced this pull request Dec 27, 2025
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.

Bug: Web terminal fails when accessing via network IP instead of localhost

2 participants