cmux NEXT: route New Tab picks through pane placement

Merged
TE
5d ago
+585-45

Leo asked: “IF I'M FOCUSED ON THE MAIN PANE OPEN IT THERE IF IM NOT THEN OPEN IT IN THAT OTHER PLACE.”

Carry the stranded #28544 commits onto the current feat-cmux-next base and finish the pane-placement rule alongside #29606:

  • Cmd-T keeps the New Tab page in the focused agent-chat main pane, while terminal and browser picks open beside it.
  • New Tab tool picks use the shared right-column placement API, including terminal/browser same-kind reuse and lower-right splitting when the opposite kind is already there.
  • Native New Tab picks follow the same chat-dock placement policy.
  • Keep placement policy in CmuxNextLayout/CmuxNextAgentPane so CmuxNextApp does not grow its architecture debt.

This is a replacement carry for the retired lane's #28544; that PR remains open. The original implementation and tests are preserved, with the placement API integrated at the current base.

Validation: prepush passes (App lines -5 against base 40c945f9). At 4929a3fd6f4c7301ca87708d7054711ab5a54adf, fleet step 88bbca4d862c25ed324609d9 compiled all test targets and passed NewTabIntentTableTests, NewTabPagePickInPlaceTests, ChatLinkReusesRightPaneTests, and LinkOpenPlacementTests. Independent review is SHIP at the same head.

Regression coverage checks explicit Terminal Run versus typed !command, browser searches and URLs, typo correction, ordinary-pane placement, and refusal without closing the page.

Design: leo-workspace/design/pane-placement.md (teamleaderleo/leo-workspace#1969). Nonblocking review follow-ups: native placement screenshots in #29780; docking a lone chat before a New Tab tool pick in #29783.

Agent session: agent session
🤖 Generated with Claude Code