Skip to content

chore(desktop): stop bundling node-pty in the desktop app - #4824

Merged
devswha merged 3 commits into
mainfrom
chore/desktop-drop-node-pty
Nov 26, 2026
Merged

devswha merged 3 commits into
mainfrom
chore/desktop-drop-node-pty

Conversation

@devswha

@devswha devswha commented Nov 26, 2026

Copy link
Copy Markdown
Owner

What

The desktop app no longer carries node-pty (nodePty: false in app/electron/scripts/build.ts).

Why

The app's terminals run in hc (herdr-core) and its server on the bundled Bun, which never loads node-pty. The Node sidecar could only run where the PC happened to have Node 18+ on its PATH. The one thing in the app that needs a PTY host of the server's own is the private sign-in terminal (server/usage-login.ts, follow mode). On macOS and Linux it runs on the Rust PTY host the app already carries. On Windows, which has no Rust host, a sign-in from Settings now opens in a terminal tab, the existing fallback (follow_unsupported).

Owner's decision (2026-11-26): "데스크톱 앱에서 node-pty를 빼" ("take node-pty out of the desktop app"), then "그냥 빼라" ("just remove it").

First of three PRs removing the Node PTY sidecar: this one; the CI switch to the Rust host; then the full removal.

Validation

  • Built on Linux x64 (old-desktop): bun scripts/build.ts stage + bun run dist → AppImage and deb. stage/ holds no node-pty (find stage -path '*node-pty*' is empty); stage/server/bin has ovis-pty-sidecar and ovis-acp-keeper.
  • bun scripts/e2e.ts dist/Ovis-linux-x64.AppImage: 33/33 checks passed (first launch, a terminal and an agent pane in the app's core, quit/relaunch, tray, killed app).
  • app/electron: bun test scripts 31 pass.
  • Not run: macOS and Windows builds (desktop-check.yml builds Linux x64 and Windows x64 on this PR).

The app's terminals run in hc and its server on the bundled Bun, which never loads node-pty. Only a
private sign-in terminal needs a PTY host of the server's own: the Rust host the app carries on macOS
and Linux. On Windows a sign-in from Settings opens in a terminal tab.
@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Changes
    • The desktop app no longer includes a Node-based terminal host. Terminals run in hc, and the private sign-in terminal uses the app’s Rust terminal host when available.
    • On Windows, signing in from Settings offers a terminal tab instead.
    • Updated build guidance to clarify when the Rust terminal host is included.

The desktop build no longer requests the Node PTY implementation. The build script updates its missing-sidecar message, and the README and changelog describe the Rust PTY host and sign-in terminal alternatives.

Changes: Desktop PTY packaging

Layer / File(s) Summary
PTY staging and terminal options
app/electron/scripts/build.ts, app/electron/README.md, changelog.d/desktop-app-without-node-pty.md
Server staging sets nodePty to false. The missing-sidecar message is limited to non-Windows builds. The README and changelog describe the Rust PTY host and sign-in terminal alternatives.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Possibly related PRs

  • devswha/ovis#1859: Adds Rust PTY host binaries to release and installation paths, which this change describes as the app’s PTY host.
Merge Risk: Minimal · previous review f8138

The desktop app stops bundling node-pty. Terminals keep running in hc, and sign-in has a terminal-tab fallback on Windows. No merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: the desktop app stops bundling node-pty. It is specific, follows the conventional-commit style, and matches the objectives and the build.ts change (nodePty: false).
Description check Passed The description covers the What, Why, and Validation sections, which match the template's Change and Validation sections. It names the changed file, explains the Windows fallback and the reasoning, an…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the What, Why, and Validation sections, which match the template's Change and Validation sections. It names the changed file, explains the Windows fallback and the reasoning, and lists the checks run and those skipped (macOS and Windows builds). It does not link an issue, but the template asks for one only for features, and this is a chore. It also follows the changelog convention of changelog.d/ implicitly through the changelog entry, though the description does not mention the changelog or the contract-test note for HTTP/WS changes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between ba4d41e and f813829.

Files selected for processing: 3

  • app/electron/README.md
  • app/electron/scripts/build.ts
  • changelog.d/desktop-app-without-node-pty.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

@devswha
devswha merged commit 7d1d71a into main Nov 26, 2026
17 checks passed
@devswha

devswha commented Nov 26, 2026

Copy link
Copy Markdown
Owner Author

Merged through pr-merge at head f16e271d8. Seen before the merge was asked for: required checks green, no unresolved thread, no conflict, no hold, main not red, no release in progress. CodeRabbit reviewed this head.

main had moved since the checks of f813829a0: pr-merge --update merged it in (a51752c36), and every required check was green at this head.

main moved but untouched: merged without update. Its new commits up to a1658f001 change no file of this pull request, none imported by one, nothing that decides which checks run, and no core path.

Reviews: omo gate (dori review) CLEAR at f813829; one Codex adversarial review (team proxy gpt-6.2-sol-fast, xhigh) found no HIGH or MEDIUM, its LOW wording fixed; CodeRabbit reviewed the head. On the owner's word relayed by the lead: "데스크톱 앱에서 node-pty를 빼", then "그냥 빼라".

@devswha
devswha deleted the chore/desktop-drop-node-pty branch November 26, 2026 14:49
devswha added a commit that referenced this pull request Nov 26, 2026
…y terminal (#4826)

## What

The Node PTY sidecar is removed. On Linux and macOS the Rust PTY host
(`crates/pty-sidecar`) runs every terminal the server attaches itself.

- `server/pty`: `pty-host.mjs` and `smoke.mjs` are gone; `PtySession`
spawns only the Rust host. Without one that passes its check, the server
says once, on stderr, why and how to get one (`bun
scripts/pty-sidecar.ts install`, `cargo build --release --manifest-path
crates/pty-sidecar/Cargo.toml`, or `OVIS_PTY_SIDECAR_BIN` in a folder
that is not mounted noexec), and herdr's panes are mirrored
(`sidecarAvailable()` is false). A host that ends by a signal the server
did not send is reported; the next attach starts a new one. An old
`OVIS_PTY_SIDECAR=node` is said once to be gone.
- `@lydell/node-pty` leaves `package.json`/`bun.lock`;
`scripts/server-artifact.ts` loses the node-pty staging, its pins and
`nodePty`.
- `install.sh`: no more Node install/link for terminals; when the Rust
host does not run it says so with the fix. (Node is still fetched,
temporarily and only where openssl 3 and node are both missing, for the
release signature check.)
- Remote PC bundles: no Node 22 or node-pty. Linux/macOS bundles now
require the Rust host (`HERDR_BUNDLE_PTY_SIDECAR`, which CI always sets)
and smoke-test it; the remote installer (`server/remote-host.ts`) checks
`bin/ovis-pty-sidecar` and runs it on a pty before activating. A
connection server from this commit installing the current `remote-v54`
bundle still works: that bundle carries the Rust host.
`REMOTE_BUNDLE_VERSION` is not raised here: per docs/development.md the
release PR raises it.
- Tests that forced the Node host now run on the Rust host;
`scripts/install-node-fallback.test.ts` becomes
`scripts/install-pty-host.test.ts` (the host check and architecture pick
only); `scripts/pty-sidecar-bench.ts` (Node vs Rust) is gone. Docs,
AGENTS.md and the plugin preflight no longer describe a Node fallback
(the crate's README is left with the crate, below).

## Where the Rust host cannot run

noexec mounts, containers that cannot open a pty, and source checkouts
with no matching binary now end with a clear message and mirrored panes
instead of the Node fallback. A checkout of main whose
`crates/pty-sidecar` changed since the release gets a binary from the
daily beta's `pty-sidecar-<tree>` prerelease
(`.github/workflows/beta.yml`), or from `cargo build` at once. This PR
leaves the crate exactly as released (its tree stays d256ef2), so every
install keeps taking the release's binary. The crate's own README and
comments still name the Node host; they change with the crate's next
code change.

Depends on #4825 (the CI change: it must merge first so CI has the Rust
host) and contains #4824 (the desktop app). Until they merge, this PR's
diff shows their commits too; its own changes are in the commits after
them.

Owner's decision (2026-11-26, relayed): "아니야 통계 볼필요도없겠다 그냥 빼라" ("no need
to look at stats, just remove it").

## Validation

- `bun run typecheck`: ok. Focused: `bun test server/pty
scripts/remote-bundles-workflow.test.ts scripts/server-artifact.test.ts
scripts/install-pty-host.test.ts scripts/pty-sidecar.test.ts
server/usage-login-private.test.ts server/conventions.test.ts
scripts/conventions.test.ts scripts/ci-setup.test.ts
scripts/ci-test-timings.test.ts scripts/fixed-waits.test.ts
server/machines.test.ts`: 307 pass.
- On old-desktop with the Rust host, at this head: `bun run check fast`:
unit 28714 pass, 1 fail (`server/account/device-journal.test.ts` G15, a
30 s timeout under the full run's load; 16/16 alone, three times). `bun
run check integration`: 2832 pass; its 15 failures are the
`claude-session.contract` ones that fail the same on origin/main there.
`bun scripts/ui-terminal-regression.ts`: exit 0 (27 PASS).
`app/electron` `bun test scripts`: 31 pass.
`scripts/output-browser-qa.ts` fails on that PC on origin/main too (with
either host), so it is left to CI's runner image.
- The remote installer's new smoke command, run by hand: passes the real
host with an empty PATH, refuses `/usr/bin/true`.
- One Codex adversarial review (team proxy, gpt-6.2-sol-fast, xhigh),
fixed in one round: remote bundle CI had no Rust host (HIGH: the PR
job's Node-only bundle and the tag's ssh job now build with it), the
herdr-core live job had none (HIGH: fixed in the CI PR), smoke tests
that `/usr/bin/true` passed (identity check added), a vanished host's
error now says how to fix it, an earlier install's private Node stays on
install.sh's PATH for the signature check, and install.sh counts a
cargo-built host. Left as is: installing a pre-Rust-host release
(v0.4.x) through `OVIS_REF` on a PC without Node no longer gets Node
installed for it; a host removed after startup is not switched to
mirroring at runtime (the attach fails with the fix in its message);
`REMOTE_BUNDLE_VERSION` stays for the release PR, as docs/development.md
says.
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.

1 participant