Skip to content

Conversation

@sreya
Copy link
Contributor

@sreya sreya commented Nov 18, 2025

I'm going to try to articulate the problem as best as I understand it at the moment. Web terminals are currently used in the current cases:

  • Desktop builds + remote workspace
  • Remote workspace + any workspace

In order to make web terminals work we need to have access to a pty handle aka we have to use node-pty. The problem is that we basically distribute two versions of mux: an electron variant for desktop usage, and a server variant. node-pty doesn't bundle any linux prebuilds so when you run npm install mux it has to build node-pty from source but it inevitably fails for a lot of cases because the environment lacks the build tools. To fix this you can use something like @lydell/node-pty but then you break the electron use case because the prebuilds it bundles for mac aren't for the electron ABI and it doesn't bundle source files so it can't build from source.

The fucked solution I came up with is to basically include both with @lydell/node-pty as an optional dependency. What happens at runtime is it tries to use @lydell/node-pty first, (which should succeed for the linux use case) and if not falls back to regular ole node-pty which should be fine for desktop applications.

Developers have to run make dev moving forward if developing for the desktop use case (which they have to anyway?)

@sreya
Copy link
Contributor Author

sreya commented Nov 18, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sreya
Copy link
Contributor Author

sreya commented Nov 18, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sreya
Copy link
Contributor Author

sreya commented Nov 18, 2025

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sreya
Copy link
Contributor Author

sreya commented Nov 18, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Swish!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

"electron": "^38.2.1"
"electron": "^38.2.1",
"@lydell/node-pty": "1.1.0",
"node-pty": "1.1.0-beta39"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be needed at all anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i need regular node-pty for electron

@sreya sreya force-pushed the ptyfix branch 2 times, most recently from dc816a9 to 97a28e4 Compare November 20, 2025 17:25
@sreya sreya added this pull request to the merge queue Nov 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2025
@sreya
Copy link
Contributor Author

sreya commented Nov 20, 2025

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. Can't wait for the next one!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@sreya sreya added this pull request to the merge queue Nov 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 20, 2025
@sreya sreya added this pull request to the merge queue Nov 20, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 20, 2025
@sreya sreya merged commit 8d5d74d into main Nov 20, 2025
18 of 25 checks passed
@sreya sreya deleted the ptyfix branch November 20, 2025 18:47
@sreya sreya restored the ptyfix branch November 20, 2025 19:09
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.

2 participants