Skip to content

fix: add notify-send fallback for Linux system notifications#200

Merged
DeadWaveWave merged 2 commits intoDeadWaveWave:mainfrom
Xinyuexyyyyy:fix/linux-system-notifications
Apr 30, 2026
Merged

fix: add notify-send fallback for Linux system notifications#200
DeadWaveWave merged 2 commits intoDeadWaveWave:mainfrom
Xinyuexyyyyy:fix/linux-system-notifications

Conversation

@Xinyuexyyyyy
Copy link
Copy Markdown
Contributor

💡 Change Scope

  • Small Change: Fast feedback, localized UI/logic, low-risk.

📝 What Does This PR Do?

Adds a notify-send fallback for Linux when Electron's Notification.isSupported() returns false. This can happen when no notification daemon (like notify-osd or dunst) is running or properly configured in a Linux desktop session.

The PR preserves the existing behavior on macOS/Windows and adds the Linux fallback with minimal changes:

  • Only imports execFile from child_process
  • Falls back to /usr/bin/notify-send when Notification.isSupported() is false on Linux
  • Returns { shown: false } on other unsupported platforms

Cross-platform behavior

  • macOS/Windows: Uses Electron's native Notification API (unchanged)
  • Linux with notification daemon: Uses Electron's native Notification API (unchanged)
  • Linux without notification daemon: Falls back to notify-send utility

This is a follow-up to #198 which added system notifications for agent completion but Electron's notification check can fail on some Linux configurations.


✅ Delivery & Compliance Checklist

  • My code passes the ultimate gatekeeper: pnpm pre-commit is completely green.
  • I have signed the CLA if required (see CLA.md).
  • I have included new tests to lock down the behavior (or explicitly stated why it's untestable).
  • I have strictly adhered to the DEVELOPMENT.md architectural boundaries.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 29, 2026

CLA assistant check
All committers have signed the CLA.

@Xinyuexyyyyy Xinyuexyyyyy force-pushed the fix/linux-system-notifications branch from 421231c to 4edb758 Compare April 29, 2026 14:33
When Electron's Notification.isSupported() returns false on Linux (e.g.,
missing notification daemon), fall back to using the system notify-send
utility to ensure agent completion notifications are delivered.

Fixes: DeadWaveWave#198
@Xinyuexyyyyy Xinyuexyyyyy force-pushed the fix/linux-system-notifications branch from 4edb758 to 5e785ca Compare April 30, 2026 01:05
@Xinyuexyyyyy
Copy link
Copy Markdown
Contributor Author

Updated this PR with two small changes:

  • tightened the Linux notify-send fallback to use the PATH-resolved notify-send binary and standard positional body argument, with a bounded timeout
  • added IPC contract coverage for the Linux fallback and non-Linux no-op path

I also pushed a small e2e test stabilization for command-center because both the previous macOS run and the first rerun failed on the same unrelated initial viewport assertion. The latest CI has Ubuntu and Windows green, and command-center now passes on macOS. The remaining macOS failure is a different workspace canvas e2e flake (workspace-canvas.spaces.overlay-drag.spec.ts), with two additional tests reported as flaky in the same run. I do not have permission to rerun failed upstream jobs from this fork, but the current red macOS status is not from the notification fallback change.

@DeadWaveWave DeadWaveWave merged commit 01f25fa into DeadWaveWave:main Apr 30, 2026
6 of 7 checks passed
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.

3 participants