Repository navigation
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:
📝 WalkthroughWalkthroughAdds provider-aware PTY inactivity classification and guarded cleanup IPC with normalized inputs, ownership routing, revalidation, and fail-closed behavior. Adds preload and web API surfaces, renderer review and confirmation workflows, lifecycle state handling, status-bar integration, localized dialog copy, reliability-gate metadata, and unit/component tests. Adds an Electron smoke test verifying idle unbound sessions are removed while active sessions remain usable. 🚥 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.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/main/ipc/pty.ts (1)
4962-4977: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winDo not treat a newly disconnected SSH session as killed.
Line 4967 tombstones a missing SSH provider and returns successfully. If the provider disconnects after
killInactiveSessionsclassifies an ID as inactive, Line 5035 reaches this force-kill behavior without invoking remote shutdown, and reportskilledfor a potentially live remote PTY. Keep this tombstone behavior exclusive to explicitpty:kill; guarded cleanup should return protected/failed when its provider disappears. Add a regression covering disconnect after inspection.Proposed direction
const shutdownPty = async (args: { id: string keepHistory?: boolean + allowDisconnectedSshTombstone?: boolean }): Promise<void> => { // ... if (!provider && connectionId) { + if (args.allowDisconnectedSshTombstone === false) { + throw new Error('PTY provider disconnected before guarded shutdown') + } finishPtyShutdown(args.id, connectionId, store) // existing explicit-force-kill lifecycle return } } ipcMain.handle('pty:kill', async (_event, args) => - shutdownPty(args) + shutdownPty({ ...args, allowDisconnectedSshTombstone: true }) ) // guarded path: re-resolve immediately before shutdown and protect if absent -await shutdownPty({ id, keepHistory: false }) +await shutdownPty({ id, keepHistory: false, allowDisconnectedSshTombstone: false })As per PR objectives, disconnected sessions must be protected, and the plan requires guarded cleanup not to fall back from unavailable SSH ownership.
🧹 Nitpick comments (6)
src/renderer/src/components/status-bar/resource-session-cleanup-review.ts (2)
11-14: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winError messages bypass i18n and are shown raw to users.
RESOURCE_SESSION_CLEANUP_SESSION_NOT_READY_ERROR,RESOURCE_SESSION_CLEANUP_REVIEW_ERROR, andRESOURCE_SESSION_CLEANUP_EXECUTION_ERRORare plain English strings thrown asError.message. Per theResourceSessionCleanupDialogcomponent (referenced context), the error phase rendersstate.messagedirectly instead of a translated string, and the newly addeden.jsonResourceSessionCleanupDialogblock (this PR) has no correspondingerrorkey. Non-English users will see untranslated English error copy when review/cleanup fails or the workspace isn't ready.Consider exposing a discriminant (e.g. an error
codeenum) instead of relying on message-string equality, and have the dialog map that code to a translated string.
69-103: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick winSkip the inspection round-trip when nothing is unbound.
executeResourceSessionCleanupalready short-circuits wheneligibleIds.length === 0(line 155), avoiding an unnecessarykillInactiveSessionscall.reviewResourceSessionCleanupdoesn't have the analogous guard: it always callsdependencies.inspectInactiveCleanup(reviewedIds)even whenreviewedIdsis empty (e.g., every PTY is currently bound to a renderer tab). Since this runs every time the cleanup review dialog opens, adding an early return for the empty case avoids a wasted IPC round trip on the common "nothing unbound" path.♻️ Proposed guard
const reviewedIds = sessions.map((session) => session.id).filter((id) => !boundPtyIds.has(id)) + if (reviewedIds.length === 0) { + return { reviewedIds, inspections: [], inactiveIds: [], activeCount: 0, unknownCount: 0, goneCount: 0 } + } const returned = await dependencies.inspectInactiveCleanup(reviewedIds)src/renderer/src/components/status-bar/resource-session-cleanup-review.test.ts (1)
45-148: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMissing coverage for
executeResourceSessionCleanup's guard/error-mapping paths.Tests exist for
reviewResourceSessionCleanup's "not ready" guard (line 83) and transport-error mapping (line 93), butexecuteResourceSessionCleanupshares the exact samerequireReadyBindingIndexguard and try/catch error-mapping shape and has no equivalent tests (e.g. workspace not ready during execute, orkillInactiveSessions/listSessionsthrowing and being mapped toRESOURCE_SESSION_CLEANUP_EXECUTION_ERROR). Since this is a safety-critical cleanup path, it's worth covering both branches for parity with the review-side tests.src/renderer/src/components/status-bar/ResourceSessionCleanupDialog.tsx (1)
61-83: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winExtract phase-driven description/footer into helper functions.
Both the description (Lines 61-83) and footer (Lines 139-201) are 4-5 level nested ternaries keyed off
state.phase. As more phases/edge cases are added this will get harder to follow safely. Aswitch-based helper (or per-phase sub-components) would make each branch easier to review and extend.♻️ Example extraction for the description block
+function getDialogDescription(state: ResourceSessionCleanupReviewState): string { + switch (state.phase) { + case 'reviewing': + return translate( + 'auto.components.status.bar.ResourceSessionCleanupDialog.reviewing', + 'Checking current process activity…' + ) + case 'running': + return translate( + 'auto.components.status.bar.ResourceSessionCleanupDialog.running', + 'Closing confirmed inactive terminals…' + ) + case 'completed': + return translate( + 'auto.components.status.bar.ResourceSessionCleanupDialog.completed', + 'Cleanup finished. Review the verified result below.' + ) + case 'error': + return state.message + default: + return translate( + 'auto.components.status.bar.ResourceSessionCleanupDialog.description', + 'Only terminals freshly verified as idle shells can be closed. Active and unverified terminals are protected.' + ) + } +} + <DialogDescription className="text-xs"> - {state.phase === 'reviewing' ? ... : ...} + {getDialogDescription(state)} </DialogDescription>The footer buttons block can follow the same pattern (a
renderFooterActions(state, { onClose, onRetry, onConfirm })helper returning the JSX for each phase).Also applies to: 139-201
src/renderer/src/components/status-bar/ResourceUsageStatusSegment.rows.test.tsx (1)
125-134: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAssertion only checks button presence, not the unbound "always visible" behavior.
The kill button is unconditionally rendered for both bound and unbound rows (
ResourceUsageStatusSegment.tsxLines 426-430); the distinguishing behavior is the absence of thecan-hover:opacity-0class for unbound rows. Checking only for DOM presence doesn't verify that differentiator.♻️ Proposed stronger assertion
expect(container.querySelector('button[aria-label="Kill session unbound-a"]')).not.toBeNull() + expect( + container + .querySelector('button[aria-label="Kill session unbound-a"]') + ?.className.includes('can-hover:opacity-0') + ).toBe(false)src/renderer/src/components/status-bar/use-resource-session-cleanup-review.test.tsx (1)
115-139: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd a final assertion after the locked cleanup settles.
The test confirms
close()is a no-op whilephase === 'running', but never verifies the hook actually reachescompletedonce the guarded cleanup resolves. Adding that assertion would fully validate the documented guarantee that "confirmed cleanup stays non-cancellable and continues to settlement."✅ Suggested addition
await act(async () => { cleanup.resolve([{ id: 'idle', outcome: 'killed' }]) await completion }) + expect(result.current.state.phase).toBe('completed') })
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 21122048-7941-469b-9e76-d12a92464858
📒 Files selected for processing (27)
config/reliability-gates.jsoncdocs/superpowers/plans/2026-07-13-resource-manager-unbound-session-safety.mddocs/superpowers/specs/2026-07-13-resource-manager-unbound-session-safety-design.mdsrc/main/ipc/pty-inactive-cleanup.test.tssrc/main/ipc/pty-inactive-cleanup.tssrc/main/ipc/pty.test.tssrc/main/ipc/pty.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/status-bar/ResourceSessionCleanupDialog.test.tsxsrc/renderer/src/components/status-bar/ResourceSessionCleanupDialog.tsxsrc/renderer/src/components/status-bar/ResourceUsageStatusSegment.rows.test.tsxsrc/renderer/src/components/status-bar/ResourceUsageStatusSegment.session-polling.test.tssrc/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsxsrc/renderer/src/components/status-bar/resource-session-cleanup-review.test.tssrc/renderer/src/components/status-bar/resource-session-cleanup-review.tssrc/renderer/src/components/status-bar/use-resource-session-cleanup-review.test.tsxsrc/renderer/src/components/status-bar/use-resource-session-cleanup-review.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/web/web-preload-api.tssrc/shared/pty-inactive-cleanup.test.tssrc/shared/pty-inactive-cleanup.tstests/e2e/resource-session-unbound-cleanup-safety.spec.ts
|
Fork-local CI validation completed against the exact upstream base/head commits while the upstream fork workflows await maintainer approval:
The temporary fork PR was closed after the checks settled. The upstream PR Checks and Wayland runs remain |
|
@coderabbitai review All actionable review findings, including the SSH disconnect-after-inspection race and both inline comments, are addressed in exact head Local verification on that change set: 353 focused tests passed, typecheck passed, lint passed, desktop/web build passed, and the strengthened real-daemon Electron E2E passed twice. Upstream fork workflows require maintainer approval; please approve the pending Actions runs for this head. |
|
Note that approving pending Actions runs for external-contributor workflows is a repository/GitHub Actions permission matter that a stablyai/orca maintainer will need to handle directly — that's outside what I can action here. ✅ Action performedReview finished.
|
|
Merged current upstream Post-merge verification passed: 353 focused tests, lint, typecheck, desktop/web build, diff check, and the strengthened real-daemon Electron E2E. Exact-head fork CI is running at bbingz#4. |
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 (2)
src/renderer/src/i18n/locales/ja.json (1)
3247-3249: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winReplace “kill” terminology in the cleanup dialog actions.
These fallbacks still say “kill,” while this flow is explicitly intended to use review/unbound terminology and the dialog closes only verified inactive terminals. Update the source strings to “close,” then resync locale catalogs.
Proposed wording
- "none": "No inactive terminals to kill", - "killOne": "Kill 1 inactive terminal", - "killMany": "Kill {{value0}} inactive terminals", + "none": "No inactive terminals to close", + "killOne": "Close 1 inactive terminal", + "killMany": "Close {{value0}} inactive terminals",src/renderer/src/i18n/locales/zh.json (1)
3247-3249: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRemove “kill” from the review dialog CTA.
The new flow still exposes “Kill … inactive terminals”, contradicting the PR’s
reviewterminology and making the confirmation action sound like an unreviewed force-kill. Update the source fallback/key names inResourceSessionCleanupDialog.tsx, then resync locale catalogs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ae28d8f0-3845-440a-8a36-baf0d2379eac
📒 Files selected for processing (21)
config/reliability-gates.jsoncsrc/main/ipc/pty.test.tssrc/main/ipc/pty.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/status-bar/ResourceSessionCleanupDialog.test.tsxsrc/renderer/src/components/status-bar/ResourceSessionCleanupDialog.tsxsrc/renderer/src/components/status-bar/ResourceUsageStatusSegment.rows.test.tsxsrc/renderer/src/components/status-bar/ResourceUsageStatusSegment.session-polling.test.tssrc/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsxsrc/renderer/src/components/status-bar/resource-session-cleanup-review.test.tssrc/renderer/src/components/status-bar/resource-session-cleanup-review.tssrc/renderer/src/components/status-bar/use-resource-session-cleanup-review.test.tsxsrc/renderer/src/components/status-bar/use-resource-session-cleanup-review.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/web/web-preload-api.tstests/e2e/resource-session-unbound-cleanup-safety.spec.ts
🚧 Files skipped from review as they are similar to previous changes (19)
- src/renderer/src/components/status-bar/ResourceUsageStatusSegment.session-polling.test.ts
- src/renderer/src/components/status-bar/ResourceUsageStatusSegment.rows.test.tsx
- src/preload/index.ts
- src/preload/api-types.ts
- src/renderer/src/components/status-bar/ResourceSessionCleanupDialog.tsx
- tests/e2e/resource-session-unbound-cleanup-safety.spec.ts
- src/renderer/src/i18n/locales/ko.json
- src/renderer/src/i18n/locales/en.json
- config/reliability-gates.jsonc
- src/renderer/src/web/web-preload-api.ts
- src/main/ipc/pty.test.ts
- src/renderer/src/components/status-bar/resource-session-cleanup-review.ts
- src/renderer/src/components/status-bar/use-resource-session-cleanup-review.test.tsx
- src/renderer/src/i18n/locales/es.json
- src/main/ipc/pty.ts
- src/renderer/src/components/status-bar/resource-session-cleanup-review.test.ts
- src/renderer/src/components/status-bar/ResourceSessionCleanupDialog.test.tsx
- src/renderer/src/components/status-bar/use-resource-session-cleanup-review.ts
- src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx
|
Exact-head fork CI is green for current head
The fork-only |
|
@coderabbitai review The two outside-diff close/kill terminology findings are addressed in exact head The dialog now uses close terminology in source fallbacks and all five locale catalogs, with the translation keys renamed from Local verification: 8 focused files / 332 tests passed; lint, typecheck, localization catalog parity, localization coverage, and diff check passed. Exact-head fork CI is running at bbingz#7. |
|
✅ Action performedReview finished.
|
|
Exact-head CI is green for current head
The verify job includes lint, typecheck, full tests, unpacked app build, and packaged CLI smoke. The fork-only |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/main/ipc/pty-inactive-cleanup.ts (1)
106-112: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winSimplify
inactiveTargetsfiltering and unref the timer.Since
firstInspectionstrictly maps 1:1 withtargetsand maintains the exact same order, you can use an index-based lookup to avoid an O(N^2).find()operation. Additionally, consider callingunref()on the timer to prevent it from unnecessarily keeping the Node event loop alive if cleanup happens during app shutdown.♻️ Proposed refactor
- delay: (milliseconds: number) => Promise<void> = (milliseconds) => - new Promise((resolve) => setTimeout(resolve, milliseconds)) + delay: (milliseconds: number) => Promise<void> = (milliseconds) => + new Promise((resolve) => { + const timer = setTimeout(resolve, milliseconds) + if (typeof timer.unref === 'function') timer.unref() + }) ): Promise<PtyCleanupInspection[]> { const firstInspection = await inspectPtyInactiveCleanupTargets(targets) const inactiveTargets = targets.filter( - ({ id }) => firstInspection.find((inspection) => inspection.id === id)?.safety === 'inactive' + (_, index) => firstInspection[index].safety === 'inactive' )
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f39bdfa1-4d0a-4734-947f-022bbd80ee55
📥 Commits
Reviewing files that changed from the base of the PR and between c707d2b and 06d5fdf0f0d97f7c8a17226c13e951ac62503a24.
📒 Files selected for processing (5)
config/reliability-gates.jsoncsrc/main/ipc/pty-inactive-cleanup.test.tssrc/main/ipc/pty-inactive-cleanup.tssrc/main/ipc/pty.test.tssrc/main/ipc/pty.ts
🚧 Files skipped from review as they are similar to previous changes (3)
- src/main/ipc/pty.test.ts
- src/main/ipc/pty.ts
- config/reliability-gates.jsonc
|
@coderabbitai review Synced current upstream Post-merge verification passed: 11 focused files / 369 tests, typecheck, full lint (including reliability, max-lines, skill-guide, and localization gates), desktop/web build, and the real-daemon Electron E2E that kills the idle unbound shell while preserving later input on the active session. The PR is now mergeable; upstream check runs have not yet been attached to this external-contributor head. |
|
✅ Action performedReview finished.
|
|
Rebased onto latest Conflict resolution notes:
|
1229177 to
96430cb
Compare
Restack noteRebased onto latest
No intentional behavior change beyond main drift + i18n union. |
Restack noteRebased onto latest Scope (unique vs main):
Coordinates with (avoid three confirm UIs):
Landing order preference: instrument/confirm (#10013) → how kill completes on Windows (#9752) → idle classification (#8467). #8888 stays orthogonal at the RPC policy layer. |
96430cb to
cd36af3
Compare
cd36af3 to
a7c3652
Compare
07cffd9 to
91c5058
Compare
After rebase onto origin/main, Resource Manager uses useResourceSessionInventory instead of local sessions state. Sync cleanup-review lists via inventory refresh.
91c5058 to
2b1a9a9
Compare
Greptile SummaryThis PR replaces the Resource Manager's direct bulk-kill of renderer-unbound PTY sessions with an explicit review-and-confirm flow. Sessions are now classified at the owning provider boundary, and only freshly verified idle shells with no child processes are eligible for closure; active, unknown, disconnected, SSH-owned, newly bound, and already-gone sessions are protected or skipped.
Confidence Score: 4/5The destructive IPC path is solid — double-classification, fail-closed SSH provider resolution, binding re-checks, and the 500-ID cap all work correctly. The one concrete defect is that the locale catalog values for four ResourceUsageStatusSegment translation keys were never updated, so every user sees 'Kill N orphan terminal(s)' and 'N orphan(s)' in the badge/footer rather than the intended 'Review N unbound terminal(s)'. The core safety logic (inspection, guarded shutdown, coordinator, hook, dialog) is well-structured and the test coverage is thorough. The locale bug is a real, present UI defect: i18next returns the catalog value when the key exists, so the new fallback text is never shown in any of the five supported languages. Everything else in the changed files reads correctly. Files Needing Attention: All five locale files — en.json, es.json, ja.json, ko.json, zh.json — need the four stale ResourceUsageStatusSegment entries updated to match the new unbound/Review terminology.
|
| Filename | Overview |
|---|---|
| src/renderer/src/i18n/locales/en.json | ResourceSessionCleanupDialog entries correctly added; however, four ResourceUsageStatusSegment keys reused by the new unbound/Review UI still carry old orphan/Kill values in all five locale files, so the catalog overrides the new fallback text for every user. |
| src/main/ipc/pty.ts | Adds inspectInactiveCleanup and killInactiveSessions IPC handlers; resolveInactiveCleanupProvider correctly fails-closed for disconnected SSH sessions; killInactiveSessions re-classifies before destruction so sessions active at confirm time are protected. |
| src/main/ipc/pty-inactive-cleanup.ts | New inspector that groups IDs by owning provider, calls listProcesses once per provider, and classifies each PTY as inactive/active/unknown/gone. Fail-closed on every error path; agent-owner listings guard against legacy providers that lack the claim API. |
| src/renderer/src/components/status-bar/resource-session-cleanup-review.ts | Coordinator reads bindings after the async session inventory (not at click time), freezes the reviewed ID set, re-checks bindings at execution time, and accounts for newly-bound/gone sessions before calling killInactiveSessions. |
| src/renderer/src/components/status-bar/ResourceUsageStatusSegment.tsx | Single-row kill now routes through the force-kill confirmation dialog (no longer bypassing for unbound rows); unboundCount drives the footer review button; sessionCleanupReview dialog is hoisted outside PopoverContent to survive popover close mid-interaction. |
| src/renderer/src/components/status-bar/ResourceSessionCleanupDialog.tsx | Dialog correctly blocks dismissal during running phase, shows typed error codes translated through the catalog, and exposes only aggregate counts with no process IDs. |
| src/renderer/src/components/status-bar/use-resource-session-cleanup-review.ts | Hook correctly guards mount-check on all state updates and increments operationGenerationRef to cancel stale review callbacks. Running cleanup is non-cancellable; post-kill session refresh is wrapped in a silent catch. |
| tests/e2e/resource-session-unbound-cleanup-safety.spec.ts | E2E test spawns idle and sleep-running sessions via preload, polls until classified correctly, calls killInactiveSessions, then proves the active session accepts shell commands via a split marker that cannot be satisfied by TTY echo alone. |
Comments Outside Diff (1)
-
src/renderer/src/i18n/locales/en.json, line 3115-3157 (link)Stale locale values override new default text for all users
The
translate()function callsi18n.t(key, { defaultValue: fallback }). i18next returns the catalog value whenever the key is present, so thedefaultValueis never reached. Four keys still carry the old "orphan"/"Kill" strings in every locale file, meaning all users see the outdated text regardless of language:30ff2c3c31→"{{value0}} orphan"(code default:"{{value0}} unbound terminal")b8f4a2c1d0e3→"{{value0}} orphans"(code default:"{{value0}} unbound terminals")c7e3b1a0d9f2→"Kill {{value0}} orphan terminal"(code default:"Review {{value0}} unbound terminal")d8f4c2b1e0a3→"Kill {{value0}} orphan terminals"(code default:"Review {{value0}} unbound terminals")
The same stale values are present in
es.json,ja.json,ko.json, andzh.json. TheResourceSessionCleanupDialogkeys were correctly added, but theResourceUsageStatusSegmententries that were repurposed to carry the new "unbound/Review" meaning were not updated in any catalog file.
Reviews (1): Last reviewed commit: "fix(resource-manager): wire cleanup revi..." | Re-trigger Greptile
|
Closing as superseded — the linked issue(s) for this PR were fixed by another change that has already been merged.
Superseding merge: #10893 Thank you for the contribution! If anything remains unaddressed, please open a new issue or PR against current |
|
Agreed that #10893 covers the core rule — One piece from this PR is still open on The surviving evidence is agent ownership only, so a plain shell running a long build reports Happy to open a small follow-up against current |
Summary
Screenshots
Not captured. The change reuses the existing Resource Manager surface and design-system primitives; the visible behavior changes from direct Kill orphan actions to Review unbound terminal confirmation and verified outcome copy.
Testing
pnpm lintpnpm typecheckpnpm test— the local machine is on unsupported Node 26; the exact focused safety gate is run below and full-suite CI is requested on Node 24pnpm run build:desktopmaingit diff --checkand reliability-gate validation passedpnpm run verify:localization-catalogandpnpm run verify:localization-coveragepassed after the close-terminology review fixFocused gate:
pnpm exec vitest run --config config/vitest.config.ts src/shared/pty-inactive-cleanup.test.ts src/main/ipc/pty-inactive-cleanup.test.ts src/main/ipc/pty.test.ts src/renderer/src/components/status-bar/resource-session-cleanup-review.test.ts src/renderer/src/components/status-bar/use-resource-session-cleanup-review.test.tsx src/renderer/src/components/status-bar/ResourceSessionCleanupDialog.test.tsx src/renderer/src/components/status-bar/ResourceUsageStatusSegment.rows.test.tsx src/renderer/src/components/status-bar/ResourceUsageStatusSegment.session-polling.test.ts src/renderer/src/components/status-bar/resource-session-bindings.test.ts src/renderer/src/components/status-bar/resource-session-count-selector.test.ts src/renderer/src/components/status-bar/mergeSnapshotAndSessions.test.tsAI Review Report
The review checked the destructive IPC boundary, renderer-to-main race windows, provider ownership, SSH disconnect behavior, late binding, already-gone sessions, partial failures, dialog lifecycle, translation routing, test false positives, and direct-kill bypasses. It also checked macOS/Linux/Windows shell names and Electron preload/IPC behavior; no shortcut or path behavior changed.
Review findings fixed:
Cross-platform review found no new platform-specific shortcut or path assumptions. Shell fixtures cover POSIX shells, PowerShell, CMD, and Git Bash. Live Linux, Windows, WSL, and SSH process evidence remains a CI/follow-up gap documented in the reliability gate.
Security Audit
Notes
91c50589c4442ce4dde0ed125bd8f9099be0736bELI5
Resource Manager used to bulk-kill unbound terminals, which could close live sessions by mistake. Cleanup now needs review and confirmation, and only freshly verified idle shells with no child processes are closed, so active work is protected.