Menu ▾ ▴

#109 Notification pairing misses on truncated or group-chat text, producing duplicates

closed
nobody
bug (24)
2026-07-18
2026-07-17
Anonymous
No

Originally created by: kristofferR

The row snapshot truncates title/body to 80/240 chars (inject/src/messenger/features/notifications.ts), but the page-Notification signal carries Facebook's untruncated text, and notificationTextMatches (lib/notification-fallback.ts) requires exact normalized equality. Long previews and group chats (row shows Sender: text, notification body is bare text) defeat the pairing, so the user gets the native notification and the fallback ~1.5s later. The Rust deduper cannot absorb it — the two paths hash different strings. Same failure when Facebook constructs its Notification more than 1500ms after the row mutates.

Related smaller bug in the same path: when a new page Notification is consumed for a thread, the early return skips clearing an older still-pending fallback for that thread, which then fires with stale preview text. Consider thread-key or prefix/fuzzy matching instead of equality, and clearing the pending timer before the consume check.

Related

Tickets: #135
Tickets: #137

Discussion

  • Anonymous

    Anonymous - 2026-07-18

    Originally posted by: kristofferR

    Fixed in [#137] (merged to main). Notification pairing now uses truncation-aware text matching and only strips a group-sender prefix when it can't conflate two different senders, so two members sending the same short preview no longer collapse into one native notification. Covered by tests in notification-fallback.test.ts.

     

    Related

    Tickets: #137

  • Anonymous

    Anonymous - 2026-07-18

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.