fix(browser): rerun guest retention after veto release - #12430
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)
📝 WalkthroughWalkthroughBrowser download activity now reports active-state transitions through an optional callback. Browser automation visibility now supports listener subscriptions. Terminal subscribes to download, automation visibility, and mobile-driver changes. Each notification increments a retention revision and triggers browser guest eviction evaluation. Cleanup removes all subscriptions. Tests cover visibility listener cleanup and download transition notification behavior. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ 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 |
|
Pre-merge gate Electron evidence (fresh run on PR head |

Summary
Follow-up to #12232. The merged interrupted-download fix updated only module-local veto state, so the Terminal guest-budget effect did not rerun when a download, automation lease, or mobile driver released its veto. An over-budget live guest could therefore remain retained until an unrelated worktree, surface, or setting change.
This change:
The sanctioned eviction path is unchanged: selected worktrees still fully destroy their guests through destroyWorktreeBrowserGuests; no live guest is unmount-detached.
Testing
Electron validation
Attached via CDP to the intended review-audit-12232 dev instance, selected the real workspace through the sidebar, opened a Browser tab through the New tab menu, and navigated to Example Domain. The rendered browser surface loaded successfully; backing store state showed the page URL as https://example.com/ with loading=false. The interrupted/resumed download transition is state/lifecycle behavior without a dedicated visible indicator, so that exact transition is covered by the deterministic activity tests rather than claimed from the screenshot.
Scope
Desktop renderer only; no mobile code changed. This PR is intentionally not merged.