Skip to content

Add update notification opt-out action#38

Merged
Staphylococcus merged 2 commits into
mainfrom
update-notification-opt-out
May 9, 2026
Merged

Add update notification opt-out action#38
Staphylococcus merged 2 commits into
mainfrom
update-notification-opt-out

Conversation

@Staphylococcus
Copy link
Copy Markdown
Owner

Summary

  • add a Never Notify Again action to actionable update notifications
  • route the action through the running session service and persist updates.auto_check=disabled through the settings API
  • preserve sender validation while allowing GNOME Shell's real notification action sender, and cover daemon-owner, GNOME Shell, spoofed sender, and close/action race paths in tests
  • update user and architecture docs for the new opt-out action

Part of #27.

Validation

  • cargo fmt --check -p lg-buddy
  • cargo clippy -p lg-buddy --all-targets --all-features -- -D warnings
  • cargo test -p lg-buddy --all-targets

Notes

Manual cross-desktop testing still matters because notification action senders vary by desktop environment. A beta/RC testing callout should explain how to build with LG_BUDDY_RELEASE_VERSION, how to trigger update notifications, how to clear or edit the update-check cache when repeated notifications are needed, and how to collect LG Buddy Session journal diagnostics if action handling is rejected.

@Staphylococcus Staphylococcus marked this pull request as ready for review May 9, 2026 10:27
Copilot AI review requested due to automatic review settings May 9, 2026 10:27
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a “Never Notify Again” action to update-available desktop notifications, routing the action through the running session notification service to persist updates.auto_check=disabled via the settings API (and disable the installed update-check timer). Also expands notification-action sender validation to accommodate GNOME Shell and adds tests for sender/trust and close/action ordering, plus corresponding documentation updates.

Changes:

  • Add a Never Notify Again notification action that disables automatic update checks via the settings layer.
  • Refactor the session-bus notification handoff to use the internal SessionBusClient abstraction and introduce request body (de)serialization helpers.
  • Update notification signal sender validation and add tests covering daemon owner, GNOME Shell sender, spoofed sender, and close/action race handling.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
README.md Documents the new opt-out action on update notifications.
docs/user-guide.md Explains the new action behavior and how it maps to updates.auto_check=disabled.
docs/architecture-overview.md Updates architecture notes for opt-out action routing/persistence.
crates/lg-buddy/src/session_notifications.rs Implements the opt-out action, settings persistence hook, updated sender trust logic, and expanded tests.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +913 to +918
let mut owners = vec![current_bus_name_owner(connection, NOTIFICATION_SERVICE)?];
if let Ok(owner) = current_bus_name_owner(connection, GNOME_SHELL_BUS_NAME) {
if !owners.contains(&owner) {
owners.push(owner);
}
}
@Staphylococcus Staphylococcus merged commit 58aca75 into main May 9, 2026
4 checks passed
@Staphylococcus Staphylococcus deleted the update-notification-opt-out branch May 9, 2026 10:42
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.

2 participants