Skip to content

regression: revert thread messages endpoint usage#40913

Merged
dionisio-bot[bot] merged 1 commit into
developfrom
regression/fix-missing-threads
Jun 12, 2026
Merged

regression: revert thread messages endpoint usage#40913
dionisio-bot[bot] merged 1 commit into
developfrom
regression/fix-missing-threads

Conversation

@MartinSchoeler

@MartinSchoeler MartinSchoeler commented Jun 11, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Fixes issue that caused threads with more than 50 items to stop rendering the next messages

introduced here #40659

Issue(s)

CORE-2291

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Performance & Reliability
    • Optimized thread message fetching and filtering to improve performance and reliability of thread message loading.

@MartinSchoeler MartinSchoeler requested a review from a team as a code owner June 11, 2026 19:30
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The useThreadMessagesQuery hook is refactored to fetch thread messages using a getThreadMessages client method via useMethod instead of calling REST endpoints. The query function now directly invokes this method and filters results in-place, eliminating prior steps of API-to-UI message mapping and the readThreads side-effect.

Changes

Thread Messages Fetch Migration

Layer / File(s) Summary
Method Binding and Query Logic Migration
apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.ts
Import statements are updated to use useMethod instead of useEndpoint, removing the REST-specific mapMessageFromApi import. The method binding replaces REST endpoint with useMethod('getThreadMessages'). The query function calls getThreadMessages({ tmid }) directly and filters results using isThreadMessage checks and thread/id/hidden message exclusions, eliminating prior mapping and readThreads invocation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested labels

type: bug

Suggested reviewers

  • tassoevan
  • cardoso
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'regression: revert thread messages endpoint usage' directly matches the main change: reverting from REST endpoint to a client method to fix the thread rendering regression.
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.

@changeset-bot

changeset-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8145a08

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

@dionisio-bot

dionisio-bot Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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

@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.

No issues found across 1 file

Re-trigger cubic

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.05%. Comparing base (57c4cb7) to head (8145a08).
⚠️ Report is 8 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #40913   +/-   ##
========================================
  Coverage    70.05%   70.05%           
========================================
  Files         3355     3355           
  Lines       129162   129159    -3     
  Branches     22333    22357   +24     
========================================
- Hits         90487    90485    -2     
+ Misses       35387    35377   -10     
- Partials      3288     3297    +9     
Flag Coverage Δ
e2e 59.25% <100.00%> (-0.11%) ⬇️
e2e-api 47.04% <ø> (+0.78%) ⬆️
unit 69.94% <ø> (+0.01%) ⬆️

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.

@tassoevan tassoevan added the stat: QA assured Means it has been tested and approved by a company insider label Jun 12, 2026
@tassoevan tassoevan added this to the 8.6.0 milestone Jun 12, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jun 12, 2026
@dionisio-bot dionisio-bot Bot added this pull request to the merge queue Jun 12, 2026
Merged via the queue into develop with commit a080c80 Jun 12, 2026
48 checks passed
@dionisio-bot dionisio-bot Bot deleted the regression/fix-missing-threads branch June 12, 2026 19:50
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