Skip to content

feat(chat): add terminal-style pane header actions - #28968

Merged
brennanb2025 merged 54 commits into
mainfrom
brennankb5/native-chat-pane-actions
Oct 23, 2026
Merged

brennanb2025 merged 54 commits into
mainfrom
brennankb5/native-chat-pane-actions

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​143 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​139
Prod 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​311 $\color{#cf222e}{\Huge{\mathbf{−}}}$​48 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​263

What changes

Native chats had no quick pane controls, so splitting a conversation or continuing it in a terminal required a shortcut or the tab menu. Native chat panes now show compact terminal-style hover controls: Continue with Terminal Agent, Split Chat Right, and Close.

Split preserves the source conversation and opens a fresh same-agent, same-host chat with focus in its composer; the agent starts when the user sends. Close runs the existing command for the displayed tab, preserving its siblings and collapsing an emptied split. It says Close tab when siblings remain and Close Pane for the last chat in a split. Continue uses the tab menu’s existing conversation-copy command and shared pending state.

The common pattern keeps pane controls bound to the clicked conversation and delegates to existing commands. Shared button variants preserve terminal styling. Headers mount only for shown chats, while their sessions and transcripts remain retained. Continue eligibility checks four workspace inputs; an actual click resolves the current command request. No saved field, wire format, new launch policy or extra action restriction is introduced.

Deliberate boundaries

Shown unfocused native panes retain their controls; this intended preserved behavior differs from the terminal header’s focus admission. The floating terminal-style header is retained, and Find clears its occupied height without moving the transcript or composer. Ordinary tooltip labels pass pointers through; existing interactive previews and Copy diagnostics retain their interaction policy.

Pre-existing, unchanged by this PR: Continue with Terminal Agent for a chat whose host differs from its workspace’s opens its terminal with the workspace’s host settings, same as the tab menu’s Continue on main; tracked in STA-11722. Inherited outer-terminal Find geometry is outside this repair. The incidental formatter change to the existing tracked docs/automated-setup-tab-design.md is retained.

#28950 is merged. #28969 adds the right-click menu using these shared pane actions; these header controls are independently usable.

Verification

Classified under the current UI/tests row: the header and tooltip/Find presentation reuse the existing split, Close and Continue commands, with launch, cancellation, process ownership and saved state unchanged. This row requires CI, renderer regressions and a branch screenshot, with no agent round (qa=tests).

Current head 2c8e562260832c9a97925b2b78e34fd83b490014 adds only two focused renderer regressions and their fixture after shipping head cee879784a50c8bf92716d8583cd06b7cfbe3789, 180 formatted lines total. All existing tracked files are unchanged. The six-round source, mechanism, performance and operation-contract review passed; the final test-only delta independently passed review. The full current-head workflow40004702397 passed, including both layout jobs.

On the admitted M4Air, both renderer regressions passed: actual header/Find separation, and noninteractive tooltip wrapper pointer passage plus ordinary Find Next. Removing each generated CSS repair independently failed its intended assertion; exact byte restoration passed again. Existing exact-head screenshots cover the changed native header in dark and light, ordinary Find navigation, enlarged text, and terminal header/Search. The single review status comment includes those branch screenshots and their limits.

Earlier exploratory real-agent/interactive coverage ended incomplete; it is not reported as a passed agent round. Under the current UI row it is not a readiness requirement. The owner canceled retry ticket 2044; no new lead, driver, agent run or main merge was started. No agent run is claimed in the marker. Earlier rigs stopped, ports were released, settings restored and real config hashes unchanged.

Author X: @BrennanKB5.

@brennanb2025
brennanb2025 force-pushed the brennankb5/native-chat-split-draft branch from 2130226 to 579b23d Compare October 15, 2026 04:12
@brennanb2025
brennanb2025 force-pushed the brennankb5/native-chat-pane-actions branch from b1df63e to 0d5798d Compare October 15, 2026 04:12
@brennanb2025
brennanb2025 marked this pull request as ready for review October 15, 2026 05:06
@brennanb2025
brennanb2025 force-pushed the brennankb5/native-chat-pane-actions branch from 8a50ec0 to 553559e Compare October 15, 2026 06:31
@brennanb2025
brennanb2025 force-pushed the brennankb5/native-chat-split-draft branch from c9e3d08 to ce528da Compare October 15, 2026 06:41
@brennanb2025
brennanb2025 force-pushed the brennankb5/native-chat-split-draft branch from ce528da to d56006f Compare October 15, 2026 06:55
…t-split-draft

# Conflicts:
#	src/renderer/src/runtime/structured-agent-session-tab-retirement.ts
…t-split-draft

# Conflicts:
#	src/renderer/src/lib/structured-agent-session-provisional-tab.test.ts
@brennanb2025
brennanb2025 changed the base branch from brennankb5/native-chat-split-draft to main October 22, 2026 21:46
@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

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: c4a21bd7-a55a-490c-9d0c-e66d883eb3ea
📥 Commits

Reviewing files that changed from the base of the PR and between dde77e3 and cee8797.

📒 Files selected for processing: 2
  • src/renderer/src/components/native-chat/NativeChatResumeInCliButton.tsx
  • src/renderer/src/components/native-chat/native-chat-header-ownership.test.tsx

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

📝 Walkthrough

The change adds a native-chat pane header with split, close, and conditional resume-in-CLI controls. It updates CLI-fork eligibility and pending-state checks to use session and execution-host identity. Pane button styling and find-bar positioning change, and CSS disables pointer events on matching tooltip elements. Tests cover these behaviors and header ownership. The design document is reformatted without changing its described content.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to cee87

The new controls have no verified regression, but an existing close-reconciliation edge case can still lose a newly created chat and should be followed up separately.

Pre-merge checks: Passed 3 · Failed 2

Failed Failed checks: 2 warnings

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 28.30% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 53 functions across 43 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check Warning The description explains the implementation, user-visible behavior, boundaries, testing, and verification in detail. However, it does not follow the required template structure. It omits the ELI5, Why… Add all required template sections. Provide a real issue reference under Fixes #, add visual proof or state N/A with a reason, document testing platforms and checklist status, and complete the remaining required sections or mark them as…
Passed Passed checks: 3 passed
Check name Status Explanation
Title check Passed The title clearly identifies the main change: adding terminal-style pane header actions for chat.
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 explains the implementation, user-visible behavior, boundaries, testing, and verification in detail. However, it does not follow the required template structure. It omits the ELI5, Why, Linked Issue, Visual Proof, Review, Notes, and Checklist sections, and it does not provide an actual linked issue in the required Fixes # field.

Resolution

Add all required template sections. Provide a real issue reference under Fixes #, add visual proof or state N/A with a reason, document testing platforms and checklist status, and complete the remaining required sections or mark them as not applicable.

✨ Finishing Touches: 💡 2
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks: 💡
  • 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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ 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: ae474dd9-ad0a-4714-ba5e-5d7009e4f795
📥 Commits

Reviewing files that changed from the base of the PR and between 1ed13cf and 8391b9f.

📒 Files selected for processing: 52
  • docs/automated-setup-tab-design.md
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/cmd-j/native-chat-split-quick-actions.ts
  • src/renderer/src/components/cmd-j/quick-action-context.test.ts
  • src/renderer/src/components/native-chat/NativeChatFindBar.tsx
  • src/renderer/src/components/native-chat/NativeChatPaneHeader.test.tsx
  • src/renderer/src/components/native-chat/NativeChatPaneHeader.tsx
  • src/renderer/src/components/native-chat/NativeChatResumeInCliButton.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/native-chat-find.css
  • src/renderer/src/components/native-chat/native-chat-layout-actions.test.ts
  • src/renderer/src/components/native-chat/native-chat-layout-actions.ts
  • src/renderer/src/components/native-chat/native-chat-split-flow.test.ts
  • src/renderer/src/components/native-chat/use-structured-chat-pane-actions.ts
  • src/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.test.tsx
  • src/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.ts
  • src/renderer/src/components/tab-bar/NativeChatCliForkMenuItems.tsx
  • src/renderer/src/components/tab-bar/native-chat-cli-fork-run.test.ts
  • src/renderer/src/components/tab-bar/native-chat-cli-fork-run.ts
  • src/renderer/src/components/tab-bar/tab-move-to-pane-column.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.test.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.ts
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.tsx
  • src/renderer/src/components/ui/button.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/structured-agent-session-launch-outcome-tracking.ts
  • src/renderer/src/lib/structured-agent-session-launch-publication.ts
  • src/renderer/src/lib/structured-agent-session-launch-registry.ts
  • src/renderer/src/lib/structured-agent-session-provisional-tab.test.ts
  • src/renderer/src/lib/structured-agent-session-unlisted-created-chats.ts
  • src/renderer/src/runtime/paired-host-structured-launch-bookkeeping.test.ts
  • src/renderer/src/runtime/structured-agent-session-tab-retirement.ts
  • src/renderer/src/runtime/structured-launch-cancel-layout-owner.test.ts
  • src/renderer/src/runtime/web-runtime-session-snapshot.ts
  • src/renderer/src/runtime/web-session-tabs-sync/active-session-subscription.ts
  • src/renderer/src/runtime/web-session-tabs-sync/apply-preparation-browser.ts
  • src/renderer/src/runtime/web-session-tabs-sync/global-session-events.ts
  • src/renderer/src/runtime/web-session-tabs-sync/global-session-inventory-event.ts
  • src/renderer/src/runtime/web-session-tabs-sync/load-initial.ts
  • src/renderer/src/runtime/web-session-tabs-sync/mirror-settle.ts
  • src/renderer/src/runtime/web-session-tabs-sync/store-patch.ts
  • src/renderer/src/runtime/web-session-tabs-sync/visibility-resume-repair.ts
  • src/renderer/src/runtime/web-session-terminal-orphan-recovery.ts
  • src/renderer/src/store/slices/worktrees/teardown/purged-structured-launch-retirement.ts
  • tests/e2e/structured-session-tab-close-regressions.unit.test.ts

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟡 Minor · Keep unlisted-chat retention until host close… · structured-agent-session-tab-retirement.ts:128

src/renderer/src/runtime/structured-agent-session-tab-retirement.ts:128
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Keep unlisted-chat retention until host close succeeds.

trackLaunchSettlement records a chat when its create reply arrives before any host list shows it. The close path clears this record before the host close result. A failed close can then trigger a reread that still omits the chat, causing snapshot preparation to remove the local tab even though the host may still own it. afterCurrentInFlight only waits for an existing request; it does not guarantee that the new list includes every successful create reply.

🐛 Suggested fix
-  forgetUnlistedCreatedChat(args.worktreeId, args.sessionId)
   if (args.provisional) {
...
   void retireStructuredAgentSessionTab(args).then((hostTabClosed) => {
+    if (hostTabClosed) {
+      forgetUnlistedCreatedChat(args.worktreeId, args.sessionId)
+    }
     if (!hostTabClosed) {

ℹ️ 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: ae474dd9-ad0a-4714-ba5e-5d7009e4f795
📥 Commits

Reviewing files that changed from the base of the PR and between 1ed13cf and 8391b9f.

📒 Files selected for processing: 52
  • docs/automated-setup-tab-design.md
  • src/renderer/src/assets/main.css
  • src/renderer/src/components/cmd-j/native-chat-split-quick-actions.ts
  • src/renderer/src/components/cmd-j/quick-action-context.test.ts
  • src/renderer/src/components/native-chat/NativeChatFindBar.tsx
  • src/renderer/src/components/native-chat/NativeChatPaneHeader.test.tsx
  • src/renderer/src/components/native-chat/NativeChatPaneHeader.tsx
  • src/renderer/src/components/native-chat/NativeChatResumeInCliButton.tsx
  • src/renderer/src/components/native-chat/NativeChatStructuredSession.tsx
  • src/renderer/src/components/native-chat/native-chat-find.css
  • src/renderer/src/components/native-chat/native-chat-layout-actions.test.ts
  • src/renderer/src/components/native-chat/native-chat-layout-actions.ts
  • src/renderer/src/components/native-chat/native-chat-split-flow.test.ts
  • src/renderer/src/components/native-chat/use-structured-chat-pane-actions.ts
  • src/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.test.tsx
  • src/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.ts
  • src/renderer/src/components/tab-bar/NativeChatCliForkMenuItems.tsx
  • src/renderer/src/components/tab-bar/native-chat-cli-fork-run.test.ts
  • src/renderer/src/components/tab-bar/native-chat-cli-fork-run.ts
  • src/renderer/src/components/tab-bar/tab-move-to-pane-column.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.test.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.ts
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.tsx
  • src/renderer/src/components/ui/button.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/pt.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/structured-agent-session-launch-outcome-tracking.ts
  • src/renderer/src/lib/structured-agent-session-launch-publication.ts
  • src/renderer/src/lib/structured-agent-session-launch-registry.ts
  • src/renderer/src/lib/structured-agent-session-provisional-tab.test.ts
  • src/renderer/src/lib/structured-agent-session-unlisted-created-chats.ts
  • src/renderer/src/runtime/paired-host-structured-launch-bookkeeping.test.ts
  • src/renderer/src/runtime/structured-agent-session-tab-retirement.ts
  • src/renderer/src/runtime/structured-launch-cancel-layout-owner.test.ts
  • src/renderer/src/runtime/web-runtime-session-snapshot.ts
  • src/renderer/src/runtime/web-session-tabs-sync/active-session-subscription.ts
  • src/renderer/src/runtime/web-session-tabs-sync/apply-preparation-browser.ts
  • src/renderer/src/runtime/web-session-tabs-sync/global-session-events.ts
  • src/renderer/src/runtime/web-session-tabs-sync/global-session-inventory-event.ts
  • src/renderer/src/runtime/web-session-tabs-sync/load-initial.ts
  • src/renderer/src/runtime/web-session-tabs-sync/mirror-settle.ts
  • src/renderer/src/runtime/web-session-tabs-sync/store-patch.ts
  • src/renderer/src/runtime/web-session-tabs-sync/visibility-resume-repair.ts
  • src/renderer/src/runtime/web-session-terminal-orphan-recovery.ts
  • src/renderer/src/store/slices/worktrees/teardown/purged-structured-launch-retirement.ts
  • tests/e2e/structured-session-tab-close-regressions.unit.test.ts

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

@brennanb2025

brennanb2025 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Native chat panes lacked quick controls for splitting a chat, closing the displayed tab, or continuing its conversation in a terminal. This PR adds terminal-style hover controls using the existing commands while preserving other tabs.

The six-round review corrected repeated History projection during rendering, Find overlapping the header, and noninteractive tooltip wrappers intercepting clicks. Shown unfocused panes retain their controls; hidden chats retain their sessions without owning visible header controls. Split, Close and Continue reuse existing commands. The pre-existing Continue host mismatch is unchanged and tracked in STA-11722; the incidental formatting change to an already tracked document is retained.

Verification on 2c8e562260832c9a97925b2b78e34fd83b490014: the full PR workflow passed. Independent source, mechanism, performance and operation-contract review passed at shipping head cee8797; the final commit adds only two renderer regressions and their fixture, 180 formatted lines, with every existing tracked file unchanged. That test-only delta also passed independent review.

Both renderer regressions passed on the admitted M4Air: actual header/Find separation, and the real tooltip wrapper's pointer policy and Find hit target through an ordinary Next click. Removing each generated CSS repair independently failed its intended assertion; restoring the exact bytes passed again.

QA classification: UI/tests row (qa=tests). Header and tooltip/Find presentation reuse the existing commands; launch, cancellation, ownership, saved state and wire behavior are unchanged. The current review policy requires CI, renderer tests and a branch screenshot, with no agent round. Existing exact-head screenshots cover the changed screen in dark and light themes, normal and enlarged text, native header/Find, and terminal header/Search. No new run was needed; retry ticket 2044 was canceled. Earlier exploratory real-agent and interactive coverage ended incomplete and is not claimed as a passing agent round. No agents= field is claimed.

For Brennan’s review

Dark native header with Continue label over Find:

Dark native header and Find

Light native header, Continue keyboard label and focus ring, with Find closed:

Light native header

Enlarged text and Find (presentation screenshot; it does not prove an enlarged navigation sequence):

Enlarged native header and Find

Dark terminal header Close label with Search closed:

Dark terminal header

Light terminal Search with keyboard focus (presentation screenshot; it does not prove label-over-Search pointer passage):

Light terminal Search

The deliberate boundaries are displayed-tab Close and pin policy and noninteractive label pointer policy. These are branch-only screenshots; no matched main comparison or completed agent action is inferred from them.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to GitHub limitations.

⚠️ Outside diff range comments (1)

🟠 Major · Type the replacement list as partial app state. · native-chat-header-ownership.test.tsx:312

src/renderer/src/components/native-chat/native-chat-header-ownership.test.tsx:312
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Type the replacement list as partial app state.

RepoSlice['repos'] is valid for the array. The error comes from the inferred union of replacements, which setState does not accept as Partial<AppState>. Annotate the list as partial app-state updates.

Suggested fix
-import { useAppStore } from '@/store'
+import { useAppStore, type AppState } from '@/store'
...
-    const replacements = [
+    const replacements: Array<Partial<AppState>> = [

ℹ️ 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: 33b2b8ac-99b9-4b99-999c-b327eafd6250
📥 Commits

Reviewing files that changed from the base of the PR and between c088804 and dde77e3.

📒 Files selected for processing: 1
  • src/renderer/src/components/native-chat/native-chat-header-ownership.test.tsx

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

@brennanb2025
brennanb2025 merged commit d49ad60 into main Oct 23, 2026
39 checks passed
@brennanb2025
brennanb2025 deleted the brennankb5/native-chat-pane-actions branch October 23, 2026 23:18
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