Skip to content

regression: thread jump-to-reply pagination skips a page when Max Record Amount is set - #41958

Merged
dionisio-bot[bot] merged 2 commits into
release-8.8.0from
regression/thread-reply-gap
Aug 28, 2026
Merged

regression: thread jump-to-reply pagination skips a page when Max Record Amount is set#41958
dionisio-bot[bot] merged 2 commits into
release-8.8.0from
regression/thread-reply-gap

Conversation

@juliajforesti

@juliajforesti juliajforesti commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

CORE-2514

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved thread message pagination when loading older replies.
    • Prevented gaps and duplicate offsets when the server returns fewer messages than requested.
    • Pagination now stops correctly when no additional messages are available.
    • Ensured users can continue loading messages through to the newest reply after jumping to older content.

@dionisio-bot

dionisio-bot Bot commented Aug 26, 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 Aug 26, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8349d46

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 Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: b0e1a300-f388-43d3-a7f6-3797f76ca34d

📥 Commits

Reviewing files that changed from the base of the PR and between d036fc2 and 8349d46.

📒 Files selected for processing (2)
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.spec.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Recent review details
⏰ Context from checks skipped due to timeout. (2)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
🧰 Additional context used
📓 Path-based instructions (3)
The main Rocket.Chat Meteor application resides in `apps/meteor/`; place its application code there rather than in other monorepo areas.

📄 CodeRabbit inference engine (CLAUDE.md)

Files:

  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.spec.ts
Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

Files:

  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.spec.ts
Use descriptive test names that clearly communicate expected behavior in Playwright tests

📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)

Files:

  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.spec.ts
🧠 Learnings (2)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.spec.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.ts
  • apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.spec.ts
🔇 Additional comments (4)
apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.ts (2)

131-132: LGTM!


182-190: LGTM!

apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.spec.ts (2)

40-54: LGTM!


135-183: LGTM!


Walkthrough

Thread message pagination now uses actual returned page sizes for offset calculations. Empty pages stop further pagination. Tests cover server-side response limits and gap-free loading through the newest reply.

Changes

Thread pagination

Layer / File(s) Summary
Pagination offsets and validation
apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.ts, apps/meteor/client/views/room/contextualBar/Threads/hooks/useThreadMessagesQuery.spec.ts
Around-message and subsequent-page offsets now use the number of returned messages. Pagination stops for empty or non-positive pages. Tests verify clamped responses do not create gaps and reach the newest reply.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 8349d

This is a localized thread-pagination fix with accompanying test updates; no actionable merge-blocking risk remains after normal checks and review.

Suggested labels: type: bug

Suggested reviewers: martinschoeler, abhinavkrin, ggazzo

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main regression addressed: thread jump-to-reply pagination skips a page when Max Record Amount is configured.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
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.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2 files.

Warning

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2514: Request failed with status code 401

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.

@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (release-8.8.0@d036fc2). Learn more about missing BASE report.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             release-8.8.0   #41958   +/-   ##
================================================
  Coverage                 ?   69.40%           
================================================
  Files                    ?     4254           
  Lines                    ?   168887           
  Branches                 ?    30080           
================================================
  Hits                     ?   117224           
  Misses                   ?    46507           
  Partials                 ?     5156           
Flag Coverage Δ
e2e 58.79% <12.50%> (?)
e2e-api 46.12% <ø> (?)
unit 71.33% <90.90%> (?)

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.

@juliajforesti juliajforesti added this to the 8.8.0 milestone Aug 26, 2026
@juliajforesti
juliajforesti marked this pull request as ready for review August 26, 2026 21:30
@juliajforesti
juliajforesti requested a review from a team as a code owner August 26, 2026 21:30

@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 2 files

Re-trigger cubic

@FragaKrummenauer FragaKrummenauer added the stat: QA assured Means it has been tested and approved by a company insider label Aug 28, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 28, 2026
@dionisio-bot
dionisio-bot Bot merged commit d0ed77e into release-8.8.0 Aug 28, 2026
56 checks passed
@dionisio-bot
dionisio-bot Bot deleted the regression/thread-reply-gap branch August 28, 2026 01: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.

4 participants