feat: add desktop notifications for run completion

Show native OS notifications when a session run completes, fails, or
needs approval while the app window is unfocused. Clicking a
notification focuses the window and selects the relevant session.

Includes a toggle in Settings > Appearance to enable/disable
notifications (enabled by default).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-03-29 17:40:59 +02:00
co-authored by Copilot
parent 395965c639
commit bb713f61be
9 changed files with 155 additions and 1 deletions
+11
View File
@@ -257,6 +257,11 @@ export class AryxAppService extends EventEmitter<AppServiceEvents> {
return this.workspace;
}
/** Returns the in-memory workspace without loading from disk. Used for synchronous checks. */
getCachedWorkspace(): WorkspaceState | undefined {
return this.workspace;
}
async dispose(): Promise<void> {
this.ptyManager.dispose();
await this.sidecar.dispose();
@@ -503,6 +508,12 @@ export class AryxAppService extends EventEmitter<AppServiceEvents> {
return this.persistAndBroadcast(workspace);
}
async setNotificationsEnabled(enabled: boolean): Promise<WorkspaceState> {
const workspace = await this.loadWorkspace();
workspace.settings.notificationsEnabled = enabled;
return this.persistAndBroadcast(workspace);
}
async describeTerminal(): Promise<TerminalSnapshot | undefined> {
return this.ptyManager.getSnapshot();
}