Pi extension: a gated review from the plannotator tool ends 30 s after its tab closes
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #2581 by @utpalsinghdev — merged
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Read plannotator-browser.ts and trace startMarkdownAnnotationSession to see how the Pi extension configures clientLeaseSupported; compare the CLI gate behavior described in the issue. Disable client-lease support for extension-opened reviews, then verify that closing the tab does not stop the review and that the reviewer can still submit or close it.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- TypeScript
- Stars
- 8.7k
- Forks
- 649
- Avg merge
- 8h 25m
- Merged PRs (30d)
- 761
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from backnotprop/plannotator
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
backnotprop/plannotator#2643 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
backnotprop/plannotator#2290 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
backnotprop/plannotator#2243 · 2 comments · 2 reactions ·
Maintainers usually reply within 1 day
-
Annotate documentation omits per-file version history and privacy controlsMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
backnotprop/plannotator#1086 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
backnotprop/plannotator#2666 ·
Maintainers usually reply within 1 day
All issues in backnotprop/plannotator
Similar issues
-
unwrapDatabaseError masks real DB errors with TypeError: Cannot convert object to primitive valueOpen
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NEARBuilders/everything-dev#798 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vercel-labs/durable-harness#53 ·
Maintainers usually reply within 1 day
-
[Bug]: Redesign tab bars ignore clicks on Linux: hidden chat layers keep window drag regionsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
experiência: a doc manda subir para o Micro do Supabase, mas não diz que exige plano pago nem quanto custaPossibly taken A pull request linked to this issue is open or already merged. Openarea/docs area/ui enhancement
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
melgarafael/DeskcommCRM#4098 ·
Maintainers usually reply within 1 day
-
dependencies platform: ios
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
software-mansion/react-native-executorch#1617 ·
Maintainers usually reply within 1 day