Repository navigation
Conversation
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.
Session creation, renderer reloads, and application shutdown can race, leaving remote sessions running or reconnecting after the window closes. This change reuses in-flight initialization, releases sessions after failed startup even when transport close fails, and makes Electron wait for cleanup before quitting. Final shutdown also rejects initialization that was waiting for an earlier window cleanup.
API operations now have a 30-second total deadline, deferred readiness checks honor their configured deadline, and failed deferred startups request release. Session-creation POSTs are no longer retried after ambiguous network/server failures, avoiding duplicate sessions when a creation response is lost. Reconnects preserve the current page, and viewport updates reuse one CDP connection per page.
Stacked on #14 (
codex/desktop-safe-diagnostics); review this diff against that branch. No version bump or changeset is included.E2E Test Matrix
npm run buildnode --test tests/*.test.cjsSessionManager.initialize()calls, concurrently and again after initialization, usinghttps://example.comExample Domain.updateViewport(1024, 700)innerWidthandinnerHeightmeasured1024and700.COMPLETED.The desktop operating-system quit/reopen interaction is not covered by the SessionManager smoke; macOS activation needs platform testing. If the initial creation response is lost, its session ID is unknown, so this change prevents duplicate retries but cannot release that unknown session itself.
Combined validation: the mainline candidate containing #13–#18 and #20 passed builds, all 34 automated tests, and the high/critical advisory gate on Linux, macOS, and Windows. Cross-platform CI results.