Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## 2026-10-27

- [host] Rust host phase 4b (#76, ADR 0004): the Node host and node-pty are gone. Removed `src/host/index.ts`, the `host.js` build entry, `settings.nodeHost` (Settings → Advanced "Use the Node host") and `node-pty` with its rebuild (`postinstall`, `trustedDependencies`, `asarUnpack`, `npmRebuild: false`); `bun install` builds no native module. `hostBinary()` finds the binary for the app and `wraithgrid host-stdio`; a build without it can't start terminal panes, so `bun run dev`/`test:e2e` run cargo first. The Node host's server/screen/pty manager moved to `tests/support/node-host/` as the in-process host of the client unit tests (fake ptys); the parity suite runs the Rust host only, with headless xterm as the reference for resizes (30 tests). Linux package checks test `wraithgrid-host --version` instead of node-pty; README build requirements are Rust + a C linker (files: src/host/_, src/main/{host-start,app,cli-entry,ipc,pane-host,pane-router,spawn-resolve}.ts, src/shared/{types,schema,ipc-contract}.ts, src/renderer/{app/store.ts,components/SettingsView.tsx}, tests/support/node-host/_, tests/host/_, tests/unit/_, tests/e2e/{rust-host,machines}.spec.ts, package.json, bun.lock, electron.vite.config.ts, electron-builder.yml, scripts/_, README.md, docs/_)
- [cli] `wraithgrid send` marks the pane as having a conversation, as Enter typed in it does, so a restart resumes it (H6 follow-up): a new gui relay action `sent` (no host protocol change; no window open, nothing to mark); docs/TODO.md cleared of six items that had already shipped (#39–#41, file attach, delete chat confirm, sign-in dialog) (files: src/shared/ipc-contract.ts, src/main/{cli,ipc}.ts, src/renderer/app/store.ts, tests/unit/cli.test.ts, tests/e2e/cli.spec.ts, docs/TODO.md)
- [host] Old Rust hosts no longer pile up on ssh machines (#76): each connect touches this version's `~/.wraithgrid/bin/wraithgrid-host-<version>` (its date says when it was last used) and deletes other versions unused for 30 days, so two Wraithgrid versions sharing a machine don't copy theirs over again on every connect; a host still running a deleted one keeps running. `command find`, since a fish config can shadow `find` (this machine's does); tested for real in sh and fish (files: src/main/remote-bin.ts, tests/unit/remote-host.test.ts)
- [host] Rust host phase 4a (#76, ADR 0004 Accepted): terminal panes run in the Rust host by default on Linux, macOS and Windows. `settings.nodeHost` (Settings → Advanced "Use the Node host", off; `WRAITHGRID_NODE_HOST=1` in tests) replaces `rustHost`: every config saved that as false, so it is dropped on load and everyone moves to Rust; a build without the binary runs the Node host. `bun run test:e2e` builds the Rust host first, so e2e runs the default; `rust-host.spec` checks both ways (files: src/shared/{types,schema}.ts, src/main/app.ts, src/renderer/components/SettingsView.tsx, tests/e2e/{rust-host,machines}.spec.ts, package.json, docs/adr/0004-rust-pty-host.md, docs/CONTEXT.md)
Expand Down
19 changes: 10 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,32 +448,33 @@ bar, or the command palette) covers the rest:

- Node.js 22.12 or newer, and Bun 1.4 or newer (<https://bun.sh>); Bun installs and runs the
scripts, the tools themselves still run on Node
- A C++ toolchain for the `node-pty` native module:
- Arch: `sudo pacman -S --needed python make gcc`
- Ubuntu, Debian, Kali: `sudo apt install python3 make g++`
- Fedora: `sudo dnf install python3 make gcc-c++`
- Windows: Visual Studio Build Tools with "Desktop development with C++", and Python 3
- Rust (stable, <https://rustup.rs>) for the background host in `host-rs/`, with the C
linker it uses:
- Arch: `sudo pacman -S --needed gcc`
- Ubuntu, Debian, Kali: `sudo apt install gcc`
- Fedora: `sudo dnf install gcc`
- Windows: Visual Studio Build Tools with "Desktop development with C++"
- macOS: Xcode Command Line Tools (`xcode-select --install`)
- To build a Fedora `.rpm` on another distro: `rpmbuild` (`rpm-tools` on Arch, `rpm` on
Ubuntu). The pacman package needs `bsdtar` (`libarchive-tools` on Ubuntu).

```sh
bun install # installs deps and rebuilds node-pty for Electron
bun run dev # run with hot reload
bun install # installs deps (no native Node modules to build)
bun run dev # builds the Rust host, then runs with hot reload
bun run dist:linux:portable # all Linux packages, built in Docker on Ubuntu 22.04
bun run dist:win # Windows installer (run on Windows)
bun run dist:mac # macOS .dmg and .zip, Apple Silicon and Intel (run on a Mac)
```

Bun runs install scripts only for the packages in `trustedDependencies` in `package.json`
(`electron`, `esbuild`, `node-pty`); `bunfig.toml` keeps a flat `node_modules` for electron-builder.
(`electron`, `esbuild`); `bunfig.toml` keeps a flat `node_modules` for electron-builder.

<details>
<summary><b>Why the portable build?</b></summary>

<br />

`node-pty` compiles against the build machine's glibc. A package built on a rolling distro
The Rust host links against the build machine's glibc. A package built on a rolling distro
(Arch, current Fedora) only runs on distros at least as new. `dist:linux:portable` builds on
Ubuntu 22.04 (glibc 2.35) inside Docker, so one set of packages runs on Ubuntu 22.04+,
Debian 12+, Kali, Fedora and Arch. `scripts/test-linux-packages.sh` then installs each package
Expand Down
10 changes: 2 additions & 8 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading