Repository navigation
Recognize and safely close automation Chrome sessions - #17
Open
SonghaiFan wants to merge 1 commit into
Open
SonghaiFan wants to merge 1 commit into
SonghaiFan wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
Playwright can leave dedicated Chrome sessions running without a TCP listener, so LeftOpen's port list cannot show or close them. Add an Automation browsers section to the menu app, with individual review and close actions using the existing ClosePlan, confirmation page and expiring ForceCloseOffer.
Recognition requires the Chrome main executable, the current user's dedicated Playwright temporary profile, and exact kernel argv flags for no startup window and a debugging pipe. Normal profiles and browser helpers are excluded. Before signaling, recheck the PID, UID, microsecond start identity, executable and profile; confirm actual process exit independently of sockets. Force close remains an explicit action after an unsuccessful gentle close.
Task activity remains unknown: these entries are not automatically labeled abandoned or closed based on age. Project batch close does not include browsers. Includes English/Chinese UI, documentation and focused regression tests.
Validation
LEFTOPEN_TEST_CHROME=1 swift test, including a real isolated Chrome session and a control profile. The recognized session exits while the control remains running.git diff --check.Boundaries
Browser cleanup is exposed in the menu app; the CLI retains its port-oriented commands. LeftOpen does not delete temporary profiles or Dock recent-app shortcuts. The test launchers own their temporary-directory cleanup. Manual testing reproduced a Chrome recent-app Dock entry remaining after confirmed process exit; that is a separate follow-up, not a failed process close.