P0 port: Ctrl-` right after Cmd-N opens its terminal (#29530, opening part)

Merged
LA
5d ago
+549-77

Summary

  • Opening part of the #29530 port to the dogfood line cp/dogfood-v2-2-12-opt (split out of #30271 by lead decision 14:4xZ). The 6 own commits of #29530 (feat merge 82a70ea57d2), by git cherry-pick -x, plus the port adaptations. Merged with the line tip 5794caeac62 (plain merge commit). No force push.
  • Found by the judged smoke gate of dogfood build v2.2.13-opt (STATUS 3190), round 2, step 16: after Cmd-N, Ctrl-ran newTab, not newSurface. #29530 fixes that:DaemonStore.daemonTarget is async, and a create (Ctrl-, Cmd-D, New Column, New Row) pressed on a stand-in pane whose own create is in flight (Cmd-N's first pane, a split) waits for the daemon's pane and is sent there, never refused.
  • NOT in this PR: the keys typed while that Ctrl-waits. On this line they do not reach the new terminal yet (screen oracle in green 37f96e2b9465316565e74dc5). Their fix (#30827's cherry-pick, the stand-in early-tab rule, the held-key replay port of #29301) and their testkeysTypedWhileCtrlBacktickWaitsForCmdNAreHeldForTheNewTerminal` stay in #30271. A terminal that opens is better for the person than none.

Port adaptations (no feat-only dependency came in)

  • Conflicts resolved to this line's code: withOverlayLifted keeps this line's sidebar recompute and resumeIdleWaits() (the stand-in waits resolve just before it). This line has no intentSettlements, so only the noteIntentLeft calls came in. PaneController keeps this line's NewTerminalTrace.request wrapper and resolves the target inside it.
  • This line's guardrails refuse a raw continuation and two types in one file: StandInWait holds a OnceContinuation (withOnceThrowingContinuation(cancellation: .cancellable)) in its own file. No App line growth.
  • Tests: this line's pendingIntents is (transaction, intent) pairs. The dogfood-only aPersonsConfigCommandOnAPendingPaneShowsOneNotice (50675e72493) is now ...OpensInItsDaemonPane, as #29530 makes creates wait.

Testing

  • Compile at the head cfdde1a4cf03: 0d0fc38ed0f36d1b92833f56 passed (CmuxNext with tests 974 s, app 677 s, cmux-tui 82 s).
  • Green at the head (display, CMUX_TEST_REQUIRE_GUI=1): e207d94c790cf5bb2ae9c7c2 PASSED, all 3 suites: CmdNThenNewTerminalTabTests 2/2, CmdNStandInTargetTests 5/5, PaneVerbOnPendingPaneTests 5/5; gui-session-v1 console line present; no FLAKY.
  • Red: 2bf3cf539a5b304dc854eb8a and fc0dcef0a8c4c2ed045cde9e (these tests on the line tip's Sources) fail on the P0 itself: "This pane is still opening" / "the daemon refused the new tab", the hold ends .creationFailed, and CmdNStandInTargetTests gets PendingPaneNotCreated.
  • Earlier green of the same product code, 06886ca01b09669e601a82d7: the two opening tests, CmdNStandInTargetTests 5/5 and PaneVerbOnPendingPaneTests 5/5 passed; only the moved key test failed.

Observed / Not run

  • Observed: the fleet results above, read in their logs.
  • Not run: the typed keys (moved to #30271); a judged smoke round on a port build (after merge, smoke owner pa-d); no local build or test on the VM (repo rule).

Changelog

  • Fixed: Ctrl-` pressed right after Cmd-N opens a terminal in the new workspace instead of being refused.

No capture: port of a merged feat fix; the evidence is the display-worker tests and the judged smoke round.
perf claim: none.