Repository navigation
Display occupant agent icons in tab search results - #15134
Conversation
731e549 to
7e0c713
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe 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 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)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
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. Comment |
There was a problem hiding this comment.
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.tsxsrc/renderer/src/components/tab-bar/TabBarCreateEntry.tab-results.test.tsxsrc/renderer/src/components/tab-bar/TabBarCreateEntryRow.test.tsxsrc/renderer/src/components/tab-bar/TabBarCreateEntryRow.tsxsrc/renderer/src/components/tab-bar/open-tab-entry-dedupe.test.tssrc/renderer/src/components/tab-bar/open-tab-search-entries.tssrc/renderer/src/components/tab-bar/open-tab-search.test.tssrc/renderer/src/components/tab-bar/open-tab-search.tssrc/renderer/src/components/tab-bar/open-tab-selection-routing.test.tssrc/renderer/src/lib/open-tab-occupant-agent.test.tssrc/renderer/src/lib/open-tab-occupant-agent.tssrc/renderer/src/lib/workspace-tab-palette-activation.test.tssrc/renderer/src/lib/workspace-tab-palette-results.tssrc/renderer/src/lib/workspace-tab-palette-search.test.tssrc/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.
7e0c713 to
6b66aad
Compare
* 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
* 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
* 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
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
open-tab-occupant-agent.ts: resolves which agent (if any) is occupying a terminal paneoccupantAgentfield to search result typesVisual Proof
Agent icons now display in:
Testing
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand 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
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)