fix(next): carry chat tool opens into the existing right column

Merged
TE
6d ago
+313-57

Carries #28633 and its original commits forward onto current NEXT. Builds on merged #29684, the same-kind placement carry of #29606.

Leo: “opening up a new browser, a new terminal ... keeps opening up ... columns instead of going at the bottom ... Claude would just open it up on the right side’s bottom ... not ... in the main ... pane.”

Leo’s clarification: “just open it on the existing. you only need the rightmost bottom auto split when there’s a terminal that gets opened when there’s already a browser, and vice versa”.

Chat header Preview, Changes, and Files measure the existing right column instead of anchoring to the last header-created panel. New Terminal and New Browser from a docked chat use shared placement, preserve cwd/URL/profile, reuse a pane holding the same kind, and split below for the other kind. Header moves use the shared placement queue. The existing pure RightPanePlacement and WorkingURL helpers move unchanged into CmuxNextAgentPane; native adapters stay in the app.

Design: leo-workspace design/pane-placement.md. Risk: native creation and focus callbacks. Existing header Terminal/Browser toggle anchoring is retained. Nonblocking follow-ups: #29697 (wait for applied layout) and #29698 (blank-browser address-bar focus).

Validation: independent SHIP review and fleet compile including test targets passed at final head e20b361f12f8d4c6024416f0d0e2dee03c8f87b5 (compile job 5801c44c64dc618ce060804c, 185s). Seven placement/header suites passed at 4d8d629bc547cbf56b32c8081ef5f4d9fdd98b68 (2c55a2d5decb6739c40f4f0b); subsequent code changes move WorkingURL between modules, apply its namespace convention, and add an explicit placement-module import. Four display geometry tests skipped as advisory. Prepush checks pass against current NEXT without waivers.

Agent session: agent session
🤖 Generated with Claude Code