Skip to content

fix!: livechat autocomplete endpoints accept unsafe selector parameter - #41898

Merged
dionisio-bot[bot] merged 2 commits into
release-9.0.0from
fix/remove-livechat-autocomplete-conditions-param
Aug 25, 2026
Merged

fix!: livechat autocomplete endpoints accept unsafe selector parameter#41898
dionisio-bot[bot] merged 2 commits into
release-9.0.0from
fix/remove-livechat-autocomplete-conditions-param

Conversation

@jonasflorencio

@jonasflorencio jonasflorencio commented Aug 21, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

This PR remove the conditions parameter from the selector input in the livechat autocomplete endpoints (livechat/department.autocomplete and livechat/visitors.autocomplete), following the deprecation introduced in #41766. The parameter is now fully removed as part of the 9.0.0 major release.

Issue(s)

CORE-2609

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Bug Fixes
    • Improved department and visitor autocomplete results when searching by term and applying exclusions.
    • Removed unsupported query conditions from autocomplete requests, preventing unintended filtering.
    • Standardized autocomplete request handling for more consistent and reliable results.
    • Removed unsafe selector parameters from livechat autocomplete endpoints, reducing the risk of unexpected search behavior.

@dionisio-bot

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

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 187c570

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@rocket.chat/meteor Major
@rocket.chat/core-typings Major
@rocket.chat/rest-typings Major

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai

coderabbitai Bot commented Aug 21, 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: 1ea72c13-fbfe-499e-8f35-1303b251bd52

📥 Commits

Reviewing files that changed from the base of the PR and between a02feba and 187c570.

📒 Files selected for processing (5)
  • .changeset/proud-rabbits-count.md
  • apps/meteor/server/api/v1/omnichannel/departments.ts
  • apps/meteor/server/api/v1/omnichannel/lib/departments.ts
  • apps/meteor/server/api/v1/omnichannel/lib/visitors.ts
  • apps/meteor/server/api/v1/omnichannel/visitors.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • .changeset/proud-rabbits-count.md
  • apps/meteor/server/api/v1/omnichannel/lib/visitors.ts
  • apps/meteor/server/api/v1/omnichannel/lib/departments.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: CodeQL-Build
  • GitHub Check: CodeQL-Build
⚠️ CI failures not shown inline (5)

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**

GitHub Check: Dionisio QA: Some checks did not pass

Conclusion: failure

View job details

**Conclusion:** failure
### Steps
- ✅ **No merge conflicts**
- ❌ **QA assured** — This PR is missing the 'stat: QA assured' label
- ✅ **Mergeable**
- ✅ **Has milestone or project**
- ✅ **Valid PR title**
- ✅ **Correct target version**
🧰 Additional context used
📓 Path-based instructions (2)
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/server/api/v1/omnichannel/visitors.ts
  • apps/meteor/server/api/v1/omnichannel/departments.ts
Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests

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

Files:

  • apps/meteor/server/api/v1/omnichannel/visitors.ts
  • apps/meteor/server/api/v1/omnichannel/departments.ts
🔇 Additional comments (2)
apps/meteor/server/api/v1/omnichannel/departments.ts (1)

20-21: LGTM!

Also applies to: 257-262

apps/meteor/server/api/v1/omnichannel/visitors.ts (1)

23-23: LGTM!

Also applies to: 123-127


Walkthrough

The department and visitor autocomplete endpoints now forward only term and exceptions. Their helper functions no longer accept caller-supplied query conditions and use empty conditions for autocomplete searches.

Changes

Omnichannel autocomplete

Layer / File(s) Summary
Autocomplete query contracts
apps/meteor/server/api/v1/omnichannel/lib/departments.ts, apps/meteor/server/api/v1/omnichannel/lib/visitors.ts, .changeset/proud-rabbits-count.md
Autocomplete helper selectors no longer include conditions. Department and visitor queries use empty condition objects. The changeset declares a major version bump.
Autocomplete endpoint selector filtering
apps/meteor/server/api/v1/omnichannel/departments.ts, apps/meteor/server/api/v1/omnichannel/visitors.ts
The endpoints parse selector and pass only term and exceptions to the autocomplete helpers.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 187c5

This localized change removes the unsafe selector parameter from the livechat autocomplete endpoints; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested labels: type: bug

Suggested reviewers: julio-rocketchat, nazabucciarelli, saimpiodiego

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the livechat autocomplete endpoints and the unsafe selector parameter addressed by the change. The fix! prefix also signals the breaking API change.
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

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files. (1 skipped: 1 unsupported.)

✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Warning

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2609: 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.

dionisio-bot[bot]
dionisio-bot Bot previously requested changes Aug 21, 2026

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

Changeset mismatch

The PR title indicates a breaking change (!), but no changeset declares a major bump — at least one is required.

Please align the PR title, milestone and changesets.

@jonasflorencio jonasflorencio added this to the 9.0.0 milestone Aug 21, 2026
@jonasflorencio jonasflorencio self-assigned this Aug 21, 2026
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##             release-9.0.0   #41898   +/-   ##
================================================
  Coverage                 ?   69.37%           
================================================
  Files                    ?     4255           
  Lines                    ?   168358           
  Branches                 ?    29981           
================================================
  Hits                     ?   116792           
  Misses                   ?    46398           
  Partials                 ?     5168           
Flag Coverage Δ
unit 71.26% <ø> (?)

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.

@jonasflorencio jonasflorencio changed the title fix!: remove param from livechat autocomplete endpoints fix!: livechat autocomplete endpoints accept unsafe selector parameter Aug 25, 2026
@jonasflorencio
jonasflorencio marked this pull request as ready for review August 25, 2026 14:35
@jonasflorencio
jonasflorencio requested a review from a team as a code owner August 25, 2026 14:35

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

Re-trigger cubic

@dionisio-bot
dionisio-bot Bot dismissed their stale review August 25, 2026 15:25

Changesets now match the title and milestone

@tassoevan
tassoevan requested review from a team as code owners August 25, 2026 15:26
@julio-rocketchat
julio-rocketchat force-pushed the fix/remove-livechat-autocomplete-conditions-param branch from abfb296 to 187c570 Compare August 25, 2026 15:42
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@jonasflorencio jonasflorencio added the stat: QA assured Means it has been tested and approved by a company insider label Aug 25, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Aug 25, 2026
@dionisio-bot
dionisio-bot Bot merged commit 0d0e8b1 into release-9.0.0 Aug 25, 2026
14 checks passed
@dionisio-bot
dionisio-bot Bot deleted the fix/remove-livechat-autocomplete-conditions-param branch August 25, 2026 16:08
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