Repository navigation
Conversation
|
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 (5)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughPTY shell confirmation now safely resolves sleeping-agent records and matching legacy aliases. Conflicting same-tab provider sessions prevent cleanup. Confirmed shell foreground clears matched records before terminal cleanup. Agent-status handling excludes shell-foreground panes from completed sleeping-session capture and resumable recovery identity. Regression tests cover Droid cleanup, legacy alias handling, conflicting sessions, manual capture, and late Claude status updates. Merge Risk: ⚪ Minimal · up to The change restores the terminal icon after an agent exits and is merge-ready after normal checks and review; no actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/components/terminal-pane/pty-connection.ts (1)
2071-2078: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winResolve and clear legacy sleeping-session keys.
The new checks use only
cacheKey. The existing helper at Lines [1222-1262] also resolves legacy numeric pane keys, andclearSleepingRecordProviderDuplicatesat Lines [1267-1287] clears the matched key and its provider-session aliases.If a sleeping record uses a legacy key, shell confirmation will not recognize it here. Clearing
cacheKeyalso leaves the legacy record behind. The completed agent can remain resumable and restore the stale terminal icon later.Use
getSleepingRecordForPane(state)for identity detection and clear the returned record withclearSleepingRecordProviderDuplicates. Add a regression test for a legacy numeric pane key.Proposed fix
const paneHasKnownAgentIdentity = (): boolean => { const state = useAppStore.getState() const registeredLaunchAgent = state.agentLaunchConfigByPaneKey[cacheKey]?.identity.agentType return ( Boolean(state.paneForegroundAgentByPaneKey[cacheKey]?.agent) || paneHasLiveHookAgentIcon(state) || - Boolean(state.sleepingAgentSessionsByPaneKey[cacheKey]?.agent) || + Boolean(getSleepingRecordForPane(state)?.record.agent) || isTuiAgent(registeredLaunchAgent) ) } onConfirmedShellForeground: (reason) => { - useAppStore.getState().clearSleepingAgentSession(cacheKey) + const state = useAppStore.getState() + const sleepingRecord = getSleepingRecordForPane(state) + if (sleepingRecord) { + clearSleepingRecordProviderDuplicates(state, sleepingRecord) + }Also applies to: 2137-2139
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d487fab4-9eaa-4d5e-8b41-bc71708ff3a8
📥 Commits
Reviewing files that changed from the base of the PR and between b3965f3 and f19bb293e266a43676471fb3a5fcbded4edc3d1c.
📒 Files selected for processing (5)
src/renderer/src/components/terminal-pane/pty-connection.test.tssrc/renderer/src/components/terminal-pane/pty-connection.tssrc/renderer/src/store/slices/agent-status-manual-sleep-capture.test.tssrc/renderer/src/store/slices/agent-status-provider-session.test.tssrc/renderer/src/store/slices/agent-status.ts
|
Addressed the legacy sleeping-session finding in |
|
|
23fe4a0 to
ea47081
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
donehooks and later workspace sleep from rebuilding the exited identity.Fixes #13749
Screenshots
Testing
pnpm lintpnpm typecheckpnpm testpnpm buildFocused PTY coverage: 570 tests passed. Full suite: 49,652 passed, 102 skipped.
AI Review Report
Exact-SHA five-lane review passed for
23fe4a056d9b119f6b36705b72897c1670696d80: goal/constraints, runtime QA, code quality, security, and history/context.The review explicitly checked macOS, Linux, and Windows behavior, plus SSH and folder workspaces. This change introduces no shortcuts, labels, paths, shell commands, or Electron platform branches; remote PTYs remain excluded from local foreground-process confirmation.
Security Audit
Passed. Cleanup requires fresh pane/PTY-bound shell confirmation. Legacy aliases are limited to the same tab and provider claim; mixed-provider rows fail closed, other tabs are preserved, and provider claims include worktree identity. No command execution, path handling, authentication, secrets, dependencies, or IPC contracts changed.
Notes
Manual macOS dev-app QA confirmed
Claude→/exitrestores the terminal identity.