Fix Copy Mode scrollback and app-host lifecycle regressions

Merged
AU
2mo ago
+1657-453

Summary

This PR fixes the confirmed session-specific Copy Mode scrollback failure. Copy Mode keeps wheel and Page Up/Page Down navigation local to the affected terminal session while preserving the program's DEC mouse and alternate-screen modes; leaving Copy Mode restores application input ownership. The parent pins Ghostty a3e9304c5d19c8667f58a342830f774579c74472 and its verified universal ReleaseFast GhosttyKit archive.

The same change set closes app-host lifecycle races exposed by the full test suite: transcript streaming shuts down terminally, unrealized compositor windows are ignored, and provisional sidebar drag delegates cannot form forwarding cycles. Cloud shortcut, Computer Use, screenshot, port-observation, browser smooth-scroll, and VM-SSH fixtures now exercise their runtime paths deterministically.

The Swift package dependency uses the immutable published Iroh FFI release 1.0.2-cmux.7.ios17.3 at af08f0e1b9bb3ddb839210b175738d5761fea686, whose XCFramework archive checksum is f1605640a02925dd0941c15765162fac872c449e5e56d39c035ee163d409527e.

Testing

Hosted validation is the required path for this Mac; no local reload.sh, xcodebuild, app swift build, or local test target was run.

On exact head ccec7aeafc (merged with origin/main at aaefd83646):

  • Swift file-length budget, Swift syntax, package-resolved policy, workspace grouping, test wiring, and diff checks pass.
  • Prior CI run 36105046406 passed compile admission, Swift package tests, release admission, CLI product tests, tests-build-and-lag, GhosttyKit, Claude wrapper, relay TLS, web, and all guard lanes.
  • That run's remaining broad app-host failures were isolated to baseline auto-resume/session-persistence/Kiro feed suites plus one Computer Use socket fixture. The Computer Use failure was actionable and is fixed here by creating the fixture's runtime socket directory before binding; the other failures are unrelated baseline churn.
  • The latest main merge is pushed as ccec7aeafc; fresh CI is starting for that exact head. Earlier red checks were pre-execution shared-runner capacity refusals or broad baseline app-host suites; compile/package gates passed on the prior corrected head.

Developer build

The first exact-SHA fleet job failed before meaningful compilation on cmux26s-Mac-mini.local (cmux_build exit status 1 after dependency readiness); receipt: artifacts/fleet/44d1296ab363f92459b0e37e675b8f3a1005e2f9-terminal.json. The retry for that superseded SHA was cancelled after this fix; no local build fallback was used.

Review status

The prior actionable review findings are addressed: the Copy Mode gate captures selected output, the Copy Mode suite has no fixed time limit, lifecycle shutdown is explicit and synchronous, fixture teardown resets routing state, and the Iroh lockfiles and Xcode package requirement all point at the same immutable release.

Related to #12789.

Latest main merge

Merged origin/main at aaefd83646. Kept main’s Ghostty replay-trailing-rows pin and checksum, main’s unknown-liveness restore fix, current Computer Use and visibility test fixtures, and restored this PR’s test target wiring after the Xcode project reshuffle.