Skip to content

fix(sidebar): keep launched Cursor agents visible under conversation titles - #15336

Closed
apple-ouyang wants to merge 1 commit into
stablyai:mainfrom
apple-ouyang:fix/sidebar-cursor-conversation-titles
Closed

apple-ouyang wants to merge 1 commit into
stablyai:mainfrom
apple-ouyang:fix/sidebar-cursor-conversation-titles

Conversation

@apple-ouyang

Copy link
Copy Markdown
Contributor

ELI5

If you start Cursor from Orca, the session is running, but it disappears from the left-hand Agents list as soon as Cursor names the chat. Orca now keeps that row for the whole session, and only hides it when the terminal is back at a shell prompt.

What Changed

  • Title-derived sidebar rows treat a Cursor-owned pane as still live when the OSC title is an arbitrary conversation name.
  • Shell names (zsh, bash, …) and the tab's default Terminal title still mean the agent exited, matching use-tab-agent.
  • Tests cover: any session title + launchAgent: cursor stays visible; zsh hides the row; the same title without launch identity does not invent a Cursor row.

Why

#10258 kept panes whose title was the native Cursor Agent literal. cursor-agent then replaces that literal with a generated conversation name that has no provider token. Grok session titles still contain grok, so they stay classified; Cursor titles do not. Parsing one Cursor title format is the wrong fix — the conversation name is arbitrary.

Linked Issue

Fixes #15335

Visual Proof

N/A — sidebar row appears from existing title-derived classification. No new chrome. A launched Cursor pane whose title is an arbitrary conversation name now gets a Cursor row; previously that title classified as nothing.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

Focused: worktree-title-derived-agent-rows.test.ts, worktree-status.test.ts, worktree-status-spinner-launch-agent.test.ts (56 tests passed).

Platforms: classification is on the OSC title string plus launchAgent (macOS / Linux / Windows / SSH identical). No desktop UI run of this checkout; live app is still installed 1.4.184.

AI Disclosure

Implementation and write-up by Grok 4.6 (xAI) in a local coding-agent session.

Review

Agent code-review summary

  • Cross-platform: matching is on the title string and tab launchAgent; no path or shortcut changes.
  • SSH/remote: title-derived rows already run on the client that owns the pane; owner fallback uses the same single-leaf launchAgent gate as today, so a split cannot brand a sibling.
  • Agent compatibility: Cursor-only owner fallback. Grok/Codex/OpenCode title identity is unchanged. A shell title still drops the row.
  • Performance: one extra isShellProcess check on an existing title-derived path.
  • UI: no new controls.
  • Security: no new network, credentials, or command execution.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (including ELI5)
  • 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)

Focused unit tests passed locally. Full lint/typecheck/build not run on this checkout.

Author

  • X / Twitter:

Made with Cursor

…titles

cursor-agent replaces its native "Cursor Agent" OSC title with an
arbitrary conversation name. Title-derived sidebar rows then had no
provider token and dropped the pane, unlike Grok whose session titles
still contain "grok".

A Cursor-owned pane now keeps its sidebar row for any non-shell title;
zsh / default Terminal titles still mean the agent exited.

Co-authored-by: Cursor <[email protected]>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The sidebar title-derived row logic now detects shell and default terminal titles separately from agent labels. Owner-known Cursor panes with arbitrary non-shell titles produce idle Cursor rows and preserve the title. Agent identity and row labels can now come from the pane owner when the title has no recognized agent label. Tests cover arbitrary titles, shell-title suppression, and missing launch identity.

Merge Risk: ⚪ Minimal · up to 95076

This localized sidebar classification change keeps launched Cursor sessions visible without changing other providers or runtime behavior; no actionable merge-blocking risk remains beyond normal checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: keeping launched Cursor agents visible under conversation titles.
Description check ✅ Passed The description follows the template, explains the change and rationale, links issue #15335, documents tests, and addresses UI and compatibility impact.
Linked Issues check ✅ Passed The implementation satisfies issue #15335 by preserving launched Cursor rows for arbitrary titles and hiding them for shell or default Terminal titles.
Out of Scope Changes check ✅ Passed The code and tests remain focused on Cursor title-derived sidebar classification and contain no unrelated changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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.

🧹 Nitpick comments (1)
src/renderer/src/components/sidebar/worktree-title-derived-agent-rows.ts (1)

157-161: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Reduce the added title rationale.

Keep one short production comment for the non-obvious Cursor owner fallback. Remove the test comment because the test name states the behavior.

  • src/renderer/src/components/sidebar/worktree-title-derived-agent-rows.ts#L157-L161: replace the multi-line comparison with one sentence that explains why Cursor uses the known pane owner.
  • src/renderer/src/components/sidebar/worktree-title-derived-agent-rows.test.ts#L307-L309: remove the comment.

As per coding guidelines, comments must be concise, non-obvious, and brief; prefer one line.

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d4db01fe-f09a-4b3e-a1bd-727b5828adad

📥 Commits

Reviewing files that changed from the base of the PR and between 2f0f9a8 and 950766b.

📒 Files selected for processing (2)
  • src/renderer/src/components/sidebar/worktree-title-derived-agent-rows.test.ts
  • src/renderer/src/components/sidebar/worktree-title-derived-agent-rows.ts

Included review availability: Your plan includes up to 10 reviews per rolling hour; 9 remain after this review.

@brennanb2025

Copy link
Copy Markdown
Contributor

Superseded by #15665.

Your keep/retire split (conversation title stays visible; zsh / default Terminal title hides the row) is the right product rule and is carried forward there. The follow-up is generic launch provenance for every launched agent, pinned to the original leaf so a remaining sibling after a split-pane close cannot inherit the row.

Co-authored-by credit is on 15665.

@apple-ouyang

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #15665, which carries the product rule and the co-author credit.

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.

[Bug]: Launched Cursor agents vanish from the sidebar after they set a conversation title

2 participants