Repository navigation
fix(cmux-next): a refused new tab, split, column or row carries the real failure (FC-1) - #30503
Conversation
…answer, not a fixed text (FC-1) Right after launch a New Terminal Tab from Home's dock failed as "new-tab: the daemon refused the new tab" in 3 of 4 bench launches; the optimistic create threw a fixed NewTerminalTabFailure for every failure, so the cause was only in the unified log. Split, New Column and New Row throw the same kind of fixed PaneSplitFailure. Red on the base.
…eal failure (FC-1) The optimistic creates threw a fixed text for every failure of their request: "the daemon refused the new tab" (NewTerminalTabFailure) and "the daemon refused the split" (PaneSplitFailure, also for New Column and New Row). A lost connection, the daemon's own answer and a terminal start time-out all read the same, so FC-1 (the first new tab after launch failed in 3 of 4 bench launches) had no cause outside the unified log, and a typed time-out lost its 'the terminal may still appear' meaning. Each create now rethrows its request's own failure; PaneNotReady and PendingPaneNotCreated keep their typed handling (ActionWorkFailure.create). New Column and New Row now also keep PendingPaneNotCreated, which they turned into the fixed split text. Both fixed-text types are removed (no other user). Regression test: RefusedCreateKeepsDaemonReasonTests (red at 0f02f68).
|
Found 4 test failures on Blacksmith runners: Failures
|
|
Review (subagent, correctness first): SHIP at 77810a0 I read the code at the head and did not take the PR text as true. I did not compile or run tests on this machine. Findings:
Evidence:
perf claim: none |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Not verified: macOS jobs did not run: compile and app tests were skipped on CI passes on Written by Shipped in:
|
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
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".
NewTerminalTabCommandthrew a fixedNewTerminalTabFailurefor every failure of itsnew-tab, so the cause was only in the unified log.PaneSplitCommand,NewColumnCommandandNewRowCommanddid the same with "the daemon refused the split" (PaneSplitFailure).try await send().get()).PaneNotReadyandPendingPaneNotCreatedkeep their typed handling inActionWorkFailure.create.PendingPaneNotCreated. Before, they turned it into the fixed split text.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
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).cmux-ci compile-check --app --package CmuxNext --recipe-version 2job 5ba7458832c2bd04d8789620 passed (CmuxNext, app, cmux-tui).Observed / Not run
prepush-gate.pywith no new violations.CMUX_TEST_REQUIRE_GUI=1: step 1711045834f5bd48760b0a88 passedRefusedCreateKeepsDaemonReasonTests(2 of 2) and the existingCmdNThenNewTerminalTabTests(3 of 3).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