Grouping fails after restoring notifications
- Dominant language
- C
- Stars
- 3.3k
- Forks
- 173
- PR merge metrics
- No merged PRs in 30d
Description
If the config has changed, new grouping rules will not be applied to notifications restored from prior to the change. Additionally, restored grouped notifications will not "update" other members of their group.
Reproduce:
- run `mako` with the default (an empty) config
- spawn a couple of notifications (e.g. with `notify-send test`)
- close the notifications to the history (e.g. right-click)
- change the grouping config (e.g. add `group-by=app-name`)
- reload the config (`makoctl reload`)
- restore the notifications
- note: adding another notification will update them
- extra: deleting a notification from a group and then restoring it will not correctly put it back in it's group
Analysis:
`handle_restore_action` never calls `group_notifications` in any way. A similar snippet as:
https://github.com/emersion/mako/blob/c4df229e3af10bac8795afa489dcd1ee1fc7da66/dbus/mako.c#L323-L329
from `reapply_config` would fix.
Contributor guide
Research direction
Start in handle_restore_action and compare it with the group_notifications-related code in reapply_config, especially the referenced dbus/mako.c snippet. Verify the restore path re-applies current grouping and updates existing group members, including when a notification is deleted from a group and restored. Reproduce the configuration-change and restore steps to confirm the grouping behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100