fix(native-chat): target native chat to the active split leaf - #8569
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughNative chat routing now resolves agents and chat ownership from terminal layout leaves, handles stale or hydating layouts, and restricts tab-wide fallback to safe topologies. Terminal panes use the resolved route and selected launch agent when rendering chat. Pane-close handling now clears launch identity only for the owning PTY and updates tab titles from surviving runtime panes, including parked-tab cleanup. Tests cover routing, fallback safety, active-leaf selection, and close behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Related issue: #8401. Canonical first-flush PR: #8418. This independent follow-up fixes native-chat ownership inside split terminal tabs; it does not change transcript I/O or runtime transport.
Tab-level native-chat actions previously projected whichever pane appeared first, while every split leaf could inherit tab-wide launch metadata. Closing a chat-owning leaf could therefore leave the composer attached to a plain-shell sibling. This PR:
Screenshots
No visual design change. The behavior is split ownership and close/reassignment routing, covered by deterministic layout and pane-lifecycle regressions.
Testing
pnpm lint(full lint/custom gates in both passes; changed-file lint rerun after rebase)pnpm typecheck(full typecheck in review; web typecheck rerun after rebase)pnpm testwas not run; the reviewer passed 12 focused files / 143 tests, then the exact rebased changed-test set passed 69/69pnpm buildwas not runAI Review Report
Two separate
gpt-5.6-solxhigh agents implemented and adversarially reviewed the exact branch diff. The second pass found and fixed three high-confidence gaps: stale nested active-leaf acceptance, shortcut/tab-strip hydration divergence, and launch/title evidence leaking from a closed launch-owning pane to a shell survivor.The review traced layout serialization, active/expanded leaves, selectors, shortcut and tab-strip gates, pane hydration, mounted and parked close paths, title/launch evidence, local versus SSH readability, performance, and overlap with #8418/#8157/#8288. It explicitly checked macOS, Linux, and Windows behavior; no hardcoded shortcut modifier, label, path separator, shell behavior, or platform-specific Electron branch was introduced.
Security Audit
No command execution, filesystem access, IPC/RPC method, dependency, secret, auth, or credential changes. The routing helpers consume existing in-memory layout and pane identity, and the stricter eligibility checks reduce the chance of sending terminal input to a shell pane under the wrong agent identity.
Notes