Repository navigation
Hide stale mobile agent rows after terminals close - #6222
brennanb2025 wants to merge 1 commit into
Conversation
📝 WalkthroughWalkthroughThe primary change refactors how 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 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 |
|
Superseding this with #11464. This PR had the right diagnosis for #6072 and pioneered the read-time filter strategy in |
|
Closing as superseded — the linked issue(s) for this PR were fixed by another change that has already been merged.
Superseding merge: #11464 Thank you for the contribution! If anything remains unaddressed, please open a new issue or PR against current |
Fixes #6072
Summary
Fixes mobile/worktree activity projection so stale persisted terminal tabs and hydrated hook snapshots no longer make a worktree look active after its matching live terminal is gone.
Design approach:
liveTerminalCount, attached PTY state, active status, previews, and agent rows ingetWorktreePs().Review And Implementation
Design review:
Implementation:
src/main/runtime/orca-runtime.tsto build per-call live evidence from current leaves and connected PTYs.pnpm run sync:localization-catalogso full lint can pass.Completeness verification:
COMPLETEagainst the design.Performance audit:
getWorktreePs(), used by mobile/worktree polling and CLI projection.PERF PASS.Code review loop:
Merge-confidence validation:
brennanb2025/issue-6072-mobile-stale-agent-rows/Users/thebr/orca/workspaces/orca/issue-6072-mobile-stale-agent-rows.tmp/evidence/issue-6072-electron-identity.pngand was not committed.Repro Evidence
Before the fix, the deterministic runtime test reproduced the issue:
runtime.listTerminals("id:repo-1::/tmp/worktree-a")returned[].runtime.getWorktreePs()incorrectly returnedliveTerminalCount: 1,hasAttachedPty: true,status: "active", and a staledoneagent row.After the fix, that same seeded persisted-tab plus hydrated-hook scenario reports inactive/zero-live/no-agent projection.
Validation
Ran locally:
pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/orca-runtime.test.ts -t "stale persisted tabs|connected PTYs without a mounted renderer leaf|hook-reported status|saved session tabs with live PTYs"git diff --checkpnpm exec oxlint src/main/runtime/orca-runtime.ts src/main/runtime/orca-runtime.test.tspnpm run typecheck:nodepnpm run typecheckpnpm run lintPost-PR stabilization:
verifyandtrack-community-pr.Residual Risks