Repository navigation
fix(split): the second quick Cmd-D moves the focus and holds its keys (smoke step 23) - #31885
Conversation
…ves the focus and holds the keys (red) Smoke step 23 (Cmd-D, a line, Cmd-D, a line, typed at once): the second line ran in the first new terminal. Fleet diag on the tip b732874 (10 loops per round, hog +15 GB): 3 of 4 rounds failed; in each failing loop the focus generation rose by one less than in a passing loop, so the second split began no focus intent and opened no key hold. Red expected on the base: AppServices.paneController(for:) finds no controller for a record whose handle changed in place.
…d's handle is new, so it moves the focus and holds the keys (green) An optimistic split's echo updates the provisional pane record in place, with the daemon's handle (DaemonStore.confirmedPane); the window's handle map follows on its next topology apply. In that step AppServices.paneController(for:) looked the record up by its new handle, found nothing, and returned nil: PaneHandlers.split then had no content, began no focus intent and opened no creation hold, and the line typed after the second Cmd-D ran in the first new terminal. With no handle match, paneController(for:) now returns the controller that holds this very record (an identity scan over the shown panes, only on a miss). CmuxNextApp lines: +0.
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
|
|
Review (smoke-split reviewer): SHIP at 089087d No blocking findings. Checked:
Non-blocking:
|
…, not by a scan (review note) Review of #31885: the fallback walked every shown pane on each miss, and a miss is normal for a hidden workspace's pane (topology publisher, Search Tabs), so it was O(hidden x shown). WorkspaceContentController.controller(for:) is keyed by the pane's public id (which the echo does not change) with the same identity check: O(windows) per miss. CmuxNextApp lines: +0.
Bugbot needs on-demand usage enabledBugbot uses usage-based billing for this team and requires on-demand usage to be enabled. A team admin can enable on-demand usage in the Cursor dashboard. |
|
Found 6 test failures on Blacksmith runners: Failures
|
|
Review (smoke-followup reviewer): SHIP at 434b123 No blocking findings. Checked:
Non-blocking: the second split sends |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
Summary
Smoke step 23, "Cmd-D twice fast: two new panes, and the line typed into each at once ran there": the second line sometimes ran in the FIRST new terminal, and the second new terminal got nothing.
An optimistic split's echo gives the provisional pane record the daemon's handle in place (
DaemonStore.confirmedPane). The window's handle map follows on its next topology apply. A Cmd-D in that step askedAppServices.paneController(for:)for the focused pane's controller. It looked the record up by its new handle, found no controller, and returned nil.PaneHandlers.splitthen had no workspace content: it began no focus intent and opened no creation key hold. The split still happened, but the keys typed after it went to whatever had the keyboard: the first new terminal.The fix: with no handle match,
paneController(for:)returns the controller that holds this very record (an identity scan over the shown panes, only on a miss). The handle match, and its rule that a handle counts only for the same model (handles repeat across machines), are unchanged. CmuxNextApp lines: +0.This is not the Oct 31 failure of the same step: all 7 failures of Oct 31 predate the P0-1193 fix (#29301). Since then the smoke passed the step 394 times and failed once (2026-11-02, fix build of #31837 on cmux24).
Testing
Regression test (committed red before the fix):
SplitOnEchoedPaneTests(CmuxNextAppTests, live same-tree cmux-tui). It makes a confirmed terminal pane with a first Cmd-D, gives the pane record a new handle as the echo does, then runs a second Cmd-D in that step and checks that the focus generation rose and that a creation hold opened.Fleet command (red at dbc839e, green at 089087d):
cmux-ci run --class light --script scripts/ci/package-test-lane.sh --ref SHA --arg=suite --arg=Packages/macOS/CmuxNext --arg=SplitOnEchoedPaneTests,SecondCreationKeysTests,CmdNThenCreateKeysTests,CloseTabKeepsPaneTests --env CMUX_CI_XCODE_APP=/Applications/Xcode_26.6.apppaneController(for:)nil; generation 1 -> 1 (no focus intent); no key hold. The 3 other suites passed.cmux-ci run --display --label gui-session-v1, CMUX_TEST_REQUIRE_GUI=1, worker cmux-austin-mini-0; same 4 suites, all passed):25a92aef7a97afa7597e9eb4
WorkspaceContentController.controller(for:), not a scan.scripts/cmux-next/prepush-gate.py: no new violations; arch ratchet: no count rises.Observed / Not run
Observed:
smoke-split-diag(10 loops per round: Cmd-N, Ctrl-`, then Cmd-D, a line, Cmd-D, a line, typed at once; hog +15 GB; debug.key; mini scheduler):Not run: real HID key rounds (the smoke's real-key rounds stop earlier at the New Column item, STATUS 1712/1724); a full 10-round smoke gate.
Changelog
Fixed: Two quick Cmd-Ds with typing in between put each typed line in its own new pane, not both in the first one.
Proof
No capture: no visible UI change; the evidence is the regression test and the fleet journey above.