Grouping fails after restoring notifications

Open Beginner friendly
#649 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
c
Domain
desktop

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.

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)
    Image
  • 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
    Image
  • note: adding another notification will update them
    Image
  • extra: deleting a notification from a group and then restoring it will not correctly put it back in it's group
    Image

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.

Dominant language
C
Stars
3.3k
Forks
174
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from emersion/mako

All issues in emersion/mako

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.