Skip to content

fix(macOS): preserve PTYs, finish shutdown and fit usage reports - #171

Merged
howdeploy merged 4 commits into
howdeploy:mainfrom
teo-nex:fix/macos-beta2-lifecycle
Oct 31, 2026
Merged

howdeploy merged 4 commits into
howdeploy:mainfrom
teo-nex:fix/macos-beta2-lifecycle

Conversation

@teo-nex

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

Copy link
Copy Markdown
Contributor

On macOS, closing the main window destroyed xterm while its PTYs remained alive; a companion-service rejection could also abort the quit sequence before terminal shutdown and the final save. Keep the window hidden on close, restore it on Dock activation, and continue independent cleanup after service failures while still awaiting PTY exits.

At the minimum 920×620 window with 125% UI scale, the usage report clipped its Sources tab and paging controls. Constrain the Mac report grid to its available height and compact the header at short heights.

Large Mac history snapshots now use asynchronous gzip level 1 in an atomic v3 JSON envelope. Events and collector cursors remain in one transaction with the existing collection frequency, retention and fsync/rename protocol. A local 27.1 MB snapshot became 6.1 MB (77.35% fewer serialized bytes); this is not a claim about total CPU speed or physical SSD writes. Small snapshots remain v2. Both versions load on Mac; the included exporter restores exact v2 bytes for downgrade. Older builds preserve v3 untouched but cannot read it. Linux/Windows retain their v2 writer and previous shutdown failure behavior.

Includes the existing deterministic browser/prompt-deadline smoke fixes and tab-aware packaged usage checks.

Validation at 038d73c:

  • Root suite: 2,569 tests, 2,563 passed, 6 skipped, zero failures.
  • Production build/typecheck and diff checks passed; focused shutdown, real-function PTY waiting and snapshot/export tests: 15/15.
  • Packaged renderer/preload: 94 checks, including all five sections at three window sizes and three UI scales (45 layouts), and next/previous paging at the minimum size. Synthetic isolated data only.
  • Actual packaged arm64 main: two launches and clean quits on isolated HOME/userData, preserving 6,000 events and collector state through v2→v3 migration and reopening; no error/fatal diagnostics.
  • Standalone Electron/xterm hidden-terminal smoke passed. Deep strict ad-hoc signature verification passed before archiving and again after extracting the candidate ZIP.
  • Go is unavailable locally, so packaging used the existing native helper artifact; its source was not changed. No notarization or public release is claimed.
  • CI for this head: 4/7 checks passed at the last check; verify, macos-cli-resolution and windows-pipe-host are still running (core CI, CanvasLink).

The installed app and active terminal processes were preserved. Long-duration human acceptance, physical keyboard behavior and native Intel Mac acceptance remain unverified. The local candidate retains version 1.8.5-beta2.

@teo-nex teo-nex changed the title fix(macOS): keep background PTYs progressing after closing the window fix(macOS): preserve PTYs, finish shutdown and fit usage reports Oct 31, 2026
@howdeploy
howdeploy changed the base branch from dev/1.8.5-beta2-optimization to main October 31, 2026 23:16
@howdeploy
howdeploy merged commit fa60cc6 into howdeploy:main Oct 31, 2026
7 checks passed
howdeploy added a commit that referenced this pull request Oct 31, 2026
Preserve the original Windows SDK and screenshot-paste commits by bbutterm (#182, #183), the remaining macOS fixes by teo-nex (#171), and the accepted Linux X11/XWayland implementation. CI passes on all platform jobs. Browser tab persistence from cododel (#172) is already present in main.
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