Skip to content

Conversation

@tassoevan
Copy link
Contributor

@tassoevan tassoevan commented Nov 24, 2025

Proposed changes (including videos or screenshots)

It reviews TypeScript output and ESLint configuration for @rocket.chat/ui-kit.

Issue(s)

ARCH-1887

Steps to test or reproduce

Further comments

Summary by CodeRabbit

  • Chores
    • Simplified build system from separate ESM and CommonJS outputs to unified TypeScript compilation.
    • Updated package entry points and build output structure.
    • Removed Babel-related build dependencies in favor of native TypeScript compilation.
    • Added Typia as a new runtime dependency.
    • Updated TypeScript configuration to target ES2024.
    • Adjusted linting and formatting configurations.

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

@tassoevan tassoevan added this to the 7.14.0 milestone Nov 24, 2025
@tassoevan tassoevan requested a review from a team November 24, 2025 13:42
@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Nov 24, 2025

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

  • This PR is targeting the wrong base branch. It should target 7.14.0, but it targets 7.13.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 24, 2025

⚠️ No Changeset found

Latest commit: aa3b78e

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 24, 2025

Walkthrough

Build configuration for the ui-kit package is being consolidated and modernized. TypeScript target updated from ES5/ES2020 to es2024/esnext, build outputs unified to a single dist directory, separate CommonJS configuration removed, and Babel dependencies replaced. Entry points in package.json updated accordingly.

Changes

Cohort / File(s) Summary
Ignore file consolidation
packages/ui-kit/.eslintignore, packages/ui-kit/.prettierignore
Removed ignore patterns for /node_modules and /dist directories, allowing these paths to be linted and formatted
ESLint configuration
packages/ui-kit/.eslintrc.json
Removed Jest environment configuration and added ignorePatterns with ["dist"]
Git configuration
packages/ui-kit/.gitignore
Removed /dist/* entry, allowing dist directory contents to be tracked by Git
TypeScript base configuration
packages/ui-kit/tsconfig.json
Updated target and lib from ES5/ES2020 to es2024/ES2024, removed strict type-checking and resolution options, added empty exclude array
TypeScript build configuration
packages/ui-kit/tsconfig.build.json
Changed outDir from ./dist/esm to ./dist for unified output location
TypeScript CommonJS configuration
packages/ui-kit/tsconfig.cjs.json
File removed; CommonJS-specific build configuration no longer maintained
Package manifest
packages/ui-kit/package.json
Consolidated entry points to single dist directory (main: dist/index.js, types: dist/index.d.ts); added typia dependency; removed Babel-related devDependencies; restructured build scripts to use unified TypeScript compilation; reordered metadata blocks; updated publishConfig to top-level

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Areas requiring attention during review:

  • package.json entry point consolidation: Verify that consumers using the previous separate entry points (dist/cjs, dist/esm) will not be broken; test published package consumption
  • Build output unification: Confirm that the single dist directory output correctly generates both module formats and type definitions as needed
  • TypeScript target update to es2024: Validate that the runtime environment(s) this package targets fully support es2024 features; check for any compatibility issues with downstream consumers
  • Babel dependency removal: Ensure that es2024 features are natively supported without transpilation, or that the consumption environment handles this appropriately
  • Git tracking of dist directory: Confirm whether dist should be tracked in version control or if build artifacts should remain ignored

Suggested labels

stat: ready to merge, stat: QA assured

Suggested reviewers

  • ggazzo

Poem

🐰 A rabbit hops through config files so grand,
Consolidating dist to one neat land,
From babel chains now free at last,
To es2024's future, leaving ES5 past,
Build simplified, dependencies lean—
The tidiest ui-kit we've ever seen! ✨

Pre-merge checks and finishing touches

✅ 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 'chore(ui-kit): Review build configuration' accurately reflects the primary changes made to the ui-kit package's build configuration, including TypeScript, ESLint, and package.json updates.
Linked Issues check ✅ Passed The linked issue ARCH-1887 references the same build configuration review objective without specifying detailed requirements, and the pull request addresses TypeScript and ESLint configuration updates as expected.
Out of Scope Changes check ✅ Passed All changes directly relate to build configuration and tooling updates for the ui-kit package with no extraneous modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/ui-kit-build-configuration

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

📦 Docker Image Size Report

📈 Changes

Service Current Baseline Change Percent
sum of all images 1.2GiB 1.2GiB +11MiB
rocketchat 358MiB 347MiB +12MiB
omnichannel-transcript-service 132MiB 132MiB -67KiB
queue-worker-service 132MiB 132MiB -67KiB
ddp-streamer-service 127MiB 127MiB -66KiB
account-service 114MiB 114MiB -68KiB
stream-hub-service 111MiB 111MiB -66KiB
authorization-service 111MiB 111MiB -65KiB
presence-service 111MiB 111MiB -67KiB

📊 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 14:28 (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]
  line "authorization-service" [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]
  line "omnichannel-transcript-service" [0.14, 0.14, 0.14, 0.14, 0.14, 0.13, 0.13]
  line "presence-service" [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]
  line "rocketchat" [0.36, 0.36, 0.35, 0.35, 0.35, 0.34, 0.35]
  line "stream-hub-service" [0.11, 0.11, 0.11, 0.11, 0.11, 0.11, 0.11]
Loading

Statistics (last 6 days):

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

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

  • Tag: pr-37589
  • Baseline: develop
  • Timestamp: 2025-11-24 14:28:05 UTC
  • Historical data points: 6

Updated: Mon, 24 Nov 2025 14:28:05 GMT

@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.81%. Comparing base (5ef03e2) to head (aa3b78e).
⚠️ Report is 9 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #37589      +/-   ##
===========================================
- Coverage    68.86%   68.81%   -0.06%     
===========================================
  Files         3360     3361       +1     
  Lines       114339   114343       +4     
  Branches     20560    20619      +59     
===========================================
- Hits         78741    78681      -60     
- Misses       33502    33573      +71     
+ Partials      2096     2089       -7     
Flag Coverage Δ
e2e 57.27% <ø> (-0.14%) ⬇️
e2e-api 42.21% <ø> (ø)

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 marked this pull request as ready for review November 24, 2025 16:03
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: 3

🧹 Nitpick comments (1)
packages/ui-kit/package.json (1)

29-31: Consider consolidating redundant test scripts.

Lines 29 and 30 define test and testunit scripts that both run jest. Redundant scripts create confusion about which one to use. Either remove testunit or assign it a different purpose (e.g., testunit for unit tests only with a filter).

-		"test": "jest",
-		"testunit": "jest",
+		"test": "jest",
📜 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 4ca66c4 and aa3b78e.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (8)
  • packages/ui-kit/.eslintignore (0 hunks)
  • packages/ui-kit/.eslintrc.json (1 hunks)
  • packages/ui-kit/.gitignore (0 hunks)
  • packages/ui-kit/.prettierignore (0 hunks)
  • packages/ui-kit/package.json (2 hunks)
  • packages/ui-kit/tsconfig.build.json (1 hunks)
  • packages/ui-kit/tsconfig.cjs.json (0 hunks)
  • packages/ui-kit/tsconfig.json (1 hunks)
💤 Files with no reviewable changes (4)
  • packages/ui-kit/.eslintignore
  • packages/ui-kit/.prettierignore
  • packages/ui-kit/.gitignore
  • packages/ui-kit/tsconfig.cjs.json
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.
📚 Learning: 2025-11-19T12:32:29.696Z
Learnt from: d-gubert
Repo: RocketChat/Rocket.Chat PR: 37547
File: packages/i18n/src/locales/en.i18n.json:634-634
Timestamp: 2025-11-19T12:32:29.696Z
Learning: Repo: RocketChat/Rocket.Chat
Context: i18n workflow
Learning: In this repository, new translation keys should be added to packages/i18n/src/locales/en.i18n.json only; other locale files are populated via the external translation pipeline and/or fall back to English. Do not request adding the same key to all locale files in future reviews.

Applied to files:

  • packages/ui-kit/package.json
📚 Learning: 2025-11-10T19:06:20.146Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37408
File: apps/meteor/client/views/admin/ABAC/useRoomAttributeOptions.tsx:53-69
Timestamp: 2025-11-10T19:06:20.146Z
Learning: In the Rocket.Chat repository, do not provide suggestions or recommendations about code sections marked with TODO comments. The maintainers have already identified these as future work and external reviewers lack the full context about implementation plans and timing.

Applied to files:

  • packages/ui-kit/package.json
📚 Learning: 2025-11-19T18:20:07.720Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 37419
File: packages/i18n/src/locales/en.i18n.json:918-921
Timestamp: 2025-11-19T18:20:07.720Z
Learning: Repo: RocketChat/Rocket.Chat — i18n/formatting
Learning: This repository uses a custom message formatting parser in UI blocks/messages; do not assume standard Markdown rules. For keys like Call_ended_bold, Call_not_answered_bold, Call_failed_bold, and Call_transferred_bold in packages/i18n/src/locales/en.i18n.json, retain the existing single-asterisk emphasis unless maintainers request otherwise.

Applied to files:

  • packages/ui-kit/package.json
🔇 Additional comments (3)
packages/ui-kit/package.json (2)

18-19: Confirm whether the simple export approach in package.json is intentional.

The exports field is not configured; the package currently uses only main and types for entry points. Verify this simple approach meets the package's needs for consumers, or add an exports field with conditional exports (ESM/CommonJS) if modern module resolution is required.


24-27: I need to research the idempotency guarantees of these tools since the sandbox environment doesn't have dependencies installed. Let me search for documentation on both.

Let me search more specifically for information about the typia patch command and ts-patch behavior in builds.

Based on my research, I can now provide a rewritten review comment:


Remove unwarranted concern about ts-patch and typia patch idempotency.

ts-patch's persistent patch modifies the TypeScript installation within the node_modules path and requires additional configuration to remain persisted, but carries less load time and complexity. This operation is idempotent by design—ts-patch hacks node_modules/typescript source code, and whenever you update TypeScript version, you have to run npm run prepare command repeatedly, indicating it's safe to run multiple times.

The npx typia patch command was developed to revive JSDocComment parsing feature of tsc as a temporary solution for TypeScript v5.3 update instead of ts-patch, and will be disabled after ts-patch starts supporting such TypeScript v5.3 update. If you don't use any "Comment Tags" and "JSON schema generator", you don't need to run npx typia patch command, as it's not mandatory but just optional.

Neither command modifies source files. Source Transformers transform the AST of SourceFiles during compilation, allowing you to alter the output of the JS or declarations files—transformations occur during tsc execution, not from the patch commands. Since .:build:clean removes dist before compilation, incremental build state is not a concern.

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

4-6: The original review comment is incorrect.

The tsconfig.json extends @rocket.chat/tsconfig/base.json, which contains all the options the review claims were removed: strict, esModuleInterop, skipLibCheck, forceConsistentCasingInFileNames, moduleResolution, and resolveJsonModule. These options are not removed—they are inherited from the base configuration and remain active in the final merged compiler options.

The actual changes in this PR are intentional target updates: target changed from es5 to es2024, and module changed from commonjs to esnext. The codebase uses only ES2020 features (optional chaining, nullish coalescing), which are compatible with es2024 targeting. No JSON imports or CommonJS requires were found, confirming these inherited options pose no compatibility issues.

@tassoevan tassoevan requested a review from a team November 24, 2025 16:45
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Nov 24, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Nov 24, 2025
@ggazzo ggazzo merged commit 6f8dc11 into develop Nov 24, 2025
149 of 156 checks passed
@ggazzo ggazzo deleted the chore/ui-kit-build-configuration branch November 24, 2025 17:07
@dougfabris dougfabris modified the milestones: 7.14.0, 8.0.0 Jan 19, 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants