Agent pane: the other-install line counts every waiting request, tool permissions too

Merged
TE
4d ago
+73-8

Follow-up to #31476, fixing the blocking review finding at 52e418d7 (https://github.com/manaflow-ai/cmux/pull/31476#issuecomment-6565948544).

Leo, on the "Approve its requests in that app" line floating over his message: "yuck more garbage". #31476 made the line show only while a request waits. But it read decisions.questions(session:), which holds only AskUserQuestion prompts, so a pending tool permission (Bash, Edit) on another install's daemon showed no line at all. That was a regression.

Fix

  • AcpmuxDecisionContexts.hasPending(session:): any pending prompt of the session (question or tool permission) or any pending member of one of its permission groups.
  • pendingVersion(): bumps on any pending change. That covers a prompt added, decided or trimmed, a group's pending members changing, and a reset. The socket now notifies on it as well as on the question version, so the line comes and goes with every request.
  • The line reads hasPending.

Test

AgentPaneOtherInstallNoticeTests gains two tests:

  • A pending tool permission counts as waiting (it is not a question), and its decision clears it.
  • A pending group member counts as waiting, and the group's decided revision clears it.

Observed / Not run

  • prepush-gate.py: no new violations.
  • A fleet run of CmuxNextAgentPaneTests (focused) was dispatched in the background; its result will be posted as a comment.

Changelog

Fixed: the "Approve its requests in that app" line shows again while a tool permission waits on another cmux install's agent service.

Agent session: agent session

šŸ¤– Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Fixes the "Approve its requests in that app" line so it shows again while a tool permission (Bash, Edit) is waiting on another install's daemon, not just while a question prompt is pending.

The line now counts any pending request — a question, a tool permission, or a pending group member — and the socket notifies on any pending change, so the line appears and disappears with every request. Adds tests covering tool permissions and group members as waiting requests.