Skip to content

Conversation

@tassoevan
Copy link
Contributor

@tassoevan tassoevan commented Dec 22, 2025

Proposed changes (including videos or screenshots)

This pull request cleans up and simplifies the configuration for the ee/packages/presence package. The most significant changes involve removing unnecessary dependencies and configuration files related to Babel, updating ESLint and TypeScript settings, and streamlining the linting scripts.

Build and toolchain cleanup:

  • Removed Babel configuration and related dependencies (babel.config.js, @babel/core, @babel/preset-env, @babel/preset-typescript, and babel-jest) as they are no longer needed for the build process. [1] [2]

Linting and TypeScript configuration:

  • Updated lint scripts in package.json to lint the entire project instead of just the src directory, and removed the --skipLibCheck flag from the typecheck script for stricter type checking.
  • Removed the strictPropertyInitialization: false override from tsconfig.json to enforce stricter TypeScript checks.

ESLint configuration:

  • Removed the Jest-specific environment overrides from .eslintrc.json to simplify the ESLint configuration.

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Updated development tooling and build configuration to streamline the development environment.

✏️ Tip: You can customize this high-level summary in your review settings.

@tassoevan tassoevan added this to the 8.1.0 milestone Dec 22, 2025
@tassoevan tassoevan requested a review from a team December 22, 2025 16:58
@changeset-bot
Copy link

changeset-bot bot commented Dec 22, 2025

⚠️ No Changeset found

Latest commit: 2296947

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
Copy link
Contributor

coderabbitai bot commented Dec 22, 2025

Walkthrough

Build configuration cleanup for the presence package: removed Babel configuration files and dependencies, simplified ESLint overrides, updated TypeScript compiler options, and adjusted package.json scripts to run from the project root instead of the src directory.

Changes

Cohort / File(s) Change Summary
Babel removal
ee/packages/presence/babel.config.js
Entire Babel configuration file removed
ESLint configuration
ee/packages/presence/.eslintrc.json
Removed Jest environment overrides block for test spec files
TypeScript configuration
ee/packages/presence/tsconfig.json
Removed strictPropertyInitialization: false option to use default TypeScript behavior
Package manifest
ee/packages/presence/package.json
Updated lint/lint:fix scripts to run from root (.) instead of src directory; removed --skipLibCheck flag from typecheck script; removed Babel-related devDependencies (@babel/core, @babel/preset-env, @babel/preset-typescript, babel-jest)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify that the removal of Babel configuration does not break build or test pipelines
  • Confirm that lint scripts running from root directory cover all necessary files
  • Check that TypeScript strict property initialization change aligns with project standards

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo

Poem

🐰 Config files trimmed with care,
Babel and Jest overrides stripped bare,
TypeScript strictness now set free,
Scripts run from root, clean as can be!
Build tools simplified, the presence package restored. ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main objective of the PR: reviewing and simplifying the build configuration for the presence package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/presence-build-configuration

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a587ab3 and 2296947.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • ee/packages/presence/.eslintrc.json
  • ee/packages/presence/babel.config.js
  • ee/packages/presence/package.json
  • ee/packages/presence/tsconfig.json
💤 Files with no reviewable changes (3)
  • ee/packages/presence/babel.config.js
  • ee/packages/presence/tsconfig.json
  • ee/packages/presence/.eslintrc.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-12-10T21:00:54.909Z
Learnt from: KevLehman
Repo: RocketChat/Rocket.Chat PR: 37091
File: ee/packages/abac/jest.config.ts:4-7
Timestamp: 2025-12-10T21:00:54.909Z
Learning: Rocket.Chat monorepo: Jest testMatch pattern '<rootDir>/src/**/*.spec.(ts|js|mjs)' is valid in this repo and used across multiple packages (e.g., packages/tools, ee/packages/omnichannel-services). Do not flag it as invalid in future reviews.

Applied to files:

  • ee/packages/presence/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: CodeQL-Build
  • GitHub Check: CodeQL-Build
🔇 Additional comments (3)
ee/packages/presence/package.json (3)

12-13: LGTM: Expanded linting coverage.

Linting the entire project directory instead of just src is a good practice for comprehensive code quality checks. ESLint typically ignores node_modules and build directories by default.


14-15: The Jest configuration is properly set up with TypeScript support.

The presence package uses the @rocket.chat/jest-presets/server preset, which is configured with @swc/jest as the TypeScript transformer. While @swc/jest is not directly visible in ee/packages/presence/package.json's devDependencies, it is provided through the preset's dependencies and properly configured in the server preset file. Removing babel-jest does not break TypeScript testing here.

Likely an incorrect or invalid review comment.


16-16: This change enables type checking for library declaration files, improving type safety.

Removing --skipLibCheck means TypeScript will now check .d.ts files in dependencies rather than skipping them. This can surface type errors in third-party type definitions that were previously ignored, but improves overall type safety by catching potential incompatibilities between library types.


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.

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.76%. Comparing base (a587ab3) to head (2296947).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37926      +/-   ##
===========================================
+ Coverage    71.70%   71.76%   +0.06%     
===========================================
  Files         1453     1453              
  Lines        76689    76689              
  Branches     11138    11154      +16     
===========================================
+ Hits         54988    55039      +51     
+ Misses       21274    21222      -52     
- Partials       427      428       +1     
Flag Coverage Δ
unit 71.76% <ø> (+0.06%) ⬆️

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.

@github-actions
Copy link
Contributor

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.1GiB 1.1GiB +11MiB
rocketchat 355MiB 345MiB +11MiB
omnichannel-transcript-service 132MiB 132MiB -320B
queue-worker-service 132MiB 132MiB +856B
ddp-streamer-service 126MiB 126MiB +1.1KiB
account-service 113MiB 113MiB -465B
authorization-service 111MiB 111MiB -48B
presence-service 111MiB 111MiB +204B

📊 Historical Trend

---
config:
  theme: "dark"
  xyChart:
    width: 900
    height: 400
---
xychart
  title "Image Size Evolution by Service (Last 30 Days + This PR)"
  x-axis ["11/15 22:28", "11/16 01:28", "11/17 23:50", "11/18 22:53", "11/19 23:02", "11/21 16:49", "11/24 17:34", "11/27 22:32", "11/28 19:05", "12/01 23:01", "12/02 21:57", "12/03 21:00", "12/04 18:17", "12/05 21:56", "12/08 20:15", "12/09 22:17", "12/10 23:26", "12/11 21:56", "12/12 22:45", "12/13 01:34", "12/15 22:31", "12/16 22:18", "12/17 21:04", "12/18 23:12", "12/19 23:27", "12/20 21:03", "12/22 17:37 (PR)"]
  y-axis "Size (GB)" 0 --> 0.5
  line "account-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "authorization-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "ddp-streamer-service" [0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12, 0.12]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "presence-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
  line "queue-worker-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.35]
Loading

Statistics (last 26 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.2GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 1.1GiB
ℹ️ About this report

This report compares Docker image sizes from this build against the develop baseline.

  • Tag: pr-37926
  • Baseline: develop
  • Timestamp: 2025-12-22 17:37:31 UTC
  • Historical data points: 26

Updated: Mon, 22 Dec 2025 17:37:32 GMT

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Dec 22, 2025
@ggazzo ggazzo merged commit cfea98d into develop Dec 22, 2025
63 of 66 checks passed
@ggazzo ggazzo deleted the chore/presence-build-configuration branch December 22, 2025 18:17
gaolin1 pushed a commit to gaolin1/medsense.webchat that referenced this pull request Jan 6, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants