Skip to content

Notify when pi agents finish#186

Open
aserper wants to merge 2 commits into
raine:mainfrom
aserper:feat/pi-agent-notifications
Open

Notify when pi agents finish#186
aserper wants to merge 2 commits into
raine:mainfrom
aserper:feat/pi-agent-notifications

Conversation

@aserper

@aserper aserper commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a hidden workmux notify command for desktop notifications
  • include the pi agent's final assistant text as the notification body
  • make notification clicks jump to the most recently done/waiting agent via the existing last-done logic
  • await the pi status update before spawning the notification so sidebar state can persist reliably
  • spawn the notification command detached from the pi extension so action-capable notifications survive until clicked/dismissed

Notes

notify-rust action notifications need Hint::Resident(true) plus Timeout::Never with mako; otherwise action-bearing notifications can disappear before they are visible/clickable.

The click action intentionally reuses last-done, so it focuses the most recently completed/waiting agent rather than carrying an exact originating pane ID in the notification payload.

This branch is currently based on main; after #184 lands, it should be rebased so the notification extension layers on top of the scoped --scope-id Pi status extension.

Tests

  • cargo build --quiet
  • cargo test --bin workmux --quiet

aserper added 2 commits June 23, 2026 00:31
Add an internal notification command that can keep a desktop notification
alive until the user clicks or dismisses it. On click, it reuses the
last-done navigation path to focus the most recently completed agent.

Update the pi status extension to include the final assistant text in the
notification body and spawn the notification command detached so the D-Bus
connection is not torn down with the pi extension command lifecycle.
Ensure the Pi status update finishes before spawning the detached desktop
notification. This keeps sidebar state persistence reliable while still
allowing the long-lived notification process to outlive Pi's hook handler.
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