fix(cmux-next): a refused new tab, split, column or row carries the real failure (FC-1)
Summary
A refused New Terminal Tab, split, New Column or New Row now reports the real failure (the daemon's answer, a lost connection, a terminal start time-out) instead of a fixed text.
FC-1 (fuzz catalog): about 6 s after launch, the first New Terminal Tab from Home's dock failed in 4 of 5 bench launches with "new-tab: the daemon refused the new tab". NewTerminalTabCommand threw a fixed NewTerminalTabFailure for every failure of its new-tab, so the cause was only in the unified log. PaneSplitCommand, NewColumnCommand and NewRowCommand did the same with "the daemon refused the split" (PaneSplitFailure).
- Each optimistic create now rethrows its request's own failure (
try await send().get()).PaneNotReadyandPendingPaneNotCreatedkeep their typed handling inActionWorkFailure.create. - New Column and New Row now also keep
PendingPaneNotCreated. Before, they turned it into the fixed split text. - A typed time-out now reaches
ActionWorkFailureagain, somayHaveAppliedandterminalMayAppearare correct for these creates. NewTerminalTabFailureandPaneSplitFailureare removed. Nothing else used them.
This PR does not fix why the first tab after launch is refused (Home's pinned dock before its allow_tabs). That fix comes in a separate PR. This PR makes the refusal name its cause.
Changelog
- Fixed: A refused new terminal tab, split or column now says why it failed instead of "the daemon refused the new tab".
Testing
Regression test: RefusedCreateKeepsDaemonReasonTests (CmuxNextAppTests, same-tree cmux-tui). It creates in a pane id that the daemon does not have, and expects the daemon's own answer (DaemonError.command).
- Red at 0f02f6881a7 (test only): fleet step beb57b13ee632dd07a4b013d failed, 4 issues: "isDaemonAnswer(failure → the daemon refused the new tab)", and "… the daemon refused the split" for split, New Column and New Row.
- Green at 77810a0400bb: fleet step 525a42197a5b679287f85df3 passed, 2 of 2 tests.
- Compile:
cmux-ci compile-check --app --package CmuxNext --recipe-version 2job 5ba7458832c2bd04d8789620 passed (CmuxNext, app, cmux-tui).
Observed / Not run
- Observed: the red and green fleet steps above, the compile-check, and
prepush-gate.pywith no new violations. - Observed on a display worker (gui-session-v1, cmuxs-Mac-mini-3, "gui-session-v1 step in cmux's console session"), at head 77810a0400bb,
CMUX_TEST_REQUIRE_GUI=1: step 1711045834f5bd48760b0a88 passedRefusedCreateKeepsDaemonReasonTests(2 of 2) and the existingCmdNThenNewTerminalTabTests(3 of 3). - Not run: the full CmuxNext suite, and a dogfood build. I read, but did not run, the call sites of these creates (
PaneController.newTerminalTabNow,PaneHandlers.split,WorkspaceContentController.newColumn/newRow); they all go throughActionWorkFailure.create.
No capture: no UI layout change; only the text of a refusal changes.
perf claim: none