Skip to content

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

Merged
adamdotdevin merged 3 commits into
anomalyco: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 into
anomalyco:devfrom
ashutoshpw:fix/pty-websocket-port

Conversation

@ashutoshpw

@ashutoshpw ashutoshpw commented Dec 21, 2025

Copy link
Copy Markdown
Contributor

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
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
Rwanbt pushed a commit to Rwanbt/opencode that referenced this pull request May 5, 2026
Rwanbt pushed a commit to Rwanbt/opencode that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
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