Skip to content

fix(macOS): keep background PTYs progressing after closing the window - #171

Open
teo-nex wants to merge 3 commits into
howdeploy:dev/1.8.5-beta2-optimizationfrom
teo-nex:fix/macos-beta2-lifecycle
Open

teo-nex wants to merge 3 commits into
howdeploy:dev/1.8.5-beta2-optimizationfrom
teo-nex:fix/macos-beta2-lifecycle

Conversation

@teo-nex

@teo-nex teo-nex commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Closing the main window on macOS destroys xterm while its PTYs remain alive. In the released beta2 app, a 5 MiB producer stopped at parser backpressure during a 65-second closed-window interval; reopening rebuilt the renderer and terminal DOM. Keep the Mac window hidden on close and raise it on Dock activation, including when a plugin window remains open. Quit still destroys the window, and Windows/Linux keep their existing close path.

Separate test commits wait for a new browser document revision, give the successful prompt-acknowledgement scenario its own deadline while retaining short timeout coverage, and inspect renderer splitting in memory without writing temporary bundle files. No tests or runtime platform adapters were removed.

Validation:

  • Root suite: 2,560 tests, 2,533 passed, 27 skipped, no failures. Additional native helper MCP/runtime/launch parity: 23/23 passed without skips; these overlap the root suite and are reported separately.
  • Production build/typecheck, secret audit and diff checks passed.
  • The isolated arm64 packaged app passed wallpaper, real PTY arrow history, F2 rename, fast drag, fullscreen xterm retention, two browser tabs and Fine Dots plugin preview/install/update checks.
  • A 65-second close/reopen regression retained the same renderer/xterm and let the producer finish while closed. A separate three-terminal, 20-fullscreen-toggle, 65-second closed-window sample retained xterm/output and measured rAF 90.70 → 92.47 fps (p95 10.9 → 11.0 ms). This single cycle does not establish long-session leak freedom or a performance speedup.
  • Deep strict ad-hoc signature verification passed. Go is unavailable locally, so the app reuses the unchanged native helper from the verified official beta2 archive. Payloads match after removing signatures from temporary binary copies; packaging re-signs the helper.
  • Production dependency audit reports zero known vulnerabilities. Five package advisories remain in development/build tooling; dependencies were not changed here.

The user's installed app and active terminal processes were preserved. Native Intel Mac/Windows/Linux acceptance and physical keyboard behavior are not established by this Apple Silicon run.

This targets the beta2 development branch that selectively incorporated #170; main is still at 1.8.4.

All seven CI jobs passed at 572dde6: core CI (macOS package/CLI/hidden-terminal/browser, Linux verify, Windows pipe-host, both mascot jobs) and CanvasLink contracts/Android debug. The macOS runner builds the native helper from source with Go before its tests and packaged-app checks.

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