Add Pi completion notifications and sidebar attention markers
Implement GUI-only completion alerts while Canopy is open, especially when one session finishes while another is selected. Reuse Pi agent_settled and OSC 777 terminal notification signals already decoded by Kwi/RemoteSession. Add a persistent in-memory sidebar attention marker cleared when the pane is visited in an active window, a KDE desktop notification with configurable sound and a show-pane action. Suppress intrusive alerts for the actively viewed pane, rate-limit notifications and distinguish cancellation/errors in the Pi adapter. No notification delivery is required after window close. Desktop popups use the desktop's normal timeout independently of sidebar acknowledgement: source inspection and a regression exposed KNotification's pre-Notify-reply close race, so the implementation does not attempt early dismissal. Removed-pane actions are guarded and harmless. Ship an opt-in Pi extension usable for both directly launched Pi and Pi inside shells; document loading/install options and avoid changing user configuration automatically. Keep prompts/tool arguments/responses out of payloads and persistence. Terminal notifications are untrusted plain text, not authenticated agent state. No daemon wire change, dependency patch, active window/service restart, command replay, commit or push. Acceptance: an unattended terminal notification lights the correct sidebar session without switching focus; markers survive tab/space changes and clear only on viewing; foreground events do not ping; clicking desktop notification selects the correct pane safely; cancellation does not produce completion success and errors are not labelled success. Verify backend attention policy, actual service output transport, extension hooks, desktop notification payload/action and rendered UI using private fixtures/virtual desktop. Document compatibility and validation limits. Implementation milestone: added the dependency-free integrations/pi local Pi package, Workspace transient per-pane attention/coalescing and active-window acknowledgement, native highlighted sidebar/dot, and GUI-only KNotification delivery with embedded Popup|Sound defaults and guarded Show session activation. User setup remains explicit pi install; the desktop installer also copies the notification event definition for settings discovery. Service/wire protocol and upstream patch are unchanged. Native regression exposed an existing deferred-focus loop: a hidden formerly selected PaneView could execute stale focusContent calls and reactivate itself, immediately acknowledging unread attention. Instrumented transitions reproduced repeated selected-pane switching. Guard focusContent with current selected/visible state and ignore active-focus changes from hidden panes; the previously failing native test then passed. Validation milestone: all seven CTest suites pass (including five Node lifecycle cases, fake private-bus desktop payload/actions and live service notification/no-replay checks). Private virtual-KWin suite passes 13 QtTest rows including setup/cleanup; completion captures at 1360 and 840 pixels visually inspected, showing a readable native highlighted Agent row, notification dot and unchanged active Shell tab. Current renderer is Mesa Intel UHD OpenGL. No audible sound or external model request has been tested. Source-only parallel review found no verified issues but is PARTIAL: ignored Kwi and installed Pi dependencies were unavailable to reviewers; their lifecycle/parser contracts were inspected separately in this session. Final ./scripts/build.sh and all seven CTest suites pass; final private native suite passes 13 QtTest rows with no failures/skips. Actual offline Pi 1.4.0 loads the local integration package and lists canopy-notify.js with no extension load error; the strengthened native regression asserts that loaded resource. This is loader/startup evidence, not an end-to-end model settlement test. Private per-user desktop installation validates the launcher and installs byte-identical notification definitions; private Pi installation records a normalized local package path resolving to integrations/pi. Real user configuration was not modified. Node lifecycle tests pass all five cases. C++/QML formatting, JS syntax, Python compilation and git diff whitespace checks pass. Sound defaults are configured/tested but audible playback is unverified; compositor action activation is policy-dependent and desktop actions are exercised through a fake notification server, not a real desktop notification shell. Work is uncommitted on feature/pi-completion-notifications; the active Canopy window/service was not restarted, terminated or migrated. Enable later with pi install /home/mathias/Projects/canopy/integrations/pi, /reload in existing Pi sessions, and a normal UI relaunch when convenient.
Checklist
3 of 3 complete- Verify Pi settlement adapter emits privacy-safe completion/error events and ignores cancellation/outside-Canopy use.
- Verify pane attention, desktop notification payload/action/sound configuration and service transport without protocol changes.
- Run backend and private virtual-desktop regressions, inspect sidebar captures and document setup/limitations.
- Area
- Personal tooling
- Project
- Canopy
- Kind
- Feature
- Task ID
tsk_p7bfbbkmjd- Updated