Repository navigation
feat(chat): add terminal-style pane header actions - #28968
Conversation
2130226 to
579b23d
Compare
b1df63e to
0d5798d
Compare
8a50ec0 to
553559e
Compare
c9e3d08 to
ce528da
Compare
ce528da to
d56006f
Compare
…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
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
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
📒 Files selected for processing: 52
docs/automated-setup-tab-design.mdsrc/renderer/src/assets/main.csssrc/renderer/src/components/cmd-j/native-chat-split-quick-actions.tssrc/renderer/src/components/cmd-j/quick-action-context.test.tssrc/renderer/src/components/native-chat/NativeChatFindBar.tsxsrc/renderer/src/components/native-chat/NativeChatPaneHeader.test.tsxsrc/renderer/src/components/native-chat/NativeChatPaneHeader.tsxsrc/renderer/src/components/native-chat/NativeChatResumeInCliButton.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/native-chat-find.csssrc/renderer/src/components/native-chat/native-chat-layout-actions.test.tssrc/renderer/src/components/native-chat/native-chat-layout-actions.tssrc/renderer/src/components/native-chat/native-chat-split-flow.test.tssrc/renderer/src/components/native-chat/use-structured-chat-pane-actions.tssrc/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.test.tsxsrc/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.tssrc/renderer/src/components/tab-bar/NativeChatCliForkMenuItems.tsxsrc/renderer/src/components/tab-bar/native-chat-cli-fork-run.test.tssrc/renderer/src/components/tab-bar/native-chat-cli-fork-run.tssrc/renderer/src/components/tab-bar/tab-move-to-pane-column.tssrc/renderer/src/components/tab-bar/tab-session-history-switch.test.tssrc/renderer/src/components/tab-bar/tab-session-history-switch.tssrc/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.tsxsrc/renderer/src/components/ui/button.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/structured-agent-session-launch-outcome-tracking.tssrc/renderer/src/lib/structured-agent-session-launch-publication.tssrc/renderer/src/lib/structured-agent-session-launch-registry.tssrc/renderer/src/lib/structured-agent-session-provisional-tab.test.tssrc/renderer/src/lib/structured-agent-session-unlisted-created-chats.tssrc/renderer/src/runtime/paired-host-structured-launch-bookkeeping.test.tssrc/renderer/src/runtime/structured-agent-session-tab-retirement.tssrc/renderer/src/runtime/structured-launch-cancel-layout-owner.test.tssrc/renderer/src/runtime/web-runtime-session-snapshot.tssrc/renderer/src/runtime/web-session-tabs-sync/active-session-subscription.tssrc/renderer/src/runtime/web-session-tabs-sync/apply-preparation-browser.tssrc/renderer/src/runtime/web-session-tabs-sync/global-session-events.tssrc/renderer/src/runtime/web-session-tabs-sync/global-session-inventory-event.tssrc/renderer/src/runtime/web-session-tabs-sync/load-initial.tssrc/renderer/src/runtime/web-session-tabs-sync/mirror-settle.tssrc/renderer/src/runtime/web-session-tabs-sync/store-patch.tssrc/renderer/src/runtime/web-session-tabs-sync/visibility-resume-repair.tssrc/renderer/src/runtime/web-session-terminal-orphan-recovery.tssrc/renderer/src/store/slices/worktrees/teardown/purged-structured-launch-retirement.tstests/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.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 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 winKeep unlisted-chat retention until host close succeeds.
trackLaunchSettlementrecords 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.afterCurrentInFlightonly 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
📒 Files selected for processing: 52
docs/automated-setup-tab-design.mdsrc/renderer/src/assets/main.csssrc/renderer/src/components/cmd-j/native-chat-split-quick-actions.tssrc/renderer/src/components/cmd-j/quick-action-context.test.tssrc/renderer/src/components/native-chat/NativeChatFindBar.tsxsrc/renderer/src/components/native-chat/NativeChatPaneHeader.test.tsxsrc/renderer/src/components/native-chat/NativeChatPaneHeader.tsxsrc/renderer/src/components/native-chat/NativeChatResumeInCliButton.tsxsrc/renderer/src/components/native-chat/NativeChatStructuredSession.tsxsrc/renderer/src/components/native-chat/native-chat-find.csssrc/renderer/src/components/native-chat/native-chat-layout-actions.test.tssrc/renderer/src/components/native-chat/native-chat-layout-actions.tssrc/renderer/src/components/native-chat/native-chat-split-flow.test.tssrc/renderer/src/components/native-chat/use-structured-chat-pane-actions.tssrc/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.test.tsxsrc/renderer/src/components/native-chat/use-structured-native-chat-pane-commands.tssrc/renderer/src/components/tab-bar/NativeChatCliForkMenuItems.tsxsrc/renderer/src/components/tab-bar/native-chat-cli-fork-run.test.tssrc/renderer/src/components/tab-bar/native-chat-cli-fork-run.tssrc/renderer/src/components/tab-bar/tab-move-to-pane-column.tssrc/renderer/src/components/tab-bar/tab-session-history-switch.test.tssrc/renderer/src/components/tab-bar/tab-session-history-switch.tssrc/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsxsrc/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.tsxsrc/renderer/src/components/ui/button.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/structured-agent-session-launch-outcome-tracking.tssrc/renderer/src/lib/structured-agent-session-launch-publication.tssrc/renderer/src/lib/structured-agent-session-launch-registry.tssrc/renderer/src/lib/structured-agent-session-provisional-tab.test.tssrc/renderer/src/lib/structured-agent-session-unlisted-created-chats.tssrc/renderer/src/runtime/paired-host-structured-launch-bookkeeping.test.tssrc/renderer/src/runtime/structured-agent-session-tab-retirement.tssrc/renderer/src/runtime/structured-launch-cancel-layout-owner.test.tssrc/renderer/src/runtime/web-runtime-session-snapshot.tssrc/renderer/src/runtime/web-session-tabs-sync/active-session-subscription.tssrc/renderer/src/runtime/web-session-tabs-sync/apply-preparation-browser.tssrc/renderer/src/runtime/web-session-tabs-sync/global-session-events.tssrc/renderer/src/runtime/web-session-tabs-sync/global-session-inventory-event.tssrc/renderer/src/runtime/web-session-tabs-sync/load-initial.tssrc/renderer/src/runtime/web-session-tabs-sync/mirror-settle.tssrc/renderer/src/runtime/web-session-tabs-sync/store-patch.tssrc/renderer/src/runtime/web-session-tabs-sync/visibility-resume-repair.tssrc/renderer/src/runtime/web-session-terminal-orphan-recovery.tssrc/renderer/src/store/slices/worktrees/teardown/purged-structured-launch-retirement.tstests/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.
|
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 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 ( For Brennan’s review Dark native header with Continue label over Find: Light native header, Continue keyboard label and focus ring, with Find closed: Enlarged text and Find (presentation screenshot; it does not prove an enlarged navigation sequence): Dark terminal header Close label with Search closed: Light terminal Search with keyboard focus (presentation screenshot; it does not prove label-over-Search pointer passage): 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. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟠 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 winType the replacement list as partial app state.
RepoSlice['repos']is valid for the array. The error comes from the inferred union ofreplacements, whichsetStatedoes not accept asPartial<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
📒 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.





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
2c8e562260832c9a97925b2b78e34fd83b490014adds only two focused renderer regressions and their fixture after shipping headcee879784a50c8bf92716d8583cd06b7cfbe3789, 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.