Repository navigation
feat(claude): navigate and track subagent views from sidebar - #33322
Conversation
|
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:
Walkthrough
Priority: Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 4

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:
3f3d896e-b541-4220-afb1-19d3dbfbd5b7
Files ignored due to path filters: 1-
src/shared/rpc-contract/rpc-params-catalog.generated.tsis excluded by!**/*.generated.*
Files selected for processing: 31-
docs/readme/claude-subagent-navigation.mdsrc/main/agent-hooks/server/server-lifecycle.tssrc/main/agent-hooks/server/server-status-hook-lifecycle.tssrc/main/agent-hooks/wsl-hook-relay-deps.tssrc/main/agent-hooks/wsl-hook-relay-link.tssrc/main/agent-hooks/wsl-hook-relay-manager.test.tssrc/main/agent-hooks/wsl-hook-relay-manager.tssrc/main/claude/agent-view-bridge.test.tssrc/main/claude/agent-view-bridge.tssrc/main/claude/agent-view-install.test.tssrc/main/claude/agent-view-install.tssrc/main/claude/agent-view-keybindings.tssrc/main/claude/agent-view-mod-source.test.tssrc/main/claude/agent-view-mod-source.tssrc/main/claude/hook-service.tssrc/main/claude/statusline-install.tssrc/main/runtime/rpc/methods/terminal-manifest-characterization.test.tssrc/main/runtime/rpc/methods/terminal.tssrc/main/runtime/rpc/methods/terminal/terminal-claude-agent-view-method.tssrc/main/runtime/rpc/terminal-claude-agent-view.test.tssrc/renderer/src/components/dashboard/DashboardAgentRow.tsxsrc/renderer/src/components/sidebar/worktree-card-compact-agent-row.tsxsrc/renderer/src/lib/claude-agent-row-view.tssrc/shared/claude-agent-view.tssrc/shared/rpc-contract/terminal-unary-params.tssrc/wsl-guest/agent-hook-request.tssrc/wsl-guest/agent-hook-server-contract.tssrc/wsl-guest/agent-hook-server.tssrc/wsl-guest/wsl-agent-hook-relay.test.tssrc/wsl-guest/wsl-agent-hook-relay.tstests/e2e/claude-sidebar-agent-view.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
There was a problem hiding this comment.
🧹 Nitpick comments: 1
src/main/claude/agent-view-mod-source.test.ts: 1
93-104:Trivial · Functional Correctness · Quick win Add a deferred
taketest for the in-flight session clear.The current test runs
session.endbeforecommand.run, so notakeis in flight during the clear. The post-takeidentity recheck incommand.runis therefore never the guard that stops the work. If that recheck is removed, this test still passes. A regression would callui.viewand postackfor a session that has already been cleared.Hold the
takeresponse open, clear the session, then release the response. Assert that noackis posted and thatui.viewis not called.Suggested fix
let sessionId = 'session-before-clear' let heartbeat: (() => Promise<unknown>) | undefined + let blockNextTake = false + let takeStartedResolve: (() => void) | undefined + let takeReleaseResolve: (() => void) | undefined const posts: { action: string; sessionId: string; instanceId: string }[] = [] @@ const body = JSON.parse(options.body) posts.push(body) + if (body.action === 'take' && blockNextTake) { + blockNextTake = false + takeStartedResolve?.() + await new Promise<void>((resolve) => { + takeReleaseResolve = resolve + }) + } return { @@ await invoke('session.start', { isInteractive: true, surface: 'terminal' }) expect(posts.at(-1)).toMatchObject({ action: 'register', sessionId }) const firstInstance = posts.at(-1)?.instanceId + const takeStarted = new Promise<void>((resolve) => { + takeStartedResolve = resolve + }) + blockNextTake = true + const pendingCommand = invoke('command.run') + await takeStarted await invoke('session.end', { reason: 'clear', sessionId }) + takeReleaseResolve?.() + await pendingCommand await heartbeat?.() await invoke('command.run') expect(posts.at(-1)?.action).toBe('end') + expect(posts.filter(({ action }) => action === 'ack')).toHaveLength(0) expect(view).not.toHaveBeenCalled()

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:
d11b954e-c24b-465e-8e5a-45286e5f5220
Files selected for processing: 1-
src/main/claude/agent-view-mod-source.test.ts
Files skipped from review as they are similar to previous changes: 1-
- src/main/claude/agent-view-mod-source.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 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 · Track the binding installed by Orca before removing it. · agent-view-install.ts:43-45
src/main/claude/agent-view-install.ts:43-45
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick winTrack the binding installed by Orca before removing it.
removeClaudeAgentViewremoves everycommand:orca-agent-viewentry from every block. Installation writes the ownership marker even when it reuses an existing Chat binding. Uninstall therefore can delete a user’s existing Chat binding or a matching binding in a non-Chat block.Store the installed context and chord in the marker. Remove only that exact binding. Store no binding when installation reuses an existing one.
Suggested fix
- ([, action]) => action !== `command:${CLAUDE_AGENT_VIEW_COMMAND}` + ([chord, action]) => + !( + marker.binding?.context === block.context && + marker.binding.chord === chord && + action === `command:${CLAUDE_AGENT_VIEW_COMMAND}` + )

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:
7cbac08d-6cf7-41a7-9c5a-87d03f697f1b
Files selected for processing: 1-
tests/e2e/claude-sidebar-agent-view.spec.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
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:
62382dc3-77e1-488f-9f66-e376509de0e2
Files selected for processing: 4-
src/main/agent-hooks/managed-hook-script-refresh-main-thread.test.tssrc/main/claude-accounts/claude-profile-setup-worker.test.tssrc/main/claude/agent-view-install.tssrc/main/claude/hook-service.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.
-
|
Implemented both follow-ups in b3e639c. Parent clicks use the current pane identity and supersede a pending child selection. The eye and row highlight follow Claude’s actual displayed transcript, including native keyboard switches; collapsed children and compact group summaries retain an indicator. Validated live on Linux with Claude Code 2.1.309 (main → child and child → main through native keys, draft preserved). The screenshots below come from the hidden Electron protocol-fixture test, which exercises real sidebar clicks, RPC/PTY delivery, independent view reports, and both row layouts. Live Claude and rendered Orca were tested separately. Local checks: 79 focused tests across 11 files; full lint and typechecks; changed-code/design-system checks; E2E typecheck ratchet; and the rebuilt hidden Electron test passed. The full E2E typecheck retains its existing 221 grandfathered diagnostics. All CI checks passed on 67e29a8, including all five unit shards, the changed Electron E2E spec, static analysis/typechecks, cross-version wire compatibility, packaging, mobile, WSL, and Windows host checks. The follow-up test commit updates terminal RPC manifest characterization for the added observation stream. |
|
Addressed the review feedback in bf38b04, including the two comments outside inline threads:
Validation: 65 tests passed across 7 files (5 platform-specific skips), full node/web/CLI typechecks, changed-code quality/design-system checks, commit hooks, and |
|
Addressed both blockers in 0812b57.
Also addressed the Esc/draft tooltip, nonblocking startup/render posts, missing pane guard, command error containment, empty Chat-block cleanup, actionable shortcut diagnostics, and Windows config-path resolution through a host-provided hint. The actual session’s CLAUDE_CONFIG_DIR takes precedence if shell startup changes it. Precedence was verified with isolated Claude 2.1.309: settings.json env overrides process env, so appending the environment alone is insufficient. Validation: 183 focused tests passed (5 platform skips), subsequent focused migration/WSL tests passed, all three typechecks and code-quality checks passed, and the isolated-display Electron sidebar test passed. Native Windows/macOS live navigation and all modal variants remain unverified. |
|
Addressed round-2 items 1–3 in cb77b7e.
Also addressed localization and marker documentation, and stopped applying executable permissions to plugin JSON. Modal-state detection and pruning directories retained by live panes remain unchanged. Validation: 1,719 tests passed, 3 platform skips; Node/renderer/CLI typechecks, changed-code quality, localization extraction/catalog checks, and commit hooks passed. The regression suite includes off/on transitions, hand-deleted/edited/reused bindings, malformed JSONC recovery, default/account homes, concurrent settings updates, paired-client settings, cached spawns, and WSL. |
|
Updated the branch through current main and resolved the two WSL conflicts in 7ea274b, preserving main’s checked response parsing plus Claude’s guest paths and navigation tests. The final head is d1ff0ff, which also completes runtime localization entries for the search keywords. After merging main: 69 focused WSL/setup tests and all three typechecks passed. CI on the final head has passed the full five-shard unit suite, relay integration, static analysis/typechecks, Node 18 managed hooks, changed E2E specs, both managed SSH E2E shards, and Linux/Windows packaging. Longer host-integration checks are still running, with no failures reported. Duplicate local affected-test runs were stopped after the equivalent CI suite passed; their localization finding was fixed and revalidated. |
|
Addressed the round-3 startup regression in 079ffe9, with test follow-ups in cd194c7 and a56516c.
Validation on a56516c: 45 focused tests, all three typechecks, and 19 follow-up handoff checks pass. All five CI unit-test shards and the PR aggregate gate passed. Six additional Windows/WSL jobs are still running, with no reported failures. The PR description and navigation documentation describe the bounded wait and fallback. |
|
Addressed both round-4 low notes in 108b93d; documented the accepted round-5 limitation in 0ba47b4.
Validation: 29 focused tests and all 20 changed-file handoff checks passed. The independent round-5 review reported no blocking or should-fix findings and passed 34 tests. On the final head 0ba47b4, fresh CI static analysis, typechecks, all five unit-test shards, SSH integration tests, and the PR aggregate gate passed. Additional platform jobs are still running, with no reported failures. |
|
Final independent review at 0ba47b4: CLEAN, no further changes requested. The reviewer confirmed that all blockers and should-fix findings from rounds 1–5 are resolved and that the accepted cache limitation is documented accurately. Final CI: 49 checks passed, 13 skipped, none failed or pending. The Windows ARM inbox-SSH file-lock failure passed on the failed-jobs-only retry of run 40177193762, attempt 2, with no code change. GitHub reports the same reviewed head as mergeable with merge state CLEAN. All 20 local handoff checks passed. The focused implementation run passed 29 tests; the independent reviewer passed 34 tests in round 5. |
0ba47b4 to
c524c5e
Compare
7ff64cf to
460d050
Compare
Claude launches now get --plugin-dir prepended (subagent navigation, #33322), so the stand-in read '--plugin-dir' as its marker path and the spec never saw the detached child. Route the spec on descendant-kill and Claude launch-flag sources.



Click a Claude child row in the desktop sidebar or dashboard to open its transcript in the existing terminal. Click the parent row to return to the main conversation. An eye indicator follows Claude’s reported view, including keyboard navigation and collapsed children.
Behavior
Navigation is on by default in new Orca panes with Claude status hooks enabled. No opt-in step is required. Settings → Agents → Claude subagent navigation is an opt-out; an explicitly saved off setting stays off. Existing Claude processes need a fresh launch to load the mod.
Parent clicks while already on main, clicks on the currently viewed child, and clicks without a current observation send no shortcut. Switching views preserves the composer draft; the indicator tooltip warns: click the parent to return; Esc stops the viewed subagent, and Enter sends the draft to that subagent.
Setup is asynchronous and serialized. Spawns read a cached plugin root without per-spawn HOME I/O. Only eligible local Claude launches with navigation and hooks enabled wait for setup, capped at 200 ms. Plain shells, other agents, disabled navigation/hooks, and WSL bypass this local service wait. If setup exceeds the budget, that pane may need respawning for navigation.
The authenticated bridge rechecks the session, PTY, registration, permission state, request expiry, and mobile input ownership before delivering a shortcut. Mod startup/render reporting is nonblocking. WSL uses guest-resident storage; updated paired hosts use their own storage and navigation setting. Older hosts safely decline navigation. Mobile child rows retain parent-pane navigation.
Compatibility with existing Claude mods and plugins
--plugin-dirarguments. It does not rewriteenabledPluginsor install its mod into~/.claude/skills. Legacy Orca-owned global installations are retired; unowned folders are preserved.CLAUDE_CODE_PLUGIN_DIRS. In the live Claude 2.1.309 probe, a settings.jsonenv.CLAUDE_CODE_PLUGIN_DIRSoverrode the process variable; the added--plugin-dirloaded Orca alongside those settings-provided plugins. Manually typed Claude or opaque wrappers need an explicit--plugin-dirwhen settings override the environment. With navigation off, the environment stays untouched except when stripping an inherited Orca-owned path.orca-agent-view.jsonmarker records ownership. Disabling navigation or Claude hooks removes only the exact owned binding. Re-enabling restores bindings removed by Orca; user-deleted, edited, or reused bindings stay untouched.orca-agent-viewcommand. Another mod can still intercept or deny command/view operations, and Claude’s customization policies can prevent loading. Arbitrary third-party mod combinations have not been live-tested, so this PR does not claim universal compatibility.Claude Mods status
Claude Mods is a shipped, documented feature. Anthropic’s current overview says “Mods are on by default” in terminal Claude Code 2.1.287+; the former
CLAUDE_CODE_ENABLE_FUNCTION_HOOKSearly-access flag is ignored from that version onward.This integration uses the documented mods API without patching the executable. Its
$.ui.viewoperation was added in Claude Code 2.1.300, and live validation used 2.1.309. The authoring docs still warn that events and methods can change between releases, so API/version compatibility remains a requirement.Validation
check:changedchecks after rebasing on main. The duplicate local full affected-test run was stopped after the complete CI test gate passed; it is not counted as a local pass.460d050408d: the full PR Checks workflow and PR checks passed aggregate gate passed. At merge verification, 48 checks passed and 13 were skipped; the advisory Windows ARM inbox-SSH job was still provisioning its runner. All platform checks passed on the pre-rebase head7ff64cffd99./clear, endpoint reconnection, and plugin-path precedence. Earlier hidden Electron/Playwright checks covered compact/full sidebar navigation and keyboard-driven indicators using an owned protocol fixture. These live checks were not repeated after the startup/cache and default-on changes.Known limitations
/model; only permission state is guarded.