Repository navigation
fix(pi): preserve gated reviews and route feedback to their opener - #2581
Merged
backnotprop merged 3 commits intoNov 4, 2026
Merged
Conversation
The lease is off only for the tool and the slash commands, which return at once. The event bus and openMarkdownAnnotation/openLastMessageAnnotation await the decision, so a gated review whose tab is gone still settles as dismissed after 30 s (backnotprop#1143) instead of hanging the caller until Pi exits. Feedback to an opener whose session_shutdown ran (or whose ctx throws) goes to the current session first, so a host whose replaced pi never throws still delivers to the replacement with the switched-session header. The browser test now sets the plan HTML through a test seam instead of writing a stub into the extension folder.
1 task
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
Gated annotation reviews opened by the Pi extension now stay open when their browser tab closes or loses its connection. These reviews return immediately, so they should not use the blocking CLI's client lease.
Review feedback now goes to the session that opened the review first, preventing an in-process Oh My Pi task subagent from receiving feedback intended for its parent. If the opener can no longer accept messages after session replacement, delivery still uses the existing current-session fallback.
Closes #2553
Closes #2554
Verification
apps/pi-extension/plannotator-browser.test.tsapps/pi-extension/current-pi-session.test.tsapps/pi-extension/plannotator-tool.test.tsapps/pi-extension/stale-ctx.test.tsbun test apps/pi-extension/server.test.ts -t 'client.lease|lease'git diff --checkpassed.