Skip to content

refactor: migrate rooms.delete endpoint to new API format#38549

Merged
ggazzo merged 5 commits intoRocketChat:developfrom
Rohitgiri02:migrate/rooms-delete-to-new-api-format
Feb 27, 2026
Merged

refactor: migrate rooms.delete endpoint to new API format#38549
ggazzo merged 5 commits intoRocketChat:developfrom
Rohitgiri02:migrate/rooms-delete-to-new-api-format

Conversation

@Rohitgiri02
Copy link
Copy Markdown
Contributor

@Rohitgiri02 Rohitgiri02 commented Feb 8, 2026

Description

This PR migrates the rooms.delete endpoint from the deprecated addRoute pattern to the new OpenAPI + AJV validation pattern, following the guidelines in apps/meteor/app/api/README.md.

Key Changes

  • Full Migration: Replaced deprecated API.v1.addRoute('rooms.delete', ...) with the chained API.v1.post('rooms.delete', ...) method.
  • Input Validation: Added body validation using ajv.compile<{ roomId: string }>() with JSON Schema — replaces the manual if (!roomId) runtime check.
  • Response Schemas: Added compiled AJV response validators for:
    • 200 — Success response ({ success: true })
    • 400validateBadRequestErrorResponse
    • 401validateUnauthorizedErrorResponse
  • Swagger Documentation: Response block in the route definition enables automatic OpenAPI spec generation at /api-docs/.
  • Typing Cleanup: Registered endpoint types via ExtractRoutesFromAPI<typeof roomDeleteEndpoint> into the RoomEndpoints union — removing the need for manual type definitions in @rocket.chat/rest-typings.

Why

The addRoute method and validateParams property are deprecated per the API README. The new format enables:

  • Automatic OpenAPI specification generation
  • Runtime response validation in test environments
  • Stronger TypeScript type inference via ExtractRoutesFromAPI
  • Structured input validation via body/query instead of validateParams

Testing & Verification

  • yarn turbo run typecheck --filter='@rocket.chat/meteor'passes (0 errors)
  • yarn eslint:fix && yarn stylelint:fix — no issues
  • yarn lintpasses

ScreenShot of Swagger ui testing

Screenshot 2026-02-08 131325 Screenshot 2026-02-08 131351

Summary by CodeRabbit

  • Refactor
    • Room deletion flow reorganized to use a dedicated endpoint handler with standardized validation and response format.
  • Chores
    • Public API surface updated to reflect the new endpoint structure.
  • Tests
    • End-to-end tests updated to expect a standardized error shape when parameters are missing.
  • Impact
    • No user-facing functional changes; errors are returned in a clearer, consistent format.

COMM-144
Task: ARCH-2001

@Rohitgiri02 Rohitgiri02 requested review from a team as code owners February 8, 2026 07:47
@dionisio-bot
Copy link
Copy Markdown
Contributor

dionisio-bot bot commented Feb 8, 2026

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 8, 2026

🦋 Changeset detected

Latest commit: 63493b7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 41 packages
Name Type
@rocket.chat/rest-typings Minor
@rocket.chat/meteor Minor
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/http-router Patch
@rocket.chat/models Patch
@rocket.chat/ui-contexts Major
@rocket.chat/web-ui-registration Major
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/federation-matrix Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/abac Patch
@rocket.chat/network-broker Patch
@rocket.chat/omni-core-ee Patch
@rocket.chat/livechat Patch
@rocket.chat/mock-providers Patch
@rocket.chat/cron Patch
@rocket.chat/instance-status Patch
@rocket.chat/omni-core Patch
@rocket.chat/server-fetch Patch
@rocket.chat/ui-client Major
@rocket.chat/media-calls Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/fuselage-ui-kit Major
@rocket.chat/gazzodown Major
@rocket.chat/ui-avatar Major
@rocket.chat/ui-video-conf Major
@rocket.chat/ui-voip Major
@rocket.chat/core-typings Minor
@rocket.chat/apps Patch
@rocket.chat/model-typings Patch
@rocket.chat/license Patch
@rocket.chat/pdf-worker Patch

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

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 8, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 8, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

Extracts the rooms.delete route into a new exported roomDeleteEndpoint constant with AJV-validated input/output and error mappings; moves handler into an action that verifies the room, prevents team-channel deletion, calls eraseRoom, and updates RoomEndpoints; removes the REST typing and tightens a test's expected error shape.

Changes

Cohort / File(s) Summary
API Implementation
apps/meteor/app/api/server/v1/rooms.ts
Adds exported roomDeleteEndpoint = API.v1.post('rooms.delete', ...) with body schema { roomId: string }, response { success: boolean } and 400/401 error schemas; replaces inline addRoute with an action that validates roomId, checks room existence and type (disallows team channels), calls eraseRoom, and returns { success: true }; adds endpoint into aggregated RoomEndpoints.
REST Typings
packages/rest-typings/src/v1/rooms.ts
Removes the '/v1/rooms.delete' POST signature from public RoomsEndpoints.
Tests
apps/meteor/tests/end-to-end/api/rooms.ts
Adjusts rooms.delete missing-roomId test to expect errorType: "invalid-params" and an AJV-style message about the required roomId property; HTTP 400 and success: false remain.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

type: chore

🚥 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 accurately describes the main change: migrating rooms.delete endpoint to the new API format, which aligns with the primary objective of the changeset.
Linked Issues check ✅ Passed The PR meets all coding requirements: replaces deprecated addRoute with API.v1.post, adds AJV body validation, implements response validators (200/400/401), enables OpenAPI spec generation, improves typing via ExtractRoutesFromAPI, and updates tests for new validation error messages.
Out of Scope Changes check ✅ Passed All changes are directly related to migrating rooms.delete endpoint: endpoint refactoring in rooms.ts, type definitions removal in rest-typings, and test updates for validation changes—no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 2 files

Copy link
Copy Markdown
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.

🧹 Nitpick comments (2)
apps/meteor/app/api/server/v1/rooms.ts (2)

156-176: Inconsistent error class: MeteorError vs Meteor.Error

Line 162 throws MeteorError (from @rocket.chat/core-services) while line 168 throws Meteor.Error. Every other handler in this file uses Meteor.Error. Pick one for consistency within the handler—Meteor.Error aligns with the rest of the file.

Proposed fix
 		if (!room) {
-			throw new MeteorError('error-invalid-room', 'Invalid room', {
+			throw new Meteor.Error('error-invalid-room', 'Invalid room', {
 				method: 'eraseRoom',
 			});
 		}

159-165: Redundant room existence check — eraseRoom already validates this.

Per the eraseRoom implementation in apps/meteor/server/lib/eraseRoom.ts, it resolves the room from an ID, checks existence, and throws 'error-invalid-room' if not found. The null check here duplicates that. The lookup itself is still needed for the teamMain guard on line 167, but the explicit "not found" throw (lines 161-165) could be removed without behavior change.

Not blocking—just noting the duplication. The explicit check does give a slightly earlier/clearer error path.

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02630d2 and 90d3804.

📒 Files selected for processing (1)
  • apps/meteor/app/api/server/v1/rooms.ts
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

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

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/app/api/server/v1/rooms.ts
🧠 Learnings (4)
📚 Learning: 2025-11-27T17:56:26.050Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37557
File: apps/meteor/client/views/admin/ABAC/AdminABACRooms.tsx:115-116
Timestamp: 2025-11-27T17:56:26.050Z
Learning: In Rocket.Chat, the GET /v1/abac/rooms endpoint (implemented in ee/packages/abac/src/index.ts) only returns rooms where abacAttributes exists and is not an empty array (query: { abacAttributes: { $exists: true, $ne: [] } }). Therefore, in components consuming this endpoint (like AdminABACRooms.tsx), room.abacAttributes is guaranteed to be defined for all returned rooms, and optional chaining before calling array methods like .join() is sufficient without additional null coalescing.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2025-10-28T16:53:42.761Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2025-09-16T13:33:49.237Z
Learnt from: cardoso
Repo: RocketChat/Rocket.Chat PR: 36890
File: apps/meteor/tests/e2e/e2e-encryption/e2ee-otr.spec.ts:21-26
Timestamp: 2025-09-16T13:33:49.237Z
Learning: In Rocket.Chat test files, the im.delete API endpoint accepts either a `roomId` parameter (requiring the actual DM room _id) or a `username` parameter (for the DM partner's username). It does not accept slug-like constructions such as concatenating usernames together.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2025-09-16T13:33:49.237Z
Learnt from: cardoso
Repo: RocketChat/Rocket.Chat PR: 36890
File: apps/meteor/tests/e2e/e2e-encryption/e2ee-otr.spec.ts:21-26
Timestamp: 2025-09-16T13:33:49.237Z
Learning: The im.delete API endpoint accepts either a `roomId` parameter (requiring the actual DM room _id) or a `username` parameter (for the DM partner's username). Constructing slug-like identifiers like `user2${Users.userE2EE.data.username}` doesn't work for this endpoint.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
🧬 Code graph analysis (1)
apps/meteor/app/api/server/v1/rooms.ts (2)
apps/meteor/server/lib/eraseRoom.ts (1)
  • eraseRoom (11-59)
apps/meteor/app/api/server/ApiClass.ts (1)
  • ExtractRoutesFromAPI (74-78)
🔇 Additional comments (2)
apps/meteor/app/api/server/v1/rooms.ts (2)

124-177: Overall migration looks correct and follows the established pattern.

The new endpoint mirrors the structure of roomInviteEndpoints (AJV body/response schemas, action handler, type registration). Schema, auth, and response contracts are consistent.


1122-1124: Type union extension looks correct.

The RoomEndpoints type properly includes the new roomDeleteEndpoint via ExtractRoutesFromAPI, matching the established pattern.

@Rohitgiri02
Copy link
Copy Markdown
Contributor Author

on running e2e test i am getting an error regarding the 'roomid' not provided. In the previous version of the api were expecting The 'roomId' param is required error but since we are migrating it should use new ajv validation error "must have required property 'roomId'". my question is do we need to modify the test first to migrate to new api format

- Replace deprecated addRoute with chained .post() method
- Add body validation using ajv.compile for roomId
- Add response schemas for 200, 400, 401 status codes
- Register types via ExtractRoutesFromAPI and declare module
- Enable automatic OpenAPI spec generation for rooms.delete
@Rohitgiri02 Rohitgiri02 force-pushed the migrate/rooms-delete-to-new-api-format branch from f4900ec to cdd20fb Compare February 22, 2026 08:59
@Rohitgiri02
Copy link
Copy Markdown
Contributor Author

on running e2e test i am getting an error regarding the 'roomid' not provided. In the previous version of the api were expecting The 'roomId' param is required error but since we are migrating it should use new ajv validation error "must have required property 'roomId'". my question is do we need to modify the test first to migrate to new api format

for now i have updated the test also to accept new format

Copy link
Copy Markdown
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.

🧹 Nitpick comments (1)
apps/meteor/app/api/server/v1/rooms.ts (1)

162-170: Inconsistent error constructors: MeteorError vs Meteor.Error.

Line 162 throws MeteorError (from @rocket.chat/core-services), while line 168 throws Meteor.Error (from meteor/meteor) — two different constructors, two consecutive guard blocks. Both should use the same class.

♻️ Normalize to `MeteorError`
-		throw new Meteor.Error('error-cannot-delete-team-channel', 'Cannot delete a team channel', {
+		throw new MeteorError('error-cannot-delete-team-channel', 'Cannot delete a team channel', {
 			method: 'eraseRoom',
 		});
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/meteor/app/api/server/v1/rooms.ts` around lines 162 - 170, The two
consecutive guards in eraseRoom use different error constructors (MeteorError vs
Meteor.Error); change the second throw (the one that currently uses
Meteor.Error('error-cannot-delete-team-channel', ...)) to use the same
MeteorError class used earlier so both throws call
MeteorError('error-cannot-delete-team-channel', 'Cannot delete a team channel',
{ method: 'eraseRoom' }); ensure the import/usage for MeteorError (the symbol
MeteorError) is present and remove/replace any Meteor.Error usage in this
function to keep them consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/meteor/app/api/server/v1/rooms.ts`:
- Around line 162-170: The two consecutive guards in eraseRoom use different
error constructors (MeteorError vs Meteor.Error); change the second throw (the
one that currently uses Meteor.Error('error-cannot-delete-team-channel', ...))
to use the same MeteorError class used earlier so both throws call
MeteorError('error-cannot-delete-team-channel', 'Cannot delete a team channel',
{ method: 'eraseRoom' }); ensure the import/usage for MeteorError (the symbol
MeteorError) is present and remove/replace any Meteor.Error usage in this
function to keep them consistent.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4e45b73 and 5c3de86.

📒 Files selected for processing (2)
  • apps/meteor/app/api/server/v1/rooms.ts
  • packages/rest-typings/src/v1/rooms.ts
💤 Files with no reviewable changes (1)
  • packages/rest-typings/src/v1/rooms.ts
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js}

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

**/*.{ts,tsx,js}: Write concise, technical TypeScript/JavaScript with accurate typing in Playwright tests
Avoid code comments in the implementation

Files:

  • apps/meteor/app/api/server/v1/rooms.ts
🧠 Learnings (7)
📓 Common learnings
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 38974
File: apps/meteor/app/api/server/v1/im.ts:220-221
Timestamp: 2026-02-24T19:09:01.522Z
Learning: In RocketChat/Rocket.Chat OpenAPI migration PRs for apps/meteor/app/api/server/v1 endpoints, maintainers prefer to avoid any logic changes; style-only cleanups (like removing inline comments) may be deferred to follow-ups to keep scope tight.
Learnt from: ggazzo
Repo: RocketChat/Rocket.Chat PR: 35995
File: apps/meteor/app/api/server/v1/rooms.ts:1107-1112
Timestamp: 2026-02-23T17:53:06.802Z
Learning: In Rocket.Chat PR reviews, maintain strict scope boundaries—when a PR is focused on a specific endpoint (e.g., rooms.favorite), avoid reviewing or suggesting changes to other endpoints that were incidentally refactored (e.g., rooms.invite) unless explicitly requested by maintainers.
📚 Learning: 2025-11-27T17:56:26.050Z
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37557
File: apps/meteor/client/views/admin/ABAC/AdminABACRooms.tsx:115-116
Timestamp: 2025-11-27T17:56:26.050Z
Learning: In Rocket.Chat, the GET /v1/abac/rooms endpoint (implemented in ee/packages/abac/src/index.ts) only returns rooms where abacAttributes exists and is not an empty array (query: { abacAttributes: { $exists: true, $ne: [] } }). Therefore, in components consuming this endpoint (like AdminABACRooms.tsx), room.abacAttributes is guaranteed to be defined for all returned rooms, and optional chaining before calling array methods like .join() is sufficient without additional null coalescing.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2026-02-24T19:09:01.522Z
Learnt from: ahmed-n-abdeltwab
Repo: RocketChat/Rocket.Chat PR: 38974
File: apps/meteor/app/api/server/v1/im.ts:220-221
Timestamp: 2026-02-24T19:09:01.522Z
Learning: In Rocket.Chat OpenAPI migration PRs for endpoints under apps/meteor/app/api/server/v1, avoid introducing logic changes. Only perform scope-tight changes that preserve behavior; style-only cleanups (e.g., removing inline comments) may be deferred to follow-ups to keep the migration PR focused.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2025-10-28T16:53:42.761Z
Learnt from: ricardogarim
Repo: RocketChat/Rocket.Chat PR: 37205
File: ee/packages/federation-matrix/src/FederationMatrix.ts:296-301
Timestamp: 2025-10-28T16:53:42.761Z
Learning: In the Rocket.Chat federation-matrix integration (ee/packages/federation-matrix/), the createRoom method from rocket.chat/federation-sdk will support a 4-argument signature (userId, roomName, visibility, displayName) in newer versions. Code using this 4-argument call is forward-compatible with planned library updates and should not be flagged as an error.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2025-09-16T13:33:49.237Z
Learnt from: cardoso
Repo: RocketChat/Rocket.Chat PR: 36890
File: apps/meteor/tests/e2e/e2e-encryption/e2ee-otr.spec.ts:21-26
Timestamp: 2025-09-16T13:33:49.237Z
Learning: The im.delete API endpoint accepts either a `roomId` parameter (requiring the actual DM room _id) or a `username` parameter (for the DM partner's username). Constructing slug-like identifiers like `user2${Users.userE2EE.data.username}` doesn't work for this endpoint.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2025-09-16T13:33:49.237Z
Learnt from: cardoso
Repo: RocketChat/Rocket.Chat PR: 36890
File: apps/meteor/tests/e2e/e2e-encryption/e2ee-otr.spec.ts:21-26
Timestamp: 2025-09-16T13:33:49.237Z
Learning: In Rocket.Chat test files, the im.delete API endpoint accepts either a `roomId` parameter (requiring the actual DM room _id) or a `username` parameter (for the DM partner's username). It does not accept slug-like constructions such as concatenating usernames together.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
📚 Learning: 2026-02-23T17:53:06.802Z
Learnt from: ggazzo
Repo: RocketChat/Rocket.Chat PR: 35995
File: apps/meteor/app/api/server/v1/rooms.ts:1107-1112
Timestamp: 2026-02-23T17:53:06.802Z
Learning: During PR reviews that touch endpoint files under apps/meteor/app/api/server/v1, enforce strict scope: if a PR targets a specific endpoint (e.g., rooms.favorite), do not propose changes to unrelated endpoints (e.g., rooms.invite) unless maintainers explicitly request them. Focus feedback on the touched endpoint's behavior, API surface, and related tests; avoid broad cross-endpoint changes in the same PR unless requested.

Applied to files:

  • apps/meteor/app/api/server/v1/rooms.ts
🔇 Additional comments (2)
apps/meteor/app/api/server/v1/rooms.ts (2)

124-124: AI summary claims roomDeleteEndpoint is an exported constant, but it is declared without export.

Since it is only consumed within this file (typeof roomDeleteEndpoint in the RoomEndpoints type on line 1216), omitting export is functionally correct. However, for consistency with roomEndpoints (export const) and the stated PR objective, clarify whether the export is intentional or an oversight.


1214-1216: ⚠️ Potential issue | 🔴 Critical

roomInviteEndpoints is undefined and will cause a TypeScript compilation error.

Line 1215 references typeof roomInviteEndpoints in the type definition, but this identifier does not exist anywhere in the codebase. The similar identifiers roomEndpoints (line 1006) and roomDeleteEndpoint (line 124) are both properly defined, but roomInviteEndpoints is missing entirely. This should be either defined in the file or imported from elsewhere.

⛔ Skipped due to learnings
Learnt from: Dnouv
Repo: RocketChat/Rocket.Chat PR: 37057
File: packages/apps-engine/src/definition/accessors/IUserRead.ts:23-27
Timestamp: 2025-09-25T09:59:26.461Z
Learning: UserBridge.doGetUserRoomIds in packages/apps-engine/src/server/bridges/UserBridge.ts has a bug where it implicitly returns undefined when the app lacks read permission (missing return statement in the else case of the permission check).
Learnt from: ggazzo
Repo: RocketChat/Rocket.Chat PR: 35995
File: apps/meteor/app/api/server/v1/rooms.ts:1107-1112
Timestamp: 2026-02-23T17:53:06.802Z
Learning: In Rocket.Chat PR reviews, maintain strict scope boundaries—when a PR is focused on a specific endpoint (e.g., rooms.favorite), avoid reviewing or suggesting changes to other endpoints that were incidentally refactored (e.g., rooms.invite) unless explicitly requested by maintainers.
Learnt from: MartinSchoeler
Repo: RocketChat/Rocket.Chat PR: 37557
File: apps/meteor/client/views/admin/ABAC/AdminABACRooms.tsx:115-116
Timestamp: 2025-11-27T17:56:26.050Z
Learning: In Rocket.Chat, the GET /v1/abac/rooms endpoint (implemented in ee/packages/abac/src/index.ts) only returns rooms where abacAttributes exists and is not an empty array (query: { abacAttributes: { $exists: true, $ne: [] } }). Therefore, in components consuming this endpoint (like AdminABACRooms.tsx), room.abacAttributes is guaranteed to be defined for all returned rooms, and optional chaining before calling array methods like .join() is sufficient without additional null coalescing.
Learnt from: Dnouv
Repo: RocketChat/Rocket.Chat PR: 37057
File: packages/apps-engine/src/definition/accessors/IUserRead.ts:23-27
Timestamp: 2025-09-25T09:59:26.461Z
Learning: AppUserBridge.getUserRoomIds in apps/meteor/app/apps/server/bridges/users.ts always returns an array of strings (mapping subscription documents to room IDs), never undefined, even when user has no room subscriptions.
Learnt from: Dnouv
Repo: RocketChat/Rocket.Chat PR: 37057
File: packages/apps-engine/src/definition/accessors/IUserRead.ts:23-27
Timestamp: 2025-09-25T09:59:26.461Z
Learning: AppUserBridge.getUserRoomIds in apps/meteor/app/apps/server/bridges/users.ts always returns an array of strings by mapping subscription documents to room IDs, never undefined, even when user has no room subscriptions.
Learnt from: tassoevan
Repo: RocketChat/Rocket.Chat PR: 38219
File: packages/core-typings/src/cloud/Announcement.ts:5-6
Timestamp: 2026-01-17T01:51:47.764Z
Learning: In packages/core-typings/src/cloud/Announcement.ts, the AnnouncementSchema.createdBy field intentionally overrides IBannerSchema.createdBy (object with _id and optional username) with a string enum ['cloud', 'system'] to match existing runtime behavior. This is documented as technical debt with a FIXME comment at apps/meteor/app/cloud/server/functions/syncWorkspace/handleCommsSync.ts:53 and should not be flagged as an error until the runtime behavior is corrected.

@ggazzo ggazzo added this to the 8.3.0 milestone Feb 25, 2026
@ggazzo
Copy link
Copy Markdown
Member

ggazzo commented Feb 25, 2026

/jira ARCH-1935

@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Feb 25, 2026
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 25, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 70.60%. Comparing base (813d57a) to head (63493b7).
⚠️ Report is 81 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #38549      +/-   ##
===========================================
- Coverage    70.67%   70.60%   -0.07%     
===========================================
  Files         3190     3190              
  Lines       112740   112732       -8     
  Branches     20389    20411      +22     
===========================================
- Hits         79678    79598      -80     
- Misses       31014    31077      +63     
- Partials      2048     2057       +9     
Flag Coverage Δ
e2e 60.27% <ø> (-0.15%) ⬇️
e2e-api 47.77% <ø> (-1.05%) ⬇️
unit 71.24% <ø> (-0.02%) ⬇️

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.

@ggazzo
Copy link
Copy Markdown
Member

ggazzo commented Feb 25, 2026

Would you mind running the lint and ts tests on your machine before pushing? It would make our efforts much more effective.

@Rohitgiri02
Copy link
Copy Markdown
Contributor Author

Would you mind running the lint and ts tests on your machine before pushing? It would make our efforts much more effective.
Sure, I’ll run lint and typecheck tests locally before pushing. Thanks for the reminder!

@Rohitgiri02
Copy link
Copy Markdown
Contributor Author

Rohitgiri02 commented Feb 25, 2026

image

there was some issues previously in my local repo build but now i checked it locally first

@ggazzo ggazzo merged commit 1361a1f into RocketChat:develop Feb 27, 2026
64 of 66 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community 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: chore

Projects

Development

Successfully merging this pull request may close these issues.

4 participants