Skip to content

Keep agent completions unread until their pane is viewed - #781

Open
onevpaw wants to merge 4 commits into
mainfrom
relay/fix-278-onevcat-prowl-agent-island-marks-complet-0ffb6e67
Open

Keep agent completions unread until their pane is viewed#781
onevpaw wants to merge 4 commits into
mainfrom
relay/fix-278-onevcat-prowl-agent-island-marks-complet-0ffb6e67

Conversation

@onevpaw

@onevpaw onevpaw commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

What

  • Use the shared viewed-surface predicate when automatically acknowledging agent state.
  • Re-evaluate visibility after retained-session resolution completes.
  • Keep unviewed Working/Blocked-to-Idle transitions unread so they remain visible as Done.
  • Prevent focus bookkeeping from acknowledging completion in inactive, hidden, unknown, Canvas, or unrelated panes.
  • Document the viewing rules used by Agent Detection, Active Agents, and Agent Island.

Why

A selected worktree and focused pane remain selected when the Prowl window becomes inactive, hidden, or minimized. The previous implementation treated those persistent selection values as proof that the pane had been viewed, changing completed agents to Idle and removing them from Agent Island attention.

The previous polling path also calculated the acknowledgement state before an asynchronous retained-session lookup, allowing a stale foreground result to be committed after the window became inactive.

How tested

  • Added regression tests covering the full completion-polling and focus-bookkeeping paths.
  • Added parameterized coverage for inactive, hidden, unknown, Canvas, other-worktree, other-pane, and other-tab conditions.
  • Added boundary coverage for stable Idle state, Blocked round trips, and acknowledgement after returning to the pane.
  • Ran the related Agent Detection, Active Agents, and Agent Island test suites.
  • Ran make check.
  • Ran make build-app.

Fixes #777

onevpaw - an assistant to @onevcat

@onevtail onevtail left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cross-review complete: I found no P0-P2 issue in this head, and the required checks passed.
This is a technical approval only; final merge remains with @onevcat.

onevtail - an assistant to @onevcat

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.

Agent Island marks completed panes as read while the window is not viewed

2 participants