Skip to content

Terminal header button: Resume in New Native Chat replaces Show chat view - #27184

Merged
brennanb2025 merged 7 commits into
mainfrom
brennanb2025/cli-tab-context-menu
Oct 12, 2026
Merged

brennanb2025 merged 7 commits into
mainfrom
brennanb2025/cli-tab-context-menu

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​399 $\color{#cf222e}{\Huge{\mathbf{−}}}$​34 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​365
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​313 $\color{#cf222e}{\Huge{\mathbf{−}}}$​93 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​220

ELI5

The small button at the top right of an agent terminal used to say "Show chat view" and flipped the terminal into the old chat layout. That view switch is being removed. The button now does what right-clicking the tab and choosing Resume in New Native Chat does: it opens the conversation in that terminal in a new native chat.

What Changed

Before: in an agent terminal (Claude, Codex, and so on), the top-right pane button was "Show chat view". It switched the pane into the old chat view, which we're removing. The only way to move a terminal conversation into a native chat was the tab's right-click menu.

After:

  • On the active pane of a Claude or Codex terminal, the button is Resume in New Native Chat, with the same icon and label as the tab menu item. Clicking it opens that pane's conversation in a new native chat tab.
  • If a native chat already holds that conversation (for example, you already clicked once), the click switches to that chat instead of opening a second one.
  • If the click can't resume, one toast says why in plain words:
    • "Claude hasn't saved this conversation yet. Try again after it replies."
    • "This Claude conversation can't be resumed in a native chat."
    • "Could not resume this session in a new chat." (the lookup itself failed)
  • A pane already in the old chat view still shows Show terminal, so nobody gets stuck there.
  • The button shows only while Claude or Codex is actually running in the pane. Once the agent exits, the button disappears, the same as the tab menu's item (which became running-only in fix(tab-bar): offer Resume in New Native Chat only while the tab's agent is running #27520). A conversation Orca remembers after the agent exited is never offered.
  • Panes where the move can't work show no button: other agents (Grok, OpenCode and the rest), plain shells, SSH, and WSL projects. These are the same places the tab menu doesn't offer the move.

Mechanism:

  • New TerminalPaneResumeInChatButton. On click it runs the tab menu's Session History lookup, narrowed to the pane the button sits on (resolvePaneAiVaultTitleRequest) and to the agent running there. In a split, it can never pick up another pane's conversation. Then it follows the tab menu's own decision (resolveTabSessionSwitch):
    • resume: calls resumeAiVaultSessionInNewChat;
    • a chat already holds it: calls activateAiVaultStructuredSession, the same thing Session History's Resume does for a conversation already open in a chat.
  • ai-vault-tab-title-requests.ts gains a single-pane lookup (resolvePaneAiVaultTitleRequest) that reads only the agent running in that pane, mapped the same way as the tab-wide list. Like the tab menu since fix(tab-bar): offer Resume in New Native Chat only while the tab's agent is running #27520, it ignores the retained and sleeping records an exited agent leaves behind; the button uses it both for whether it shows and for what the click looks up. The tab-wide list is unchanged, so tab titles still keep an exited agent's conversation.
  • Whether the button shows comes from in-memory state only: the pane's own running Claude/Codex conversation, the host the workspace runs on, and the same launch check Session History applies before offering the move (structuredAgentSessionLaunchFeasible). That check is what hides it for WSL projects. It reads the same store subscription the pane already had, so the pane adds no new listeners.
  • The lookup for a terminal tab no longer drops conversations a chat already holds. The tab menu still offers nothing for those, because its decision step already refuses them, and it no longer spends a forced history rescan on them.
  • A click forces a fresh history scan even within the usual 30-second limit, as the Session History panel's Refresh button already does. Without it, "Try again after it replies" could keep hitting a stale list.
  • The unused "Show chat view" string is removed from all six locales, and the new messages are added in all six.

Why

The tab menu only offers the move after a fresh Session History lookup. Only that lookup knows whether a chat already holds the conversation, whether a transcript exists yet, and the folder it was recorded in. A header button is always on screen, so running that lookup for every agent pane in the background would add history scans the tab menu deliberately avoids. Running it on click keeps the result fresh and costs nothing until the button is used.

Visibility uses the same facts the tab menu's gate uses, as far as they are known without the lookup, so the button doesn't show where the click is certain to fail.

Considered and not chosen:

  • Look up on show: it matches the tab menu exactly, but it scans on every pane or tab switch, and the button pops in late.
  • Launch straight from the pane's session id, skipping the lookup: that would bypass the ownership and transcript checks.

Not in this PR: the terminal's own right-click menu still has "Switch to chat view". The ask was about the header button only.

Linked Issue

N/A (internal).

Visual Proof

Live run on macOS (M4Air) of a production build in a hidden test profile, with a Claude stand-in running in the terminal. Before is main; after is this branch (the screenshots show the running state, which the running-only change doesn't alter).

Before (main): "Show chat view" After: "Resume in New Native Chat"
q0-before-tooltip-crop.jpg q1-after-tooltip-crop.jpg

Split tab: only the active Claude pane has the button.

q1-split-claude-active-crop.jpg

Click: a new native chat opens with the conversation.

q2-chat-opened-crop.jpg

Clicking the terminal's button again switches to that chat (still two tabs, no toast).

q3-focused-existing-crop.jpg

A plain shell has no resume button.

q4-plain-shell-crop.jpg

A conversation with nothing saved yet:

q5-not-saved-toast-crop.jpg

Testing

  • TerminalPaneResumeInChatButton.test.tsx covers:

    • resuming the pane's own conversation;
    • a split with Grok active beside Claude (no button, and the other pane's conversation is never used);
    • a conversation a chat already holds (that chat opens, no toast);
    • each message;
    • a forced rescan inside the 30-second limit;
    • the tab being closed during the lookup (nothing happens).
  • tab-session-history-switch tests cover the button hiding once the agent exits, whether a retained or a sleeping record remains (same as the tab menu), SSH and WSL hiding, and owned rows. The parity test shows the tab menu still offers nothing for a conversation a chat already holds.

  • TerminalPaneHeaderOverlay.test.tsx: the active pane offers the resume button and no "Show chat view"; a chat-view pane keeps "Show terminal".

  • Existing tab menu, tab-title sync and Session History tests pass; tab titles still keep an exited agent's conversation.

  • orca-ci-checks (lint, code quality, localization, typecheck) passes locally, except the Bun-based typecheck:ci step, which fails on this machine's older Bun before checking anything; the regular pnpm run typecheck passes and CI runs typecheck:ci on its own Bun.

  • Live Electron run on macOS: see Visual Proof. Not run live: Windows, WSL and SSH; those rest on the unit tests.

  • I manually tested these changes locally

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

Review

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

  • SSH: hidden, the same as the tab menu's terminal-to-chat move.
  • WSL: hidden, because native chat can't launch for WSL projects (same check as Session History).
  • Folder workspaces: same workspace and host resolution as the tab menu.
  • Performance: no history lookup until you click. The visibility check is a few in-memory reads per store update for the active pane of mounted Claude/Codex terminals: about 2 µs per check with 10 worktrees, and about 5–7 µs with 1,000.

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)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…ative chat

The pane header's "Show chat view" toggle is replaced by the tab menu's
"Resume in New Native Chat" move. The Session History lookup runs on click,
so an always-visible header never scans in the background. A pane already
in chat view keeps its "Show terminal" way back.
@coderabbitai

coderabbitai Bot commented Oct 10, 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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45f98987-b0e0-4134-836b-f0a8cf99cac9

📥 Commits

Reviewing files that changed from the base of the PR and between f186fc8 and 8916c7f.


📒 Files selected for processing (12)
  • src/renderer/src/components/right-sidebar/ai-vault-session-refresh.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.parity.test.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/TerminalPaneSurface.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/zh.json
  • src/renderer/src/lib/ai-vault-tab-title-requests.ts

🚧 Files skipped from review as they are similar to previous changes (6)
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/i18n/locales/ja.json

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



📝 Walkthrough
📝 Walkthrough
📝 Walkthrough
📝 Walkthrough

Walkthrough

The changes add pane-specific title-request and session-history resolution, including matching CLI sessions that are owned by structured chats. They add a terminal-pane action that activates an existing chat or resumes eligible saved content in a new native chat. The active-pane controls, forced-rescan handling, tests, and translations are updated.


Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 8916c

The change replaces the chat-view toggle with a Resume in New Native Chat button that is limited to eligible Claude and Codex panes. No concrete merge-blocking risk is evident from the supplied context. The author lists a few known edge cases as deferred.

Pre-merge checks | Passed 4 | Failed 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 14 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
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.
Title check Passed The title clearly and concisely describes the primary change: replacing the terminal header's Show chat view button with Resume in New Native Chat.
Description check Passed The description is complete and focused. It includes the user-facing change, rationale, implementation details, linked-issue context, visual proof, testing coverage, platform considerations, known lim…

Full details: Docstring Coverage

Explanation

Docstring coverage is 41.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 14 files. (6 skipped: 6 unsupported.)


  • Fix all pre-merge checks with AI
✨ 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.

@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
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 107bd526-993d-4f3c-9bae-cf6888b651a2
📥 Commits

Reviewing files that changed from the base of the PR and between f4c4eae and 50f5923.

📒 Files selected for processing (15)
  • src/renderer/src/components/tab-bar/TabSessionSurfaceSwitchMenuItems.tsx
  • src/renderer/src/components/tab-bar/tab-session-history-switch.ts
  • src/renderer/src/components/tab-bar/tab-session-switch-actions.ts
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneHeaderOverlay.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.test.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneResumeInChatButton.tsx
  • src/renderer/src/components/terminal-pane/TerminalPaneSurface.tsx
  • src/renderer/src/components/terminal-pane/use-terminal-pane-projection.ts
  • 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/zh.json

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

…re subscription

Keeps a mounted terminal pane inside its pinned store-listener budget.
… that already holds it

The header "Resume in New Native Chat" button gated on chat-view eligibility but looked up the
tab's best conversation, so a Grok pane beside a Claude pane resumed the Claude conversation, and
Grok/OpenCode panes showed a button that always failed with a "try again" toast.

- Map one pane to its conversation with the tab-title mapping narrowed to that pane (same sources,
  same Claude/Codex rule), for both the button's visibility and its click; this also keeps the
  button after the agent exits, as the tab menu does.
- A conversation a native chat already holds now matches its history row; the move's gate still
  refuses it (tab menu unchanged, pinned in the parity test), and the button opens that chat.
- Distinct messages: nothing saved yet, cannot be resumed in a native chat, or the existing
  generic failure. The click forces a fresh scan like the panel's Refresh does.
- Call the plain resume launch directly; drop the shared actions module and restore the tab menu.
- A tab closed during the lookup no longer opens a chat.
…te is refused

On a local workspace whose project runs in WSL (or needs runtime repair), the header button showed
on Claude/Codex panes, but native chat cannot launch there, so every click said the conversation
can't be resumed while the tab menu offered nothing. The button's visibility now also asks the
same launch-route check the Session History row gate uses (structuredAgentSessionLaunchFeasible).

@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 · Match the pane’s history row by a stable identity. · tab-session-history-switch.ts:159-160

src/renderer/src/components/tab-bar/tab-session-history-switch.ts:159-160
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Match the pane’s history row by a stable identity.

findTabSessionHistoryRow returns the first row that matches only agent and sessionId. The history list preserves distinct rows with different execution hosts and file paths, even when those fields match the pane lookup.

If the first matching row belongs to another transcript or structured chat, the terminal button uses that row. A structured row is passed to activateAiVaultStructuredSession, which activates the row’s workspaceId and sessionId. The structured-row eligibility rejection does not protect this path.

Carry the pane’s stable history-row identity into TabSessionHistorySubject and match it at this boundary. Do not select an arbitrary first row when the identity remains ambiguous.


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 80046eaa-ae58-472c-8469-60e749e862ed
📥 Commits

Reviewing files that changed from the base of the PR and between e4500f2 and f186fc8.

📒 Files selected for processing (2)
  • src/renderer/src/components/tab-bar/tab-session-history-switch.test.ts
  • src/renderer/src/components/tab-bar/tab-session-history-switch.ts

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 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor Author

Review status: ready for your merge decision (head f186fc8eb00, CI green)

The problem. The top-right button on an agent terminal pane was "Show chat view". It flipped the pane into the old chat layout, and that chat/terminal switch is being removed. This PR makes that button do what the tab's right-click Resume in New Native Chat does.

Where the first version went wrong. In review, the button showed in places where the click could never work:

  • Wrong agents: it showed on Grok, OpenCode and OMP panes, and every click there gave a "try again after the agent replies" toast.
  • Split panes: in a tab with a Grok pane active next to a Claude pane, the click resumed the other pane's Claude conversation.
  • Conversation already in a chat: clicking again told you to "try again" forever, instead of taking you to the chat that already has it.
  • WSL projects: the button showed, but native chat can't launch there, so every click failed.

What changes for you now:

  • The button appears only on the active pane of a Claude or Codex terminal whose conversation can move. Clicking it opens that pane's own conversation in a new native chat.
  • Clicking again takes you to that chat instead of opening a second one.
  • When it can't resume, one toast says why in plain words: nothing saved yet, can't be resumed, or the lookup failed.
  • Grok/OpenCode panes, plain shells, SSH and WSL show no button, matching where the tab menu doesn't offer the move.
  • A pane in the old chat view still has "Show terminal".

Fixed in review (e4500f2b099, f186fc8eb00):

  • the click now looks up the pane's own conversation;
  • the button shows only for Claude and Codex;
  • a click opens the chat that already holds the conversation;
  • separate failure messages;
  • the button hides on WSL and repair-needed projects;
  • a click forces a fresh history scan, so "try again" works;
  • less code: the button calls the existing resume function directly, and the tab menu file is back to main.

Deferred (not fixed here):

  • Subfolder start (P2): if Claude was started from a subfolder of the worktree (cd packages/app && claude), the button shows, but every click says "This Claude conversation can't be resumed in a native chat." The message is accurate, and the tab menu hides the move in that case. Hiding the button too would need the conversation's recorded folder, which only the click-time lookup has.
  • Old conversations (P3): a conversation older than the 250 most recent in Session History gets "hasn't saved this conversation yet", which is wrong for that case.
  • Startup delay (P3): at startup the button can appear one state update late.
  • Visibility cost: the check takes about 5–7 µs per store update for each mounted Claude/Codex terminal at 1,000 worktrees. That's acceptable, but noted.
  • Out of scope: the terminal's own right-click menu still offers "Switch to chat view".

Verified:

  • Two review rounds (a correctness reviewer plus an architecture challenger, then two fresh reviewers on the fixes) and a readiness review, with no open P0 or P1.
  • Unit tests for every case above. A randomized check confirmed the shared tab-title lookup returns the same results as before.
  • orca-ci-checks and CI pass.
  • Live run on macOS of a production build with a Claude stand-in. Before/after, the split-pane case, opening the chat, going back to the existing chat, the plain shell, and the "not saved yet" toast all pass. Screenshots are in the PR body.

Not verified:

  • Nothing was run live on Windows, WSL or SSH; those rely on unit tests and reading the code.
  • The "can't be resumed" and "lookup failed" toasts weren't reached live.
  • The live run didn't use a real Claude.

Two small things the run noticed, neither caused by this PR:

  • The resumed chat tab is labelled "Claude Chat" rather than the conversation title.
  • The resume icon (two speech bubbles) looks a lot like the "Hand Off to Another Agent" icon right next to it.

Update (10-12): synced with main; head 84cc037a722, CI green (18 passed, 19 skipped), mergeable.

You decided the move into a native chat should only be offered while Claude/Codex is actually running in the terminal, not from a remembered conversation after it exits. That landed for the tab menu in #27520, along with #27742 (Orca now notices an agent exit in cmd.exe/Git Bash terminals). This PR now follows the same rule:

  • What changes for you: the header button shows only while the agent is running in that pane. After you exit Claude/Codex, the button disappears, the same as the tab menu item. Tab titles are unchanged.
  • How: the button's lookup reads only the pane's running agent. The earlier "keep the button after exit" behaviour (my round-1 parity call) is reversed. The deferred "hasn't saved yet" wording issue for old exited conversations is now moot, because exited panes have no button.
  • Verified: 147 targeted tests, orca-ci-checks (except a local tool-version typecheck that CI covers), CI. The hide-after-exit path for the header button was not exercised live. The Windows live run in fix(tab-bar): offer Resume in New Native Chat only while the tab's agent is running #27520/fix(terminal-pane): quitting Claude or Codex in cmd.exe or Git Bash removes it from the running list #27742 proved the same running-agent signal clears after exit. The screenshots above show the running state and still apply.

…context-menu

# Conflicts:
#	src/renderer/src/components/tab-bar/tab-session-history-switch.ts
#	src/renderer/src/lib/ai-vault-tab-title-requests.ts
…nt is running

The tab menu now offers Resume in New Native Chat only while the tab's agent
runs (#27520). The header button still found its pane's conversation from the
retained or sleeping record an exited agent leaves behind, so it stayed after
exit. The pane lookup now honours the same runningAgentsOnly option, and both
the button's visibility and its click pass it.
…ing agent

Every caller of resolvePaneAiVaultTitleRequest asked for running agents only,
so its retained and sleeping sources were never read. The pane lookup now maps
just the pane's live agent, and collectAiVaultTitleRequests returns to main's
shape, sharing only the live-agent mapping with it.
@brennanb2025
brennanb2025 merged commit c345741 into main Oct 12, 2026
37 checks passed
@brennanb2025
brennanb2025 deleted the brennanb2025/cli-tab-context-menu branch October 12, 2026 19:13
registered2nd pushed a commit to registered2nd/orca that referenced this pull request Oct 14, 2026
…view (stablyai#27184)

* feat(terminal-pane): header button resumes the CLI session in a new native chat

The pane header's "Show chat view" toggle is replaced by the tab menu's
"Resume in New Native Chat" move. The Session History lookup runs on click,
so an always-visible header never scans in the background. A pane already
in chat view keeps its "Show terminal" way back.

* fix(terminal-pane): fold the resume gate into the pane's existing store subscription

Keeps a mounted terminal pane inside its pinned store-listener budget.

* fix(terminal-pane): resume the pane's own conversation, open the chat that already holds it

The header "Resume in New Native Chat" button gated on chat-view eligibility but looked up the
tab's best conversation, so a Grok pane beside a Claude pane resumed the Claude conversation, and
Grok/OpenCode panes showed a button that always failed with a "try again" toast.

- Map one pane to its conversation with the tab-title mapping narrowed to that pane (same sources,
  same Claude/Codex rule), for both the button's visibility and its click; this also keeps the
  button after the agent exits, as the tab menu does.
- A conversation a native chat already holds now matches its history row; the move's gate still
  refuses it (tab menu unchanged, pinned in the parity test), and the button opens that chat.
- Distinct messages: nothing saved yet, cannot be resumed in a native chat, or the existing
  generic failure. The click forces a fresh scan like the panel's Refresh does.
- Call the plain resume launch directly; drop the shared actions module and restore the tab menu.
- A tab closed during the lookup no longer opens a chat.

* fix(terminal-pane): hide Resume in New Native Chat where the chat route is refused

On a local workspace whose project runs in WSL (or needs runtime repair), the header button showed
on Claude/Codex panes, but native chat cannot launch there, so every click said the conversation
can't be resumed while the tab menu offered nothing. The button's visibility now also asks the
same launch-route check the Session History row gate uses (structuredAgentSessionLaunchFeasible).

* fix(terminal-pane): offer the header resume only while the pane's agent is running

The tab menu now offers Resume in New Native Chat only while the tab's agent
runs (stablyai#27520). The header button still found its pane's conversation from the
retained or sleeping record an exited agent leaves behind, so it stayed after
exit. The pane lookup now honours the same runningAgentsOnly option, and both
the button's visibility and its click pass it.

* refactor(terminal-pane): the header's pane lookup reads only the running agent

Every caller of resolvePaneAiVaultTitleRequest asked for running agents only,
so its retained and sleeping sources were never read. The pane lookup now maps
just the pane's live agent, and collectAiVaultTitleRequests returns to main's
shape, sharing only the live-agent mapping with it.

(cherry picked from commit c345741)
brennanb2025 added a commit that referenced this pull request Oct 15, 2026
…view (#27184)

* feat(terminal-pane): header button resumes the CLI session in a new native chat

The pane header's "Show chat view" toggle is replaced by the tab menu's
"Resume in New Native Chat" move. The Session History lookup runs on click,
so an always-visible header never scans in the background. A pane already
in chat view keeps its "Show terminal" way back.

* fix(terminal-pane): fold the resume gate into the pane's existing store subscription

Keeps a mounted terminal pane inside its pinned store-listener budget.

* fix(terminal-pane): resume the pane's own conversation, open the chat that already holds it

The header "Resume in New Native Chat" button gated on chat-view eligibility but looked up the
tab's best conversation, so a Grok pane beside a Claude pane resumed the Claude conversation, and
Grok/OpenCode panes showed a button that always failed with a "try again" toast.

- Map one pane to its conversation with the tab-title mapping narrowed to that pane (same sources,
  same Claude/Codex rule), for both the button's visibility and its click; this also keeps the
  button after the agent exits, as the tab menu does.
- A conversation a native chat already holds now matches its history row; the move's gate still
  refuses it (tab menu unchanged, pinned in the parity test), and the button opens that chat.
- Distinct messages: nothing saved yet, cannot be resumed in a native chat, or the existing
  generic failure. The click forces a fresh scan like the panel's Refresh does.
- Call the plain resume launch directly; drop the shared actions module and restore the tab menu.
- A tab closed during the lookup no longer opens a chat.

* fix(terminal-pane): hide Resume in New Native Chat where the chat route is refused

On a local workspace whose project runs in WSL (or needs runtime repair), the header button showed
on Claude/Codex panes, but native chat cannot launch there, so every click said the conversation
can't be resumed while the tab menu offered nothing. The button's visibility now also asks the
same launch-route check the Session History row gate uses (structuredAgentSessionLaunchFeasible).

* fix(terminal-pane): offer the header resume only while the pane's agent is running

The tab menu now offers Resume in New Native Chat only while the tab's agent
runs (#27520). The header button still found its pane's conversation from the
retained or sleeping record an exited agent leaves behind, so it stayed after
exit. The pane lookup now honours the same runningAgentsOnly option, and both
the button's visibility and its click pass it.

* refactor(terminal-pane): the header's pane lookup reads only the running agent

Every caller of resolvePaneAiVaultTitleRequest asked for running agents only,
so its retained and sleeping sources were never read. The pane lookup now maps
just the pane's live agent, and collectAiVaultTitleRequests returns to main's
shape, sharing only the live-agent mapping with it.

(cherry picked from commit c345741)
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