Skip to content

feat(desktop): integrated terminal — server + container shells - #17

Open
lam0819 wants to merge 4 commits into
plan/neo-desktop-tray-appfrom
port-terminal
Open

feat(desktop): integrated terminal — server + container shells#17
lam0819 wants to merge 4 commits into
plan/neo-desktop-tray-appfrom
port-terminal

Conversation

@lam0819

@lam0819 lam0819 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Ports the integrated terminal onto the mature desktop app (branch plan/neo-desktop-tray-app).

What

A Terminal panel in the management window:

  • Tabbed server SSH shells and per-app container shells (docker exec -it … sh)
  • Full-screen toggle, live resize, up to 6 tabs

How (self-contained, low-risk)

  • internal/ssh: Executor.InteractiveShell — PTY session bridging stdio + an out-of-band resize control frame (\x1eR<cols>x<rows>\nWindowChange).
  • cmd/neo-bridge: new pty subcommand — raw interactive mode reusing neo's own SSH auth (no key hunting). Bypasses the JSON protocol server.
  • src-tauri/pty.rs: spawns neo-bridge pty via std::process (posix_spawn — avoids the macOS "crashed on child side of fork pre-exec" abort) and streams raw bytes (the shell plugin line-buffers, which breaks per-keystroke echo and $ /password: prompts).
  • frontend: xterm.js TerminalPanel + terminals store + TerminalSection, added as one .panel in Management.tsx. No changes to tauri-api, the apps table, or servers UI.

Validation

  • npm run build (tsc strict) ✓
  • tauri build --target aarch64-apple-darwin ✓ (Rust + bundle)
  • Manually: server shell + container shell connect over flint-153, per-key echo + resize correct.

Does not touch the bridge JSON protocol, updater, or existing tests.

Adds a Terminal panel to the management window: tabbed server SSH shells and
per-app container shells (docker exec), full-screen toggle, live resize.

- internal/ssh: Executor.InteractiveShell — PTY-backed session bridging stdio,
  with an out-of-band resize control frame (WindowChange).
- cmd/neo-bridge: `pty` subcommand — raw interactive mode reusing neo's SSH
  auth (login shell or `docker exec -it <container> sh`).
- src-tauri/pty.rs: spawns `neo-bridge pty` via std::process (posix_spawn — no
  fork abort on macOS) and streams raw bytes (no line buffering), so per-key
  echo and prompts render correctly. Commands: pty_spawn/write/resize/kill.
- frontend: xterm.js TerminalPanel + tabs store + TerminalSection wired into
  Management. Bridge resolves auth, so tabs need only a server name (+ app).
The release build passed APPLE_CERTIFICATE unconditionally; with no cert
secret Tauri still ran `security import` and aborted ("failed to import
keychain certificate"), failing darwin-aarch64. Split into a signed step
(only when the cert secret exists) and an unsigned step (macOS ad-hoc;
Windows still signs via the composed thumbprint).
@lam0819

lam0819 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor Author

Also includes a release-pipeline fix: macOS signing is now gated on steps.signing.outputs.apple_cert, so a tag with no Apple cert secret produces an unsigned build instead of failing at security import (which is what broke the desktop-v0.1.0 arm64 build). After merge, tag desktop-v0.2.0 for a downloadable DMG with the terminal.

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