fix(server): probe a tab before reticle open reuses it - #665
Closed
kushals256 wants to merge 2 commits into
Closed
Conversation
Comment on lines
+204
to
+211
| { | ||
| host: LOOPBACK_HOST, | ||
| port, | ||
| path: SESSION_PROBE_PATH, | ||
| method: 'POST', | ||
| headers: { 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(body) }, | ||
| timeout: SESSION_PROBE_HTTP_TIMEOUT_MS, | ||
| }, |
A connected session can sit in /status while answering nothing, and ending it only drops the bookkeeping — the wedged page is the daemon's browser. Probe the candidate with a short snapshot; if it does not answer, open a fresh tab. An older daemon without the probe route is treated as live, which is the previous behaviour. Signed-off-by: Kushal S <skushal.mys@gmail.com>
CodeQL flagged the probe request because the HTTP path was a parameter flowing into http.request. The path is SESSION_PROBE_PATH and never anything else; pin it at the call, matching fetchStatus. Signed-off-by: Kushal S <skushal.mys@gmail.com>
kushals256
force-pushed
the
fix/open-wedged-tab
branch
from
September 1, 2026 08:09
0ddeba8 to
5a43082
Compare
Contributor
|
Superseded — #593 was fixed on Nothing left to merge. Apologies for the wasted cycle. |
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.
Summary
reticle openreused any connected tab on the origin, including ones that had stopped answering.reticle_session endonly dropped the session record — the wedged page stayed in the daemon's browser, so the nextopenhanded it back and every command timed out. Recovery required restarting the daemon.opennow probes the candidate with a shortsnapshot/statusbefore reuse. Silence → open a fresh tab and say so. An older daemon withoutPOST /session-probe404s and is treated as live, which is the previous behaviour.Closes #593.
Test plan
openlaunches a new one and reportsreplacingreticle_session endon a wedged tab is no longer the only (broken) recovery —openrecovers without a daemon restart/session-probestill reuses (fail open)@reticlehq/serverunit tests fordecideOpen/resolveOpen/POST /session-probe