Skip to content

Display occupant agent icons in tab search results - #15134

Merged
AmethystLiang merged 3 commits into
mainfrom
improve-search-tab-icon-display
Aug 18, 2026
Merged

AmethystLiang merged 3 commits into
mainfrom
improve-search-tab-icon-display

Conversation

@AmethystLiang

@AmethystLiang AmethystLiang commented Aug 17, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​301 $\color{#cf222e}{\Huge{\mathbf{−}}}$​3 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​298
Prod 7 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​175 $\color{#cf222e}{\Huge{\mathbf{−}}}$​18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​157

Problem

Terminal tabs don't clearly show which agent is running in them. In search results and tab bar, users see generic terminal icons regardless of whether a Claude, Grok, or other agent is actively occupying the pane.

Solution

Detect and display the occupant agent's icon when available. The detection logic checks the focused pane's live agent status, completed hook status, terminal title hints, sibling panes, and sleeping sessions—using the same signal hierarchy as the tab-strip title display.

What Changed

  • New module open-tab-occupant-agent.ts: resolves which agent (if any) is occupying a terminal pane
  • Added optional occupantAgent field to search result types
  • Tab bar and palette UI now show agent icon when occupancy is detected; falls back to generic terminal icon otherwise

Visual Proof

Agent icons now display in:

  • Workspace tab palette search results
  • Tab bar create entry rows

Testing

  • Unit tests for agent detection covering hook priority, sleeping sessions, title parsing, sibling fallback, and isolation
  • UI integration tests verifying agent icon vs terminal icon display
  • Occupant agent stamping tests across search sources

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-platform 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)

@AmethystLiang
AmethystLiang force-pushed the improve-search-tab-icon-display branch from 731e549 to 7e0c713 Compare August 18, 2026 01:20
@coderabbitai

coderabbitai Bot commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: dcc50694-26c4-4a8e-8319-e570eca77e25

📥 Commits

Reviewing files that changed from the base of the PR and between 6b66aad and e573b52.

📒 Files selected for processing (1)
  • src/renderer/src/components/tab-bar/open-tab-search-retention.test.ts

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


📝 Walkthrough

Walkthrough

The change resolves terminal occupant agents from pane, session, process, title, launch, completion, and retention signals. It propagates nullable occupant-agent data through workspace search and palette results. Terminal entries now display the resolved agent icon when available, with terminal and file icon fallbacks. Tests cover resolver precedence, search propagation, title matching, and icon rendering.

Merge Risk: 🟡 Moderate · up to e573b

The change may fail to display an occupant agent icon when a stale terminal title overrides the live title, causing affected search results to show no agent icon or the generic terminal icon. This bounded correctness issue should be fixed or explicitly accepted before merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the problem, solution, implementation, and tests, but it omits the linked issue and required visual proof. Add a valid linked issue, attach before-and-after visual proof or explain N/A, and complete the remaining required template sections.
Docstring Coverage ⚠️ Warning Docstring coverage is 4.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the primary UI change: displaying occupant agent icons in tab search results.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 46d86a25-47ba-4dc7-b014-0a390399938b

📥 Commits

Reviewing files that changed from the base of the PR and between 6ee265e and 7e0c7133c4647c9e94bfbe5dfbb1aa9e3edd1ca5.

📒 Files selected for processing (15)
  • src/renderer/src/components/WorktreeJumpPalette.tsx
  • src/renderer/src/components/tab-bar/TabBarCreateEntry.tab-results.test.tsx
  • src/renderer/src/components/tab-bar/TabBarCreateEntryRow.test.tsx
  • src/renderer/src/components/tab-bar/TabBarCreateEntryRow.tsx
  • src/renderer/src/components/tab-bar/open-tab-entry-dedupe.test.ts
  • src/renderer/src/components/tab-bar/open-tab-search-entries.ts
  • src/renderer/src/components/tab-bar/open-tab-search.test.ts
  • src/renderer/src/components/tab-bar/open-tab-search.ts
  • src/renderer/src/components/tab-bar/open-tab-selection-routing.test.ts
  • src/renderer/src/lib/open-tab-occupant-agent.test.ts
  • src/renderer/src/lib/open-tab-occupant-agent.ts
  • src/renderer/src/lib/workspace-tab-palette-activation.test.ts
  • src/renderer/src/lib/workspace-tab-palette-results.ts
  • src/renderer/src/lib/workspace-tab-palette-search.test.ts
  • src/renderer/src/lib/workspace-tab-palette-search.ts

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

When searching for or viewing open tabs, terminal tabs now show the icon of their occupant agent (e.g., grok) instead of a generic terminal icon. This makes it clearer which tabs have agents actively running. The occupant resolution reuses the same logic as the tab-strip agent identity system, including support for launchAgent, hook status, sleeping sessions, and OSC title parsing.
Remove the recordTitle parameter and rely solely on the unified title,
which already carries live OSC titles. The terminal record's own title
can stay stale (e.g., "Terminal N") while the unified label reflects
the current state, eliminating duplication and simplifying the contract.
@AmethystLiang
AmethystLiang force-pushed the improve-search-tab-icon-display branch from 7e0c713 to 6b66aad Compare August 18, 2026 03:00
@AmethystLiang
AmethystLiang merged commit cdd3aab into main Aug 18, 2026
44 of 45 checks passed
penghuizhang added a commit to penghuizhang/orca that referenced this pull request Aug 18, 2026
paidaxingyo666 pushed a commit to paidaxingyo666/Manta that referenced this pull request Aug 21, 2026
* Display occupant agent icons in tab search results

When searching for or viewing open tabs, terminal tabs now show the icon of their occupant agent (e.g., grok) instead of a generic terminal icon. This makes it clearer which tabs have agents actively running. The occupant resolution reuses the same logic as the tab-strip agent identity system, including support for launchAgent, hook status, sleeping sessions, and OSC title parsing.

* Simplify tab occupant agent resolution to use unified label only

Remove the recordTitle parameter and rely solely on the unified title,
which already carries live OSC titles. The terminal record's own title
can stay stale (e.g., "Terminal N") while the unified label reflects
the current state, eliminating duplication and simplifying the contract.

* Add occupantAgent field to workspace tab helper
dallascrilley pushed a commit to dallascrilley/orca that referenced this pull request Aug 27, 2026
* Display occupant agent icons in tab search results

When searching for or viewing open tabs, terminal tabs now show the icon of their occupant agent (e.g., grok) instead of a generic terminal icon. This makes it clearer which tabs have agents actively running. The occupant resolution reuses the same logic as the tab-strip agent identity system, including support for launchAgent, hook status, sleeping sessions, and OSC title parsing.

* Simplify tab occupant agent resolution to use unified label only

Remove the recordTitle parameter and rely solely on the unified title,
which already carries live OSC titles. The terminal record's own title
can stay stale (e.g., "Terminal N") while the unified label reflects
the current state, eliminating duplication and simplifying the contract.

* Add occupantAgent field to workspace tab helper
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
* Display occupant agent icons in tab search results

When searching for or viewing open tabs, terminal tabs now show the icon of their occupant agent (e.g., grok) instead of a generic terminal icon. This makes it clearer which tabs have agents actively running. The occupant resolution reuses the same logic as the tab-strip agent identity system, including support for launchAgent, hook status, sleeping sessions, and OSC title parsing.

* Simplify tab occupant agent resolution to use unified label only

Remove the recordTitle parameter and rely solely on the unified title,
which already carries live OSC titles. The terminal record's own title
can stay stale (e.g., "Terminal N") while the unified label reflects
the current state, eliminating duplication and simplifying the contract.

* Add occupantAgent field to workspace tab helper
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