Skip to content

fix: narrow outdated notification check to duplicate-risk events [WPB-21916]#21403

Open
thisisamir98 wants to merge 6 commits into
devfrom
fix-missing-messages-outdated
Open

fix: narrow outdated notification check to duplicate-risk events [WPB-21916]#21403
thisisamir98 wants to merge 6 commits into
devfrom
fix-missing-messages-outdated

Conversation

@thisisamir98
Copy link
Copy Markdown
Collaborator

@thisisamir98 thisisamir98 commented May 28, 2026

BugWPB-21916 [Web/Desktop] : Missing messages in Web - Prod

The global lastEventDate outdated filter was applied to every notification stream event. When two unrelated conversations share the same millisecond timestamp, a later OTR message can be silently dropped after an earlier one advances lastEventDate.

Scope the check to event types that can be handled locally and replayed on the stream (member-join, member-leave, create, rename, protocol-update, message-timer-update, receipt-mode-update, add-permission-update). OTR and MLS content events are no longer filtered this way.

Introduce isOutdatedNotificationStreamEvent in core and reuse it from NotificationService and EventValidator.

The global lastEventDate outdated filter was applied to every notification
stream event. When two unrelated conversations share the same millisecond
timestamp, a later OTR message can be silently dropped after an earlier one
advances lastEventDate.

Scope the check to event types that can be handled locally and replayed on
the stream (member-join, member-leave, create, rename, protocol-update,
message-timer-update, receipt-mode-update, add-permission-update). OTR and
MLS content events are no longer filtered this way.

Introduce isOutdatedNotificationStreamEvent in core and reuse it from
NotificationService and EventValidator.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 28, 2026

🔗 Download Full Report Artifact

🧪 Playwright Test Summary

  • Passed: 12
  • Failed: 0
  • Skipped: 0
  • 🔁 Flaky: 3
  • 📊 Total: 15
  • Total Runtime: 221.5s (~ 3 min 41 sec)
specs/CriticalFlow/channelsCall-TC-8755.spec.ts (❌ 0 failed, ⚠️ 1 flaky)
  • ⚠️ Calls in channels with device switch and screenshare (tags: TC-8755, crit-flow-web)
specs/CriticalFlow/groupCalls-TC-8632.spec.ts (❌ 0 failed, ⚠️ 1 flaky)
  • ⚠️ Planning group call with sending various messages during call (tags: TC-8632, crit-flow-web)
specs/CriticalFlow/groupVideoCall-TC-8637.spec.ts (❌ 0 failed, ⚠️ 1 flaky)
  • ⚠️ Group Video call (tags: TC-8637, crit-flow-web)

zskhan
zskhan previously approved these changes May 29, 2026
Comment thread libraries/core/src/notification/outdatedNotificationStreamEventTypes.ts Outdated
Comment thread libraries/core/src/notification/outdatedNotificationStreamEventTypes.ts Outdated
e-maad
e-maad previously approved these changes May 29, 2026
Copy link
Copy Markdown
Contributor

@e-maad e-maad left a comment

Choose a reason for hiding this comment

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

Add one suggestion

Comment thread apps/webapp/src/script/repositories/event/EventValidator.ts Outdated
Comment thread apps/webapp/src/script/repositories/event/EventValidator.ts Outdated
@thisisamir98 thisisamir98 dismissed stale reviews from e-maad and zskhan via 24c3189 May 29, 2026 13:07
@sonarqubecloud
Copy link
Copy Markdown

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.

4 participants