Skip to content

Conversation

@ggazzo
Copy link
Member

@ggazzo ggazzo commented Nov 26, 2025

https://rocketchat.atlassian.net/browse/ARCH-1911

  • check coverage

Proposed changes (including videos or screenshots)

Issue(s)

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Updated build system configuration to use modern JavaScript compilation settings (ES2022 target).
    • Optimized JSX runtime handling in build process.
    • Updated platform support to focus on modern browsers.
    • Disabled legacy build system in favor of modern build tooling.
    • Updated browser compatibility targets to default modern standards.

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

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 26, 2025

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

  • This PR is missing the 'stat: QA assured' label
  • This PR is targeting the wrong base branch. It should target 8.2.0, but it targets 8.1.0

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Nov 26, 2025

⚠️ No Changeset found

Latest commit: 650083d

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 Nov 26, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review

Walkthrough

This pull request modernizes the Meteor build toolchain by updating JSX runtime configuration, introducing SWC as a compilation tool, and applying targeted patches to the typia dependency across multiple packages. Configuration changes span Babel, platform settings, and package metadata.

Changes

Cohort / File(s) Change Summary
React JSX & Compiler Configuration
apps/meteor/.babelrc, apps/meteor/.swcrc
Babel preset updated to configure JSX runtime as "automatic" via preset options instead of explicit plugin; new SWC configuration file added with es2022 target and automatic React runtime
Meteor Build Settings
apps/meteor/.meteor/platforms
Platform targets changed from ["browser", "server"] to ["browser", "modern"]
Meteor Package Configuration
apps/meteor/package.json
Added disableLegacyBuild: true and modern: true flags; updated browserslist from ["last 2 versions", "Firefox ESR"] to ["defaults"]; typia dependency patched to use local patch file
Core Typings Package
packages/core-typings/package.json
Added package metadata (main, typings, files); reorganized scripts and dependencies; typia dependency updated to use local patch file
UI Kit Package
packages/ui-kit/package.json
Updated typia dependency to use local patch file instead of direct version reference

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review the JSX runtime configuration change across .babelrc and .swcrc to ensure no behavioral differences in compilation
  • Verify that the typia patch mechanism is properly applied across all three packages and resolves correctly during dependency installation
  • Confirm that platform modernization flags (disableLegacyBuild, modern) align with intended Meteor build behavior
  • Validate browserslist change implications for browser support coverage

Possibly related PRs

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • KevLehman
  • tassoevan

Poem

🐰 Modern builds hop along with grace,
SWC speeds up the compiler's race,
Patches and presets in perfect time,
JSX runtime flows so fine,
Meteor springs forward—no more delay! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: Enable Meteor's Modern Build Stack' directly and clearly summarizes the main objective of the changeset: enabling Meteor's modern build stack. Changes across multiple configuration files (.babelrc, .meteor/platforms, .swcrc, package.json) all support this primary goal.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/meteor-modern

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.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2025

📦 Docker Image Size Report

➡️ Changes

Service Current Baseline Change Percent
sum of all images 0B 0B 0B
account-service 0B 0B 0B
authorization-service 0B 0B 0B
ddp-streamer-service 0B 0B 0B
omnichannel-transcript-service 0B 0B 0B
presence-service 0B 0B 0B
queue-worker-service 0B 0B 0B
rocketchat 0B 0B 0B

📊 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/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 18:54", "12/23 16:16", "12/24 19:38", "12/25 17:51", "12/26 13:18", "12/29 19:01", "12/30 20:52", "01/27 19:21 (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, 0.11, 0.11, 0.11, 0.00]
  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, 0.11, 0.11, 0.11, 0.00]
  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, 0.12, 0.12, 0.12, 0.00]
  line "omnichannel-transcript-service" [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, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  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, 0.11, 0.11, 0.11, 0.00]
  line "queue-worker-service" [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, 0.13, 0.13, 0.13, 0.13, 0.13, 0.13, 0.00]
  line "rocketchat" [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.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.34, 0.00]
Loading

Statistics (last 30 days):

  • 📊 Average: 1.5GiB
  • ⬇️ Minimum: 1.4GiB
  • ⬆️ Maximum: 1.6GiB
  • 🎯 Current PR: 0B
ℹ️ About this report

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

  • Tag: pr-37614
  • Baseline: develop
  • Timestamp: 2026-01-27 19:21:51 UTC
  • Historical data points: 30

Updated: Tue, 27 Jan 2026 19:21:51 GMT

@ggazzo ggazzo added this to the 7.14.0 milestone Nov 26, 2025
@ggazzo ggazzo marked this pull request as ready for review November 26, 2025 15:38
@ggazzo ggazzo requested a review from a team as a code owner November 26, 2025 15:38
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/core-typings/package.json (1)

6-26: Build surface for @rocket.chat/core-typings looks good; reconsider always-failing test script

Positives:

  • Adding main, typings, and files: ["/dist"] plus the tsc/ts-patch/typia patch pipeline makes this package behave like a standard compiled TS workspace module.
  • Dependencies on @rocket.chat/icons, @rocket.chat/message-parser, @rocket.chat/ui-kit, and the patched typia are consistent with the broader monorepo setup.

One caution:

  • The test script currently runs echo "no tests" && exit 1, which will always fail. If your root test command or CI uses a workspace-wide test script runner, this package will cause the entire test job to fail even when “no tests” is expected.

If this package isn’t yet supposed to have tests, consider either:

  • Returning success instead (e.g. echo "no tests" && exit 0), or
  • Omitting the test script and relying on the root tooling to skip packages without tests.

That keeps the door open for adding real tests later without surprising CI failures in the meantime.

📜 Review details

Configuration used: CodeRabbit 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 b33673b and 0a294e5.

⛔ Files ignored due to path filters (2)
  • .yarn/patches/typia-npm-9.7.2-5c5d9c80b4.patch is excluded by !**/.yarn/**
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (6)
  • apps/meteor/.babelrc (1 hunks)
  • apps/meteor/.meteor/platforms (1 hunks)
  • apps/meteor/.swcrc (1 hunks)
  • apps/meteor/package.json (2 hunks)
  • packages/core-typings/package.json (1 hunks)
  • packages/ui-kit/package.json (1 hunks)
⏰ 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). (14)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (3/5)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 8.2 [legacy watchers] coverage (5/5)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (4/5)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 8.2 [legacy watchers] coverage (1/5)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 8.2 [legacy watchers] coverage (4/5)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (2/5)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 8.2 [legacy watchers] coverage (3/5)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 8.2 [legacy watchers] coverage (2/5)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (5/5)
  • GitHub Check: 🔨 Test UI (CE) / MongoDB 8.2 (1/4)
  • GitHub Check: 🔨 Test UI (EE) / MongoDB 5.0 (1/5)
  • GitHub Check: 🔨 Test UI (CE) / MongoDB 8.2 (2/4)
  • GitHub Check: 🔨 Test UI (CE) / MongoDB 8.2 (4/4)
  • GitHub Check: 🔨 Test API (EE) / MongoDB 5.0 (1/1)
🔇 Additional comments (6)
apps/meteor/.swcrc (1)

1-9: SWC React/runtime config looks correct and aligns with Meteor’s SWC docs

jsc.target: "es2022" plus transform.react.runtime: "automatic" matches the documented way to enable the automatic React JSX runtime via .swcrc for Meteor’s modern SWC-based stack.(docs.meteor.com) This should keep Babel and SWC behavior consistent.

Just confirm this target is compatible with the browsers you intend to support (given browserslist: ["defaults"]) and adjust if you still need older engines.

apps/meteor/.meteor/platforms (1)

1-3: Platforms configuration matches Meteor’s modern build stack guidance

Having:

  • server
  • browser
  • modern

in .meteor/platforms matches the example Meteor gives for excluding legacy bundles in production when using the modern build stack.(fossies.org) This looks correct; just ensure you’re comfortable dropping legacy browser bundles in production.

apps/meteor/.babelrc (1)

4-4: Using @babel/preset-react with runtime: "automatic" is a clean JSX setup

Switching JSX handling to @babel/preset-react with runtime: "automatic" is idiomatic and avoids the need for the old JSX transform plugin. It aligns Babel’s JSX behavior with your SWC react.runtime = "automatic" config, reducing divergence between toolchains.

No issues from a config perspective; just verify your tests/Storybook don’t rely on the classic JSX runtime assumptions.

packages/ui-kit/package.json (1)

34-34: Typia patched dependency is consistent with the workspace patch strategy

Pointing typia to the Yarn patch: spec keeps this package aligned with the rest of the workspace’s patched typia usage and with the ts-patch/typia patch build step already defined in scripts.

Please just double‑check that:

  • The patch file typia-npm-9.7.2-5c5d9c80b4.patch is present under the expected .yarn/patches path in the repo, and
  • Your Yarn version in CI/dev fully supports this patch: URL form.
apps/meteor/package.json (2)

454-454: App-level typia patch keeps runtime dependency in sync with patched toolchain

Updating the app’s typia dependency to the same Yarn patch: spec used in other packages keeps the runtime dependency aligned with your patched compiler/tooling setup. That should avoid version skew between where typia is used to generate types and where it’s used at runtime.

As with the other packages, just confirm the patch file is present in .yarn/patches and that CI uses the same Yarn version that generated this spec.


467-477: Meteor modern build flags and browserslist changes look coherent; confirm disableLegacyBuild semantics

  • "meteor": { "modern": true, ... } is exactly how Meteor recommends enabling the modern build stack (SWC transpiler, modern bundler/dev‑server behavior).(docs.meteor.com)
  • Combined with .meteor/platforms including modern, this should drop legacy browser bundles in production while using the modern stack during dev.

Two things worth double‑checking:

  1. disableLegacyBuild: this flag isn’t clearly surfaced in the public Meteor docs yet. Please confirm your target Meteor version actually recognizes it (and that it does what you expect) rather than silently ignoring it.
  2. browserslist: ["defaults"]: this is a sensible general target, but it may differ slightly from your old "last 2 versions", "Firefox ESR" set. Confirm this matches the actual browser support policy you want for the app.

If both match your intentions, the overall config is consistent with Meteor’s modern stack guidance.

tassoevan
tassoevan previously approved these changes Nov 26, 2025
@ggazzo ggazzo marked this pull request as draft November 26, 2025 15:56
@tassoevan tassoevan dismissed their stale review November 26, 2025 17:14

There is a pending issue with coverage

@codecov
Copy link

codecov bot commented Dec 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.93%. Comparing base (c6ec7a9) to head (650083d).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37614      +/-   ##
===========================================
+ Coverage    70.80%   71.93%   +1.13%     
===========================================
  Files         3159     1474    -1685     
  Lines       109401    77299   -32102     
  Branches     19675    11256    -8419     
===========================================
- Hits         77456    55606   -21850     
+ Misses       29917    21237    -8680     
+ Partials      2028      456    -1572     
Flag Coverage Δ
e2e ?
e2e-api ?
unit 71.93% <ø> (-0.04%) ⬇️

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.

@dougfabris dougfabris modified the milestones: 7.14.0, 8.2.0 Jan 19, 2026
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.

5 participants