fix(review): add Close button to exit Pi review session#523
fix(review): add Close button to exit Pi review session#523backnotprop merged 3 commits intobacknotprop:mainfrom
Conversation
|
Awesome! |
|
Hm, probably also we should delete temp local worktree? |
|
@gwynnnplaine yes, if it short circuits that part. I was thinking I might edit your PR just to make it more agent-agnostic because I think this will be nice for other users. If you don't mind a commit, I'll go ahead and put that in and then merge this for you. |
Sure! I was thinking about making that agnostic, but had no idea how it works on other agents (sorry, I'm Pi addicted). Feel free to commit new changes, or you are busy, I can extend that by myself! |
…te mode Extends the Pi-specific exit/close feature to work across all agent origins (Claude Code, OpenCode, Copilot CLI, Codex, Gemini CLI) and adds the same capability to annotation sessions. - Rename PiReviewActions → AgentReviewActions, remove origin === 'pi' gate - Add /api/exit endpoint to both Bun and Pi annotate servers - Add Close button to platform mode (GitHub/GitLab PR review) - Close always visible; Send Feedback/Annotations appears alongside when annotations exist - Warning dialog when closing with unsent annotations - Handle exit in all calling layers (hook CLI, OpenCode, Pi extension) - Fix stale closures: isExiting and showExitWarning in keyboard handler deps - Fix openLastMessageAnnotation return type to include exit flag - Make ExitButton title a prop with generic default For provenance purposes, this commit was AI assisted.
|
Hey, I've pushed updates to your branch that generalize the Close button across all agents and extend it to annotate mode. Here's where Close lives now:
Key changes on top of your work:
All exit handlers covered: hook CLI (4 paths), OpenCode (3 paths), Pi extension (3 paths). Plan mode intentionally untouched since Approve/Deny are the right signals there. |
Global attachments (pasted/uploaded images without text annotations) were not counted in the annotate mode exit logic. This meant Close would fire without warning and Send Annotations would not appear when only image attachments existed. For provenance purposes, this commit was AI assisted.
Fixes #522
Had the same issue and couldn't figure out how to close the session without killing the agent, so I tried to fix it.
Added a Close button to the Pi review toolbar. When you have annotations it flips to Send Feedback, so the action always makes sense. On the server side there's a new
/api/exitendpoint that resolves the session cleanly.Hope it helps, let me know if anything looks off!