Skip to content

Release the waiting agent on No change or tab close - #38

Open
TrickRiggin wants to merge 1 commit into
petergyang:mainfrom
TrickRiggin:no-change-closes-poll
Open

Release the waiting agent on No change or tab close#38
TrickRiggin wants to merge 1 commit into
petergyang:mainfrom
TrickRiggin:no-change-closes-poll

Conversation

@TrickRiggin

Copy link
Copy Markdown

Problem

Send is disabled when there is nothing to comment, so a review that already looks fine has no way to end except waiting out the poll timeout. Closing the tab also left the agent hanging — I kept finding leftover human-review poll processes after I was done.

There was already a faint End review control, but it was easy to miss, required a confirm even when nothing was unsent, and did not persist, so a retry poll after timeout would hang again.

Change

  • No change is the primary empty-state action (no confirm). If there is unsent feedback, it stays End review with the existing confirm.
  • Closing the last review tab is the same decision after a 4s grace, so a refresh can reconnect.
  • {"status":"closed","reason":"no_change"|"window_closed"} is persisted until the next human-review <file>, so a retry poll does not hang.
  • Skill/setup copy tells agents to stop on closed and not to leave poll running in the background.

Tests

  • Ending a review still releases the poller and keeps unsent comments
  • A later poll on the same target stays closed; a new session reopens it
  • Closing the last tab releases the poller with window_closed
  • Reconnecting inside the grace window does not end the poll

Send is disabled when there is nothing to comment, so a review that looks fine had no way to end except waiting out the poll timeout. Closing the tab also left the agent hanging.

Make No change the primary empty-state action, skip the confirm when there is nothing unsent, and treat the last tab closing as the same decision after a short grace so a refresh can reconnect. Persist the closed status so a retry poll does not hang, and teach agents to stop when they see it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant