Skip to content

regression: Ephemeral messages not showing on threads#40776

Merged
dionisio-bot[bot] merged 6 commits into
release-8.5.0from
fix/thread-non-member-mention-warning
Jun 4, 2026
Merged

regression: Ephemeral messages not showing on threads#40776
dionisio-bot[bot] merged 6 commits into
release-8.5.0from
fix/thread-non-member-mention-warning

Conversation

@jessicaschelly

@jessicaschelly jessicaschelly commented Jun 2, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Fixes non-member mention warnings not appearing inside thread replies.

Fixes ephemeral messages (e.g. non-member mention warnings) not appearing inside thread replies.
The root cause was that the notify-user stream — which delivers user-scoped ephemeral messages — was not feeding into the thread message cache. The fix adds a check in incomingMessages.ts: when an incoming ephemeral message has a tmid, it is forwarded to upsertThreadMessageInCache so it gets inserted into the correct thread, in addition to being stored in the regular message store.

This PR also adds/updates e2e coverage for message mention warnings:

  • Adds a thread scenario that mentions a non-member and verifies the warning actions are visible inside the thread.
  • Reuses page-object helpers for warning action buttons in regular messages and thread messages.
  • Keeps the existing permission-specific warning action assertions for room messages.

Issue(s)

CORE-2278
Root cause: #39859

Steps to test or reproduce

  1. Create or open a channel where the target user is not a member.
  2. Send a message and open its thread.
  3. Send a thread reply mentioning the non-member user.
  4. Verify the non-member mention warning appears inside the thread with the expected actions:
    • Do nothing
    • Add them
    • Let them know

Automated coverage: apps/meteor/tests/e2e/message-mentions.spec.ts includes the should show non-member mention warning inside threads scenario.

Further comments

Summary by CodeRabbit

  • Bug Fixes

    • Improved thread message caching for ephemeral incoming messages.
  • Tests

    • Added test coverage for message mention warnings triggered within thread conversations.
    • Refactored mention warning tests with improved helper utilities.

@dionisio-bot

dionisio-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 3b33a8b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Thread messages are now upserted into the client cache when incoming ephemeral messages contain a thread ID. E2E tests are refactored to use new page-object helper methods that simplify action-button locator assertions, with a new test validating mention warnings inside threads.

Changes

Thread Message Caching and E2E Validation

Layer / File(s) Summary
Thread message cache integration
apps/meteor/client/startup/incomingMessages.ts
Import of upsertThreadMessageInCache and conditional call when msg.tmid is present to store thread message data in the client cache.
Test helper methods for message action buttons
apps/meteor/tests/e2e/page-objects/fragments/home-content.ts
getLastMessageActionButton(name) and getLastThreadMessageActionButton(name) locator getters enable consistent action-button target queries in tests.
E2E test refactoring and thread mention validation
apps/meteor/tests/e2e/message-mentions.spec.ts
Message-mention warning test cases refactored to use new helpers across non-member @all/@here action flows (Do nothing, Add them, Let them know); new test validates mention warnings and action buttons inside threads.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type: bug

Suggested reviewers

  • MartinSchoeler
  • tassoevan
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title directly addresses the main issue fixed in the PR: ephemeral messages (non-member mention warnings) not appearing in threads, which is the primary change across all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (release-8.5.0@8d6fad5). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             release-8.5.0   #40776   +/-   ##
================================================
  Coverage                 ?   69.93%           
================================================
  Files                    ?     3327           
  Lines                    ?   126586           
  Branches                 ?    21970           
================================================
  Hits                     ?    88526           
  Misses                   ?    34779           
  Partials                 ?     3281           
Flag Coverage Δ
unit 70.05% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gabriellsh gabriellsh force-pushed the fix/thread-non-member-mention-warning branch from 0cfa18b to 08e2ae6 Compare June 3, 2026 18:00
@gabriellsh gabriellsh changed the base branch from develop to release-8.5.0 June 3, 2026 18:01
@gabriellsh gabriellsh changed the title fix: show non-member mention warning in threads regression: Ephemeral messages not showing on threads Jun 3, 2026
@gabriellsh gabriellsh force-pushed the fix/thread-non-member-mention-warning branch from 8c8c297 to 7b71275 Compare June 3, 2026 18:11
@gabriellsh gabriellsh marked this pull request as ready for review June 3, 2026 18:11
@gabriellsh gabriellsh requested a review from a team as a code owner June 3, 2026 18:11
@gabriellsh gabriellsh added this to the 8.5.0 milestone Jun 3, 2026

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1 issue found across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread apps/meteor/client/startup/incomingMessages.ts
@gabriellsh gabriellsh added the stat: QA assured Means it has been tested and approved by a company insider label Jun 4, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 4, 2026
@dionisio-bot dionisio-bot Bot merged commit 7b95620 into release-8.5.0 Jun 4, 2026
76 of 85 checks passed
@dionisio-bot dionisio-bot Bot deleted the fix/thread-non-member-mention-warning branch June 4, 2026 02:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants