Skip to content

feat: new endpoint /v1/autotranslate.getProviderUiMetadata - #42150

Merged
ggazzo merged 1 commit into
developfrom
ddp-replace-autotranslate
Sep 22, 2026
Merged

ggazzo merged 1 commit into
developfrom
ddp-replace-autotranslate

Conversation

@sampaiodiego

@sampaiodiego sampaiodiego commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Issue(s)

ARCH-2307

Steps to test or reproduce

Further comments

Review in cubic

Summary by CodeRabbit

  • New Features

    • Added an authenticated REST endpoint to retrieve registered auto-translation providers and their display names.
    • Updated auto-translation provider loading to use the new endpoint.
  • Deprecations

    • Deprecated the existing real-time provider metadata method; it remains available until version 9.0.0.

@dionisio-bot

dionisio-bot Bot commented Sep 15, 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 Sep 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ae345cf

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 Minor
@rocket.chat/core-typings Minor
@rocket.chat/rest-typings Minor

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 Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 27df9d34-b850-496a-b24b-c97eba6328a2

📥 Commits

Reviewing files that changed from the base of the PR and between 89cd73a and ae345cf.

📒 Files selected for processing (6)
  • .changeset/ddp-migrate-get-provider-ui-metadata.md
  • apps/meteor/client/lib/autotranslate/autotranslate.spec.ts
  • apps/meteor/client/lib/autotranslate/autotranslate.ts
  • apps/meteor/server/api/v1/autotranslate.ts
  • apps/meteor/server/meteor-methods/platform/getProviderUiMetadata.ts
  • apps/meteor/tests/end-to-end/api/autotranslate.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. (6)
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: Hacktron Security Check
  • GitHub Check: ⚙️ Variables Setup
  • GitHub Check: ⚙️ Test Guard
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🧰 Additional context used
🧠 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/server/api/v1/autotranslate.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/server/api/v1/autotranslate.ts
🪛 LanguageTool
.changeset/ddp-migrate-get-provider-ui-metadata.md

[style] ~5-~5: To elevate your writing, try using more formal phrasing here.
Context: ...ime API method in its favor. The method keeps working until it is removed in 9.0.0.

(CONTINUE_TO_VB)


Walkthrough

The change adds an authenticated REST endpoint for auto-translate provider metadata. The client uses this endpoint for provider loading. The existing real-time method now logs deprecation information and remains available until version 9.0.0.

Changes

Auto-translate provider metadata

Layer / File(s) Summary
Provider metadata REST endpoint
apps/meteor/server/api/v1/autotranslate.ts, apps/meteor/tests/end-to-end/api/autotranslate.ts
Adds GET /v1/autotranslate.getProviderUiMetadata. The endpoint requires authentication, returns registered provider names and display names, validates the response, and has authenticated and unauthenticated tests.
Client REST loading and test updates
apps/meteor/client/lib/autotranslate/autotranslate.ts, apps/meteor/client/lib/autotranslate/autotranslate.spec.ts
Loads provider metadata through sdk.rest.get while keeping supported-language loading concurrent. Tests mock the REST endpoints and update positive and negative assertions.
Legacy method deprecation and release metadata
apps/meteor/server/meteor-methods/platform/getProviderUiMetadata.ts, .changeset/ddp-migrate-get-provider-ui-metadata.md
Adds deprecation logging and @deprecated documentation for the real-time method. Records its replacement endpoint and planned removal in version 9.0.0.

Priority: ⬇️ Low

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AutoTranslateClient
  participant AutoTranslateAPI
  participant TranslationProviderRegistry
  AutoTranslateClient->>AutoTranslateAPI: GET /v1/autotranslate.getProviderUiMetadata
  AutoTranslateAPI->>TranslationProviderRegistry: Read provider metadata
  TranslationProviderRegistry-->>AutoTranslateAPI: Provider metadata
  AutoTranslateAPI-->>AutoTranslateClient: Return providers
Loading

Suggested labels: type: feature

Suggested reviewers: juliajforesti, tassoevan

Merge Risk: ⚪ Minimal · up to ae345

The REST migration uses the matching providers response shape, and the legacy method retains its established deprecation behavior. No actionable merge-blocking risk remains.

🚥 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 and concisely describes the main change: adding the /v1/autotranslate.getProviderUiMetadata endpoint.
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 5…
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.

Warning

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

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.

@sampaiodiego
sampaiodiego marked this pull request as ready for review September 15, 2026 19:13
@sampaiodiego
sampaiodiego requested review from a team as code owners September 15, 2026 19:13
@coderabbitai coderabbitai Bot added the type: feature Pull requests that introduces new feature label Sep 15, 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.

All reported issues were addressed across 6 files

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

Re-trigger cubic

Comment thread apps/meteor/server/api/v1/autotranslate.ts
@codecov

codecov Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 69.46%. Comparing base (89cd73a) to head (ae345cf).
⚠️ Report is 8 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #42150      +/-   ##
===========================================
+ Coverage    69.44%   69.46%   +0.02%     
===========================================
  Files         4323     4323              
  Lines       180471   180477       +6     
  Branches     31709    31735      +26     
===========================================
+ Hits        125320   125361      +41     
+ Misses       50097    50065      -32     
+ Partials      5054     5051       -3     
Flag Coverage Δ
e2e 59.05% <100.00%> (-0.02%) ⬇️
e2e-api 46.36% <83.33%> (+<0.01%) ⬆️
unit 70.23% <100.00%> (+0.03%) ⬆️

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.

@sampaiodiego sampaiodiego added this to the 8.9.0 milestone Sep 16, 2026
@sampaiodiego sampaiodiego added the stat: QA assured Means it has been tested and approved by a company insider label Sep 17, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Sep 17, 2026
@rohanbuildai

Copy link
Copy Markdown

hey can you pleasee tell me why i cannot add the labels to my PRs

@ggazzo
ggazzo merged commit f50636a into develop Sep 22, 2026
54 of 56 checks passed
@ggazzo
ggazzo deleted the ddp-replace-autotranslate branch September 22, 2026 01:38
This was referenced Sep 23, 2026
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: feature Pull requests that introduces new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants