You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pi extension: a gated review from the plannotator tool ends 30 s after its tab closes #2553
What happens. The plannotator tool with {"action":"annotate","gate":true} starts the annotate server with clientLeaseSupported: gate === true && !isRemoteSession() (plannotator-browser.ts, startMarkdownAnnotationSession). When no tab holds /api/annotate/client-lease for 30 s
(ANNOTATE_CLIENT_LEASE_GRACE_MS), the decision settles as { exit: true } and the server stops. The extension
handles that as "closed", and only shows Annotation session closed.. The agent gets no message, and its list no
longer shows the review.
Why it is a problem. The client lease is there so that the blocking CLI gate (plannotator annotate --gate --json) does not wait forever. The Pi tool does not block: it returns at once, and the decision comes later as a
message. A reviewer who closes the tab, or whose proxy or tunnel drops the stream for 30 s, loses the review, and
the agent does not know.
Steps.
Open a review with the tool and gate: true.
Connect to GET /api/annotate/client-lease, then disconnect.
After about 32 s, the port does not answer, and the agent got no message.
Without gate, the lease route answers 404 and the review stays open.
Why PLANNOTATOR_REMOTE=1 is no fix. It turns the lease off, but it also binds each server on 0.0.0.0
(getServerHostname), gives every review the fixed port 19432 (getServerPorts), so a second review preempts the
first (startServerWithSelfPreemption), turns off the session bridge ("Ask this session"), live app annotation, the
agent terminal, host control, and "Open in", and changes the tool's result text to "open … on your local machine
(forward the port if needed)".
Suggestion. Enable the client lease only for the blocking CLI gate, not for reviews that the Pi extension's tool
opens: clientLeaseSupported: false in startMarkdownAnnotationSession. With that one change, the review stays
open after its tab closes, until the reviewer decides or closes it, on Pi and on OMP.
Version: @plannotator/pi-extension 0.28.21, checked on Pi 1.4.0 and Oh My Pi 18.13.3.
Activity