fix(resource-manager): expose detached SSH terminal origins
Summary
Resource Manager now explains detached SSH terminals instead of burying them in Unattributed. SSH PTYs that survive reconnects or layout drift are matched back to runtime terminal metadata, shown with host/relay/origin details, and kept grouped under the workspace they came from.
The runtime now marks terminal summaries as visible or orphaned, with persisted origin hints when a live PTY no longer has a renderer pane. Resource Manager uses the local runtime that owns the daemon PTY inventory for attribution, requests the complete terminal list, and shows detached diagnostics without making remote-environment state responsible for local sessions.
Transient remote workspace sync errors are also softened once the SSH target is connected again, so recovered hosts do not keep stale destructive sync badges after relay reconnects.
Validation
pnpm exec vitest run --config config/vitest.config.ts 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/mergeSnapshotAndSessions.test.ts src/renderer/src/components/status-bar/resource-session-bindings.test.ts src/renderer/src/store/slices/ssh.test.tspnpm run typecheck:webpnpm run typecheck:nodepnpm run lintpnpm run build:desktop
Notes: validation ran on Ultra Magnus with Node v26.5.0; the repo declares Node 24. The build and checks passed, but this should get a Node 24 CI pass before merge.
No actionable comments were generated in the recent review. đ
âšī¸ Recent review info
âī¸ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5f9586d3-e561-447d-8bdc-f002defc834a
đĨ Commits
Reviewing files that changed from the base of the PR and between ef23b6760c01399817aec1123374cfac44710af5 and a65ad291c41a3a57f9324c85ca2b06943df955b9.
đ Files selected for processing (24)
src/main/persistence.test.tssrc/main/persistence.tssrc/main/runtime/claude-agent-teams-service.test.tssrc/main/runtime/orca-runtime.test.tssrc/main/runtime/orca-runtime.tssrc/main/runtime/orchestration/groups.test.tssrc/main/runtime/rpc/methods/orchestration.test.tssrc/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/mergeSnapshotAndSessions.test.tssrc/renderer/src/components/status-bar/mergeSnapshotAndSessions.tssrc/renderer/src/components/status-bar/resource-session-bindings.test.tssrc/renderer/src/components/status-bar/resource-session-bindings.tssrc/renderer/src/components/status-bar/resource-usage-merge-helpers.tssrc/renderer/src/components/status-bar/resource-usage-merge-types.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/store/slices/ssh.test.tssrc/renderer/src/store/slices/ssh.tssrc/shared/runtime-types.ts
đŽ Files not reviewed due to content moderation or server errors (1)
- src/renderer/src/i18n/locales/ja.json
đ Walkthrough
Walkthrough
The change adds presentation, provenance, and orphan metadata to runtime terminal summaries. Renderer resource usage merging now tracks PTY origins, runtime attribution, SSH routing, labels, and detached-session diagnostics. Runtime terminal polling is integrated into status-bar refresh flows. SSH PTY lease upserts retire conflicting same-leaf leases, while remote workspace sync statuses normalize transient connection-drop errors based on SSH connection state. Tests and localization entries cover the new behavior.
đĨ Pre-merge checks | â 3 | â 2
â Failed checks (2 warnings)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Description check | â ī¸ Warning | The description covers summary and validation, but omits required template sections like Screenshots, AI Review Report, Security Audit, and Notes. | Add the missing template sections: Screenshots, a checklist-style Testing section, AI Review Report, Security Audit, and Notes, even if some entries are 'No visual change' or 'N/A'. |
| Docstring Coverage | â ī¸ Warning | Docstring coverage is 0.00% 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 accurately summarizes the main change: exposing detached SSH terminal origins in Resource Manager. |
| 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. |
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 @coderabbitai help to get the list of available commands.
Closing this submitted branch and routing the bug to canonical owner issue #17585. We will carry the work ourselves on current main and will not request contributor follow-up. Full contributor credit is preserved for @davefano. No action is requested from you. Thank you.