Skip to content

fix(notifications): stop grouping chat notifications - #1536

Merged
bmc08gt merged 2 commits into
code/cashfrom
fix/orphaned-chat-notification-summary
Sep 23, 2026
Merged

bmc08gt merged 2 commits into
code/cashfrom
fix/orphaned-chat-notification-summary

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Sep 23, 2026 •

Copy link
Copy Markdown
Collaborator

Group chat pushes sometimes showed an empty Flipcash notification that turned into the chat notification a few seconds later. This happened even with the app sitting on the chat list, so nothing was being dismissed.

Each chat posts one notification under chatId.hashCode() and folds new messages into it. When the payload has a group key, it also posts a summary under groupKey.hashCode() with no title or text. That group only ever holds one child. On a Seeker running Android 16, device_config has notification_force_grouping and notification_force_group_singletons on, and the notification dump lists the Flipcash summaries as cancelled by GroupHelper while every chat notification sits in the system's Aggregate_AlertingSection group. The event log shows the same cycle on each push: the app posts the chat notification and its summary, the chat notification is pulled out of the system group, and about three seconds later it is put back. The summary is visible on its own in that window.

Chat notifications are now posted with no group and no summary. planNotificationGroup makes that decision and NotificationGroupPlannerTest covers it. Non-chat pushes such as CONTACT_JOIN keep the payload's group key, because they post a new notification each time and several can share one group. The Reply and Mark as read actions no longer pass the group key, since nothing reads it.

The first commit on this branch cancelled a group's summary when its last chat notification was dismissed. The second commit removes that, because no chat summaries are posted any more.

A chat push with a group key posts the chat's notification and a group
summary under groupKey.hashCode(). The summary has no title or text; the
system only folds it away while it has a child. dismissNotifications
cancelled chatId.hashCode() and nothing else, so opening the chat in the
app or tapping Mark as read left the summary on screen as an empty
notification. The next push in that group gave it a child again, which is
when it turned into the group chat notification.

dismissNotifications now reads the active notifications and also cancels
the group's summary when the dismissed chat was its last child.
planNotificationDismissal holds that rule and finds the summary by
FLAG_GROUP_SUMMARY rather than recomputing its id, so it does not depend
on how NotificationService numbers summaries.
@bmc08gt bmc08gt self-assigned this Sep 23, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Sep 23, 2026
Each chat posted its notification under its own group key, plus a group
summary with no title or text. That group only ever held one child, and
Android 16 force-groups that shape: it cancels the summary and moves the
child into a system group. Every new message moved the child back out
for about three seconds, and during that window the empty summary
showed on its own before turning into the chat notification.

Chat notifications are now posted with no group and no summary.
planNotificationGroup makes the call; non-chat pushes such as
CONTACT_JOIN keep the payload's key, since they post a new notification
each time. The Reply and Mark as read actions no longer carry the group
key.

This drops the summary cancel from dismissNotifications that the
previous commit added: with no chat summaries posted, there is nothing
for it to cancel.
@bmc08gt bmc08gt changed the title fix(chat): cancel a group's summary with its last chat notification fix(notifications): stop grouping chat notifications Sep 23, 2026
@github-actions github-actions Bot added the area: notifications Push notifications, in-app messaging label Sep 23, 2026
@bmc08gt
bmc08gt merged commit 535d60b into code/cash Sep 23, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/orphaned-chat-notification-summary branch September 23, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: notifications Push notifications, in-app messaging type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant