Skip to content

refactor: move app/autotranslate modules - #41916

Open
tassoevan wants to merge 1 commit into
refactor/move-app-authorization-client-modulesfrom
refactor/move-app-autotranslate-client-modules
Open

refactor: move app/autotranslate modules#41916
tassoevan wants to merge 1 commit into
refactor/move-app-authorization-client-modulesfrom
refactor/move-app-autotranslate-client-modules

Conversation

@tassoevan

@tassoevan tassoevan commented Aug 24, 2026

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

It moves client modules from app/autotranslate/ to client/.

Issue(s)

Steps to test or reproduce

Further comments


Stack created with GitHub Stacks CLIGive Feedback 💬

Review in cubic

Task: ARCH-2387

Summary by CodeRabbit

  • Refactor
    • Consolidated auto-translation loading and imports under a shared module.
    • Removed legacy client-side initialization and package references.
    • Preserved existing translation behavior, including message translation, original-language viewing, and streaming updates.

@tassoevan
tassoevan requested a review from a team as a code owner August 24, 2026 20:48
@dionisio-bot

dionisio-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is not ready to merge, because of the following issues:

  • This PR is missing the 'stat: QA assured' label

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 317345f

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 24, 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: d306031f-90ed-4871-9ac3-493b961dd3c6

📥 Commits

Reviewing files that changed from the base of the PR and between c88d587 and 7aa0573.

📒 Files selected for processing (2)
  • apps/meteor/client/components/message/toolbar/useTranslateAction.ts
  • apps/meteor/client/components/message/toolbar/useViewOriginalTranslationAction.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/meteor/client/components/message/toolbar/useTranslateAction.ts

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

📜 Recent review details
⏰ Context from checks skipped due to timeout. (6)
  • GitHub Check: ⚙️ Variables Setup
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
🧰 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/client/components/message/toolbar/useViewOriginalTranslationAction.ts
Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests

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

Files:

  • apps/meteor/client/components/message/toolbar/useViewOriginalTranslationAction.ts
🔇 Additional comments (1)
apps/meteor/client/components/message/toolbar/useViewOriginalTranslationAction.ts (1)

6-6: LGTM!


Walkthrough

The change consolidates client AutoTranslate imports and exports under client/lib/autotranslate. It removes legacy initialization side effects. Message actions, message list translation, and stream startup now use the shared module path.

Changes

AutoTranslate module consolidation

Layer / File(s) Summary
Shared module wiring
apps/meteor/client/lib/autotranslate/..., apps/meteor/app/autotranslate/client/lib/actionButton.ts
The shared module updates relative imports and re-exports. Legacy AutoTranslate initialization is removed.
Consumer migration
apps/meteor/client/components/message/toolbar/..., apps/meteor/client/views/room/MessageList/hooks/useAutoTranslate.ts, apps/meteor/client/startup/streamMessage/autotranslate.ts
AutoTranslate consumers and the dynamic stream handler now load from client/lib/autotranslate.

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

Merge Risk: ⚪ Minimal · up to 7aa05

This PR moves client autotranslation modules and updates their references without any identified user-facing correctness or production impact; no actionable merge-blocking risk remains beyond normal checks and review.

Suggested labels: type: chore

Suggested reviewers: cardoso

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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 6…
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.
Title check ✅ Passed The title clearly and concisely describes the main change: moving the app/autotranslate modules to the client location.
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 6 files.

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

Warning

Errors were encountered while retrieving linked issues.

Errors (1)
  • ARCH-2387: 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.

@tassoevan tassoevan added this to the 8.9.0 milestone Aug 24, 2026
@tassoevan

Copy link
Copy Markdown
Member Author

/jira ARCH

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

Re-trigger cubic

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 69.31%. Comparing base (96e7021) to head (317345f).

Additional details and impacted files

Impacted file tree graph

@@                                Coverage Diff                                 @@
##           refactor/move-app-authorization-client-modules   #41916      +/-   ##
==================================================================================
- Coverage                                           69.33%   69.31%   -0.02%     
==================================================================================
  Files                                                4255     4254       -1     
  Lines                                              168645   168644       -1     
  Branches                                            30033    30045      +12     
==================================================================================
- Hits                                               116924   116894      -30     
- Misses                                              46545    46586      +41     
+ Partials                                             5176     5164      -12     
Flag Coverage Δ
e2e 58.77% <0.00%> (-0.02%) ⬇️
e2e-api 45.86% <ø> (-0.02%) ⬇️
unit 71.25% <ø> (-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.

@tassoevan
tassoevan force-pushed the refactor/move-app-autotranslate-client-modules branch 2 times, most recently from c7d0a89 to 7aa0573 Compare August 25, 2026 03:26
@tassoevan
tassoevan force-pushed the refactor/move-app-autotranslate-client-modules branch from 7aa0573 to 317345f Compare August 25, 2026 04:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant