Skip to content

Native chat tabs show Hand Off in their top-right header, like terminals - #34544

Merged
brennanb2025 merged 2 commits into
mainfrom
brennanb2025/chat-header-hand-off
Oct 28, 2026
Merged

brennanb2025 merged 2 commits into
mainfrom
brennanb2025/chat-header-hand-off

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​100 $\color{#cf222e}{\Huge{\mathbf{−}}}$​36 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​64
Prod 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​41 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​37

ELI5

Terminal panes have a small "Hand Off to Another Agent" button in their top-right corner. Native chat tabs only had it in the right-click menu. Now the chat's top-right corner has the same button.

What Changed

Before: in a native chat tab, handing off to another agent (for example, Codex to Claude) meant right-clicking the chat. Its top-right header showed only Continue with Terminal Agent, Split and Close.

After: the native chat header shows the same message-plus icon the terminal header uses, first in the row like the terminal. Clicking it opens the same hand-off dialog as the right-click entry. It shows only on the focused pane, like the terminal's, and is disabled while a hand-off is being prepared or its dialog is open, so it can't open twice.

Mechanism: the header now receives the chat's existing hand-off controller (the one the right-click entry already uses) and renders a button from it. There is no new state, request or setting. The button appears only where the right-click entry does: chats that can hand off from their own workspace host. Chats hosted inside a terminal pane keep the terminal pane's own button.

Why

The right-click entry landed in #34504. A header button matches what terminal panes already offer, so the action is discoverable the same way in both. It reuses the one hand-off controller, so the header button and the menu entry can't drift apart or open two dialogs.

Linked Issue

Follow-up to #34504.

Visual Proof

Branch-only screenshots on 3839050f121e75f15b81944697b0155ff303fd1f, captured through CDP on an admitted Windows QA copy with synthetic history at rest. No agents were launched. Both uncropped images are 1728×1036.

header-hand-off.png

header-hand-off-tooltip.png

Testing

  • NativeChatPaneHeader.test.tsx: Hand Off is the first header button, opens once, is disabled while busy, and is absent on an unfocused pane. The existing order/Resume/Close tests still pass.

  • use-structured-native-chat-pane-commands.test.tsx: the real shared controller produces the same saved-context request and empty-source toast/focus outcome from the header and right-click entry, including availability, preparing and open-dialog states.

  • native-chat-header-ownership.test.tsx passes unchanged.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Review

Full review path: independent correctness review, architecture challenge and final mechanism comparison. The diff is small and local to rendering, but a touched file has a revert within 30 days. Two review rounds found no production defect; the one validation gap was fixed with shared-controller parity coverage.

Intended Orca-specific UI: the dedicated header button follows the requested parity with terminal panes. The existing host-journal context, older-host fallback and destination dialog stay shared with the right-click action, supporting remote hosts and both chat and CLI destinations.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

No wire, saved-data or host change. Remote/SSH chats get the button under the same rule as the menu entry, which is computed by the existing controller.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Branch screenshots attached for this UI change; main comparison is outside the requested screenshot scope
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • CI passed static analysis/typecheck, all five test shards, both package jobs and PR checks; named renderer tests passed locally through the test gate

@brennanb2025
brennanb2025 marked this pull request as ready for review October 27, 2026 21:48
@coderabbitai

coderabbitai Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 17fbe422-7e5c-4312-84cd-f02f57ccf6b1
Commits

Reviewing files that changed from the base of the PR and between a98e20b and 3839050.

Files selected for processing: 1
  • src/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

Walkthrough

The structured-session header now accepts an optional hand-off action. When the pane is focused and the action is available, the header displays a translated Hand Off button. The button is disabled during preparation or while a dialog is open. Clicking it stops event propagation and calls the action’s open function. Tests cover header and menu availability, disabled states, continuation-context requests, and empty captured text handling.

Priority: Low

Merge Risk: Minimal · up to 38390

No concrete hand-off regression is identified; the change appears mergeable after normal checks.

Pre-merge checks: Passed 3 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Description check Warning The description covers the change, rationale, testing, visual proof, review notes, compatibility considerations, and checklist. However, the Linked Issue section only says “Follow-up to #34504” and do… Add a direct link to the issue addressed by this PR in the Linked Issue section, using the required issue-reference format. If manual testing was performed, check the manual-testing item and list the tested platforms; otherwise state that C…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: adding Hand Off to native chat headers to match terminal headers.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description covers the change, rationale, testing, visual proof, review notes, compatibility considerations, and checklist. However, the Linked Issue section only says “Follow-up to #34504” and does not provide the required actual issue link or a Fixes reference. Manual testing is also left unchecked, although automated testing is documented.

Resolution

Add a direct link to the issue addressed by this PR in the Linked Issue section, using the required issue-reference format. If manual testing was performed, check the manual-testing item and list the tested platforms; otherwise state that CI covered it.

Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Native chat tabs had Hand Off to Another Agent only in the right-click menu, while terminal panes exposed it in their header. This adds the requested matching icon button to the native chat header, first in the row and visible on the focused pane. It opens the same existing dialog and is disabled while preparation or that dialog is active.

Full review completed in two rounds. No production defect or deferred concern was found. One validation gap was fixed: the production controller is now tested through both entry points for identical saved-context requests and empty-source failure behavior, including availability and busy states. The architecture and final mechanism checks passed; the header placement is an intended Orca-specific affordance for chat/terminal parity.

Verified on 3839050f121e75f15b81944697b0155ff303fd1f: named renderer tests, an independent parity-contract rerun, the final readiness checklist, and green CI (including all five test shards and both package jobs). The branch-only screenshot run passed on an isolated Windows copy: the focused chat header shows Hand Off first and hovering it reveals the exact tooltip. Both original full-window images were inspected. The fixture stayed at rest; no agent CLI was launched. Real config hashes were unchanged and the copy was stopped gracefully with recorded processes exited and ports cleared. This renderer-only flow uses qa=tests; no agent run was required.

For Brennan's review

header-hand-off.png

header-hand-off-tooltip.png

@brennanb2025
brennanb2025 merged commit 5d6cb34 into main Oct 28, 2026
34 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/chat-header-hand-off branch October 28, 2026 04:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant