cmux NEXT: revert #22822, links and pages from a chat never open as a tab in its pane

Merged
TE
14d ago
+127-165

Leo, 2026-10-21, about his agent pane: "HOW COULD ANYBODY HAVE POSSIBLY THOUGHT OPENING A NEW TAB IN HERE BY DEFAULT WAS ACCEPTABLE". Also: "#22822 was SO STUPID. I was saying the OPENING TAB ANIMATION starts on the LEFT then continues on the RIGHT." Earlier: "WHY THE FUCK DID THIS NOT OPEN TO TEH SIDE", and "BY DEFAULT THINGS GOING TO THE RIGHTMOST SPLIT IS THE THING TO TRY AS DEFAULT".

This reverts #22822 (7997e214) completely. #22822 made everything a chat, Home or a page opens become a tab in that page's own pane. After this PR:

  • Every link, PR pill and file opened from a terminal, an agent chat, Home or a page goes where layout.linkPlacement says, as it did before #22822: the pane on the right, else a new split. Nothing opens as a tab over the chat.
  • Removed: the cmdClick plumbing through LinkRouter, LinkOpener, TerminalHostDelegate and BrowserPageRequests, the links.pagesFollowPlacement Debug toggle, its settings help (in every locale and in the MDM docs), its release note and LinkRouterCmdClickTests.
  • The New Tab pick toggle is newTab.picksFollowLinks again (default off: a pick takes the page's place, Leo 10-20).
  • Kept from later PRs: main pane layout (#23105) and the Chrome-style link focus and return.
  • schemas/settings export and its source stamp carry the restored help text. LinkRouterBackgroundClickTests keeps the Cmd-click-in-background test that #22990 had added to the deleted file.
  • Tests: ClickedLinkFocusTests' in-pane case now sets Same Pane explicitly. Its file-link test waits for the daemon's tab, not the split's pending one; it timed out on that pending id once links split right.

Setting: the default for everyone is on the right (Leo: "DEFAULT ON THE RIGHT ... EVERYBODY IS SAYING OPEN DEFAULT ON THE RIGHT"). Opening in the agent pane is opt-in: Settings > Open Links and Files > Same Pane (layout.linkPlacement: "same-pane"). Tabs can always be dragged into the main pane; showing the main pane's tab bar is its own PR. Cmd-T and + from an agent pane follow the same setting in #23882.

The "rightmost split" refinement (more than one split on the right) comes in a follow-up PR on top of this, so the revert can land now. The animation half of Leo's complaint is its own PR.

Austin's #23032 also edits LinkOpener.swift and is untouched.

Leo-ask: ask-643a61d42a
Leo-ask: ask-5cd21f70eb

No capture: a revert to the behaviour before #22822; the link tests pin where the tab lands.

Agent session: cosmic-gray

🤖 Generated with Claude Code