Skip to content

chore: reorganize backend folder structure — Phase 2 (external bridges) - #41115

Merged
ggazzo merged 1 commit into
developfrom
backend-restructure-phase2
Jun 30, 2026
Merged

chore: reorganize backend folder structure — Phase 2 (external bridges)#41115
ggazzo merged 1 commit into
developfrom
backend-restructure-phase2

Conversation

@sampaiodiego

@sampaiodiego sampaiodiego commented Jun 30, 2026

Copy link
Copy Markdown
Member

Summary

  • Moves the 5 external bridge modules from app/*/server/ into server/bridges/, with corrected relative imports
  • Updates the only 3 external importers (server/importPackages.ts, server/configuration/configureIRC.ts, app/file-upload/ufs/Webdav/server.ts) in the same commit
  • Relocates the irc and webdav READMEs alongside their migrated code

This is Phase 2 of the broader backend reorganization (see apps/meteor/MIGRATION_PLAN.md) that consolidates app/*/server/ modules into server/ following a responsibility-first folder structure. Bridges are leaf nodes — they import from core but nothing imports from them — making them low-risk. Files move as-is; no logic changes.

app/apps/server/ (Apps-Engine bridges) is explicitly out of scope and untouched, per the migration plan.

Moved modules

Source Destination
app/irc/server/ server/bridges/irc/
app/slackbridge/server/ server/bridges/slack/
app/smarsh-connector/server/ server/bridges/smarsh/
app/webdav/server/ server/bridges/webdav/
app/nextcloud/server/ server/bridges/nextcloud/

app/slackbridge/'s client/ and tests/ (and its README) stay in place — client code is out of scope for this backend migration.

Notes

  • Performed with the disposable migration scripts from Phase 1 (scripts/migration/move-batch.mjs + a new phase2-bridges.tsv manifest), then verified with verify-no-old-imports.mjs.
  • The irc module used a few unusual long-form self-imports (../../../../app/irc/server/...) that the move script doesn't rewrite; these were caught by verify-no-old-imports.mjs and fixed by hand to short relative paths. import/order was auto-fixed.

Test plan

  • No imports reference old app/{irc,slackbridge,smarsh-connector,webdav,nextcloud}/server paths (verify-no-old-imports.mjs clean)
  • yarn lint --quiet passes
  • Git history preserved for moved files (git log --follow)
  • Smoke-test bridges where feasible (incoming Slack/webhook, WebDAV file upload)

Review in cubic

Summary by CodeRabbit

  • Refactor

    • Updated several server bridge integrations to use the current shared module structure, keeping behavior the same.
    • Improved consistency across messaging, file upload, and external service connectors.
  • Bug Fixes

    • Reduced the risk of runtime issues caused by outdated internal module references.
    • Helped maintain reliable startup and bridge initialization across supported integrations.

Task: ARCH-2238

Move the 5 external bridge modules from app/*/server/ into server/bridges/:

  app/irc/server/              -> server/bridges/irc/
  app/slackbridge/server/      -> server/bridges/slack/
  app/smarsh-connector/server/ -> server/bridges/smarsh/
  app/webdav/server/           -> server/bridges/webdav/
  app/nextcloud/server/        -> server/bridges/nextcloud/

Files move as-is; only import paths change. External importers
(importPackages.ts, configureIRC.ts, file-upload Webdav store) updated
in the same commit. READMEs for the fully-migrated irc and webdav bridges
relocated alongside their code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sampaiodiego
sampaiodiego requested a review from a team as a code owner June 30, 2026 15:26
@dionisio-bot

dionisio-bot Bot commented Jun 30, 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
  • This PR is missing the required milestone or project

Please fix the issues and try again

If you have any trouble, please check the PR guidelines

@changeset-bot

changeset-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2bf97b1

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 Jun 30, 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

Run ID: f66f89d1-da33-4a2e-b860-119811c0d6fa

📥 Commits

Reviewing files that changed from the base of the PR and between a158ae7 and 2bf97b1.

⛔ Files ignored due to path filters (1)
  • apps/meteor/scripts/migration/phase2-bridges.tsv is excluded by !**/*.tsv
📒 Files selected for processing (53)
  • apps/meteor/app/file-upload/ufs/Webdav/server.ts
  • apps/meteor/server/bridges/irc/README.md
  • apps/meteor/server/bridges/irc/index.ts
  • apps/meteor/server/bridges/irc/irc-bridge/index.js
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/index.ts
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onCreateRoom.js
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onCreateUser.js
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onJoinRoom.js
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onLeaveRoom.js
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onLogin.js
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onLogout.js
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onSaveMessage.js
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/disconnected.js
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/index.ts
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/joinedChannel.js
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/leftChannel.js
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/nickChanged.js
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/sentMessage.js
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/userRegistered.js
  • apps/meteor/server/bridges/irc/methods/resetIrcConnection.ts
  • apps/meteor/server/bridges/irc/servers/RFC2813/codes.js
  • apps/meteor/server/bridges/irc/servers/RFC2813/index.js
  • apps/meteor/server/bridges/irc/servers/RFC2813/localCommandHandlers.js
  • apps/meteor/server/bridges/irc/servers/RFC2813/parseMessage.js
  • apps/meteor/server/bridges/irc/servers/RFC2813/peerCommandHandlers.js
  • apps/meteor/server/bridges/irc/servers/index.ts
  • apps/meteor/server/bridges/nextcloud/addWebdavServer.ts
  • apps/meteor/server/bridges/nextcloud/index.ts
  • apps/meteor/server/bridges/nextcloud/lib.ts
  • apps/meteor/server/bridges/slack/RocketAdapter.ts
  • apps/meteor/server/bridges/slack/SlackAPI.ts
  • apps/meteor/server/bridges/slack/SlackAdapter.ts
  • apps/meteor/server/bridges/slack/index.ts
  • apps/meteor/server/bridges/slack/logger.ts
  • apps/meteor/server/bridges/slack/removeChannelLinks.ts
  • apps/meteor/server/bridges/slack/slackbridge.ts
  • apps/meteor/server/bridges/slack/slackbridge_import.server.ts
  • apps/meteor/server/bridges/smarsh/functions/generateEml.ts
  • apps/meteor/server/bridges/smarsh/functions/sendEmail.ts
  • apps/meteor/server/bridges/smarsh/index.ts
  • apps/meteor/server/bridges/smarsh/startup.ts
  • apps/meteor/server/bridges/webdav/README.md
  • apps/meteor/server/bridges/webdav/index.ts
  • apps/meteor/server/bridges/webdav/lib/getWebdavCredentials.ts
  • apps/meteor/server/bridges/webdav/lib/uploadFileToWebdav.ts
  • apps/meteor/server/bridges/webdav/lib/webdavClientAdapter.ts
  • apps/meteor/server/bridges/webdav/methods/addWebdavAccount.ts
  • apps/meteor/server/bridges/webdav/methods/getFileFromWebdav.ts
  • apps/meteor/server/bridges/webdav/methods/getWebdavFileList.ts
  • apps/meteor/server/bridges/webdav/methods/getWebdavFilePreview.ts
  • apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts
  • apps/meteor/server/configuration/configureIRC.ts
  • apps/meteor/server/importPackages.ts
📜 Recent review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: 📦 Build Packages
  • GitHub Check: cubic · AI code reviewer
  • GitHub Check: CodeQL-Build
  • GitHub Check: Hacktron Security Check
  • GitHub Check: CodeQL-Build
🧰 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/server/bridges/irc/irc-bridge/peerHandlers/joinedChannel.js
  • apps/meteor/server/bridges/webdav/methods/getWebdavFileList.ts
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/leftChannel.js
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/userRegistered.js
  • apps/meteor/server/bridges/nextcloud/addWebdavServer.ts
  • apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onSaveMessage.js
  • apps/meteor/server/bridges/nextcloud/lib.ts
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/sentMessage.js
  • apps/meteor/server/bridges/slack/slackbridge.ts
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/nickChanged.js
  • apps/meteor/server/bridges/smarsh/startup.ts
  • apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts
  • apps/meteor/server/bridges/slack/removeChannelLinks.ts
  • apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/disconnected.js
  • apps/meteor/server/bridges/webdav/methods/addWebdavAccount.ts
  • apps/meteor/server/bridges/smarsh/functions/generateEml.ts
  • apps/meteor/app/file-upload/ufs/Webdav/server.ts
  • apps/meteor/server/bridges/webdav/methods/getFileFromWebdav.ts
  • apps/meteor/server/bridges/smarsh/functions/sendEmail.ts
  • apps/meteor/server/configuration/configureIRC.ts
  • apps/meteor/server/bridges/slack/RocketAdapter.ts
  • apps/meteor/server/bridges/irc/methods/resetIrcConnection.ts
  • apps/meteor/server/importPackages.ts
  • apps/meteor/server/bridges/slack/SlackAdapter.ts
  • apps/meteor/server/bridges/webdav/methods/getWebdavFilePreview.ts
  • apps/meteor/server/bridges/slack/slackbridge_import.server.ts
  • apps/meteor/server/bridges/irc/irc-bridge/index.js
🧠 Learnings (3)
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In the Rocket.Chat repository, do not reference Biome lint rules in code review feedback. Biome is not used even if biome.json exists; only reference Biome rules if there is explicit, project-wide usage documented. For TypeScript files, review lint implications without Biome guidance unless the project enables Biome rules.

Applied to files:

  • apps/meteor/server/bridges/webdav/methods/getWebdavFileList.ts
  • apps/meteor/server/bridges/nextcloud/addWebdavServer.ts
  • apps/meteor/server/bridges/nextcloud/lib.ts
  • apps/meteor/server/bridges/slack/slackbridge.ts
  • apps/meteor/server/bridges/smarsh/startup.ts
  • apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts
  • apps/meteor/server/bridges/slack/removeChannelLinks.ts
  • apps/meteor/server/bridges/webdav/methods/addWebdavAccount.ts
  • apps/meteor/server/bridges/smarsh/functions/generateEml.ts
  • apps/meteor/app/file-upload/ufs/Webdav/server.ts
  • apps/meteor/server/bridges/webdav/methods/getFileFromWebdav.ts
  • apps/meteor/server/bridges/smarsh/functions/sendEmail.ts
  • apps/meteor/server/configuration/configureIRC.ts
  • apps/meteor/server/bridges/slack/RocketAdapter.ts
  • apps/meteor/server/bridges/irc/methods/resetIrcConnection.ts
  • apps/meteor/server/importPackages.ts
  • apps/meteor/server/bridges/slack/SlackAdapter.ts
  • apps/meteor/server/bridges/webdav/methods/getWebdavFilePreview.ts
  • apps/meteor/server/bridges/slack/slackbridge_import.server.ts
📚 Learning: 2026-02-26T19:25:44.063Z
Learnt from: gabriellsh
Repo: RocketChat/Rocket.Chat PR: 38778
File: packages/ui-voip/src/providers/useMediaSession.ts:192-192
Timestamp: 2026-02-26T19:25:44.063Z
Learning: In this repository (RocketChat/Rocket.Chat), Biome lint rules are not used even if a biome.json exists. When reviewing TypeScript files (e.g., packages/ui-voip/src/providers/useMediaSession.ts), ensure lint suggestions do not reference Biome-specific rules. Rely on general ESLint/TypeScript lint rules and project conventions instead.

Applied to files:

  • apps/meteor/server/bridges/webdav/methods/getWebdavFileList.ts
  • apps/meteor/server/bridges/nextcloud/addWebdavServer.ts
  • apps/meteor/server/bridges/nextcloud/lib.ts
  • apps/meteor/server/bridges/slack/slackbridge.ts
  • apps/meteor/server/bridges/smarsh/startup.ts
  • apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts
  • apps/meteor/server/bridges/slack/removeChannelLinks.ts
  • apps/meteor/server/bridges/webdav/methods/addWebdavAccount.ts
  • apps/meteor/server/bridges/smarsh/functions/generateEml.ts
  • apps/meteor/app/file-upload/ufs/Webdav/server.ts
  • apps/meteor/server/bridges/webdav/methods/getFileFromWebdav.ts
  • apps/meteor/server/bridges/smarsh/functions/sendEmail.ts
  • apps/meteor/server/configuration/configureIRC.ts
  • apps/meteor/server/bridges/slack/RocketAdapter.ts
  • apps/meteor/server/bridges/irc/methods/resetIrcConnection.ts
  • apps/meteor/server/importPackages.ts
  • apps/meteor/server/bridges/slack/SlackAdapter.ts
  • apps/meteor/server/bridges/webdav/methods/getWebdavFilePreview.ts
  • apps/meteor/server/bridges/slack/slackbridge_import.server.ts
📚 Learning: 2026-05-06T12:21:44.083Z
Learnt from: juliajforesti
Repo: RocketChat/Rocket.Chat PR: 40256
File: apps/meteor/client/components/CreateDiscussion/CreateDiscussion.tsx:121-149
Timestamp: 2026-05-06T12:21:44.083Z
Learning: Field wrappers in rocket.chat/fuselage-forms (Field, FieldLabel, FieldRow, FieldError, FieldHint) auto-create htmlFor/id associations, aria-describedby, and role="alert" for errors. Do not manually set htmlFor, id, aria-describedby, or role attributes when using these wrappers. This automatic wiring does not apply to plain rocket.chat/fuselage components, which require explicit ID wiring per the accessibility docs. In code reviews, prefer using fuselage-forms wrappers for form fields and verify there is no unnecessary manual ID/aria wiring in files that use these wrappers. If a component uses plain fuselage components, ensure proper id wiring as per docs.

Applied to files:

  • apps/meteor/server/bridges/webdav/methods/getWebdavFileList.ts
  • apps/meteor/server/bridges/nextcloud/addWebdavServer.ts
  • apps/meteor/server/bridges/nextcloud/lib.ts
  • apps/meteor/server/bridges/slack/slackbridge.ts
  • apps/meteor/server/bridges/smarsh/startup.ts
  • apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts
  • apps/meteor/server/bridges/slack/removeChannelLinks.ts
  • apps/meteor/server/bridges/webdav/methods/addWebdavAccount.ts
  • apps/meteor/server/bridges/smarsh/functions/generateEml.ts
  • apps/meteor/app/file-upload/ufs/Webdav/server.ts
  • apps/meteor/server/bridges/webdav/methods/getFileFromWebdav.ts
  • apps/meteor/server/bridges/smarsh/functions/sendEmail.ts
  • apps/meteor/server/configuration/configureIRC.ts
  • apps/meteor/server/bridges/slack/RocketAdapter.ts
  • apps/meteor/server/bridges/irc/methods/resetIrcConnection.ts
  • apps/meteor/server/importPackages.ts
  • apps/meteor/server/bridges/slack/SlackAdapter.ts
  • apps/meteor/server/bridges/webdav/methods/getWebdavFilePreview.ts
  • apps/meteor/server/bridges/slack/slackbridge_import.server.ts
🪛 Biome (2.5.1)
apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/joinedChannel.js

[error] 3-3: Illegal use of an import declaration outside of a module

(parse)


[error] 4-4: Illegal use of an import declaration outside of a module

(parse)

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/leftChannel.js

[error] 3-3: Illegal use of an import declaration outside of a module

(parse)

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/userRegistered.js

[error] 3-3: Illegal use of an import declaration outside of a module

(parse)

apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onSaveMessage.js

[error] 3-3: Illegal use of an import declaration outside of a module

(parse)

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/sentMessage.js

[error] 3-3: Illegal use of an import declaration outside of a module

(parse)


[error] 4-4: Illegal use of an import declaration outside of a module

(parse)

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/nickChanged.js

[error] 3-3: Illegal use of an import declaration outside of a module

(parse)

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/disconnected.js

[error] 3-3: Illegal use of an import declaration outside of a module

(parse)

apps/meteor/server/bridges/irc/irc-bridge/index.js

[error] 6-6: Illegal use of an import declaration outside of a module

(parse)


[error] 7-7: Illegal use of an import declaration outside of a module

(parse)


[error] 8-8: Illegal use of an import declaration outside of a module

(parse)


[error] 9-9: Illegal use of an import declaration outside of a module

(parse)


[error] 10-10: Illegal use of an import declaration outside of a module

(parse)


[error] 11-11: Illegal use of an import declaration outside of a module

(parse)

🔇 Additional comments (27)
apps/meteor/server/importPackages.ts (1)

34-34: LGTM!

Also applies to: 43-47, 65-69

apps/meteor/server/bridges/slack/slackbridge.ts (1)

11-11: LGTM!

apps/meteor/server/bridges/slack/slackbridge_import.server.ts (1)

10-12: LGTM!

apps/meteor/server/bridges/slack/removeChannelLinks.ts (1)

5-6: LGTM!

apps/meteor/server/bridges/slack/RocketAdapter.ts (1)

15-20: LGTM!

apps/meteor/server/bridges/slack/SlackAdapter.ts (1)

19-30: LGTM!

apps/meteor/server/bridges/nextcloud/addWebdavServer.ts (1)

3-6: LGTM!

apps/meteor/server/bridges/nextcloud/lib.ts (1)

5-6: LGTM!

apps/meteor/app/file-upload/ufs/Webdav/server.ts (1)

7-7: LGTM!

apps/meteor/server/bridges/webdav/methods/addWebdavAccount.ts (1)

8-8: LGTM!

apps/meteor/server/bridges/smarsh/functions/sendEmail.ts (1)

9-11: LGTM!

apps/meteor/server/bridges/smarsh/startup.ts (1)

4-5: LGTM!

apps/meteor/server/bridges/webdav/methods/getFileFromWebdav.ts (1)

6-6: LGTM!

apps/meteor/server/bridges/webdav/methods/getWebdavFileList.ts (1)

6-6: LGTM!

apps/meteor/server/bridges/webdav/methods/getWebdavFilePreview.ts (1)

7-7: LGTM!

apps/meteor/server/bridges/webdav/methods/uploadFileToWebdav.ts (1)

8-8: LGTM!

apps/meteor/server/bridges/smarsh/functions/generateEml.ts (1)

7-8: LGTM!

apps/meteor/server/configuration/configureIRC.ts (1)

4-4: LGTM!

apps/meteor/server/bridges/irc/irc-bridge/index.js (1)

6-11: LGTM!

apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onSaveMessage.js (1)

3-3: LGTM!

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/userRegistered.js (1)

3-3: LGTM!

apps/meteor/server/bridges/irc/methods/resetIrcConnection.ts (1)

5-8: LGTM!

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/disconnected.js (1)

3-3: LGTM!

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/joinedChannel.js (1)

3-4: LGTM!

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/leftChannel.js (1)

3-3: LGTM!

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/nickChanged.js (1)

3-3: LGTM!

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/sentMessage.js (1)

3-4: LGTM!


Walkthrough

Import paths across IRC, Slack, Nextcloud, Smarsh, and WebDAV bridge modules are updated to reference modules under server/bridges/ instead of app/*/server relative locations. The importPackages.ts entry points are updated to match. No runtime logic or exported API signatures change.

Changes

Bridge import path consolidation

Layer / File(s) Summary
Entry point rewiring
apps/meteor/server/importPackages.ts
Side-effect imports for IRC, Nextcloud, Slack, Smarsh, and WebDAV are switched from ../app/*/server to ./bridges/*.
IRC bridge imports
apps/meteor/server/configuration/configureIRC.ts, server/bridges/irc/irc-bridge/index.js, server/bridges/irc/irc-bridge/localHandlers/onSaveMessage.js, server/bridges/irc/irc-bridge/peerHandlers/*, server/bridges/irc/methods/resetIrcConnection.ts
Bridge, callbacks, loggers, notification helpers, and room functions are re-imported from updated relative paths under server/bridges/irc.
Slack bridge imports
server/bridges/slack/slackbridge.ts, server/bridges/slack/slackbridge_import.server.ts, server/bridges/slack/removeChannelLinks.ts, server/bridges/slack/RocketAdapter.ts, server/bridges/slack/SlackAdapter.ts
settings, callbacks, msgStream, slashCommands, i18n, and room/message helpers are re-imported from ../../../app/... paths.
Nextcloud, WebDAV, and Smarsh bridge imports
server/bridges/nextcloud/*, server/bridges/webdav/methods/*, server/bridges/smarsh/functions/*, server/bridges/smarsh/startup.ts, app/file-upload/ufs/Webdav/server.ts
settings, i18n, Mailer, CustomOAuth, WebdavClientAdapter, and related helpers are re-imported from updated relative paths.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

type: chore

Suggested reviewers

  • KevLehman
  • ggazzo
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: reorganizing backend folder structure for the external bridge migration phase.
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.

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Biome (2.5.1)
apps/meteor/server/bridges/irc/irc-bridge/localHandlers/onSaveMessage.js

File contains syntax errors that prevent linting: Line 1: Illegal use of an import declaration outside of a module; Line 3: Illegal use of an import declaration outside of a module; Line 5: Illegal use of an export declaration outside of a module

apps/meteor/server/bridges/irc/irc-bridge/index.js

File contains syntax errors that prevent linting: Line 1: Illegal use of an import declaration outside of a module; Line 2: Illegal use of an import declaration outside of a module; Line 3: Illegal use of an import declaration outside of a module; Line 4: Illegal use of an import declaration outside of a module; Line 6: Illegal use of an import declaration outside of a module; Line 7: Illegal use of an import declaration outside of a module; Line 8: Illegal use of an import declaration outside of a module; Line 9: Illegal use of an import declaration outside of a module; Line 10: Illegal use of an import declaration outside of a module; Line 11: Illegal use of an import declaration outside of a module; Line 12: Illegal use of an import declaration outside of a module; Line 13: Illegal use of an import declaration outside of a module; Line 14: Illegal use of an import declaration outside of a module; Line 239: Illegal use of an export declaration outside of a module

apps/meteor/server/bridges/irc/irc-bridge/peerHandlers/disconnected.js

File contains syntax errors that prevent linting: Line 1: Illegal use of an import declaration outside of a module; Line 3: Illegal use of an import declaration outside of a module; Line 5: Illegal use of an export declaration outside of a module

  • 5 others

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.

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

Re-trigger cubic

@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.12%. Comparing base (a158ae7) to head (2bf97b1).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41115      +/-   ##
===========================================
- Coverage    69.84%   69.12%   -0.73%     
===========================================
  Files         3393     3433      +40     
  Lines       130748   132323    +1575     
  Branches     22776    23049     +273     
===========================================
+ Hits         91326    91470     +144     
- Misses       36071    37485    +1414     
- Partials      3351     3368      +17     
Flag Coverage Δ
e2e 59.32% <ø> (-0.02%) ⬇️
e2e-api 41.10% <ø> (-4.22%) ⬇️
unit 69.97% <ø> (+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.

@rc-layne

rc-layne Bot commented Jun 30, 2026

Copy link
Copy Markdown

Warning

These are security findings reported by the security scanners configured in Layne. Findings may contain false positives - review them and fix what makes sense.

Layne found 14 high issues in this PR.

View 14 finding(s)
Severity Scanner File Rule Description
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:16 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:44 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:71 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:92 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:117 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:131 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:145 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:159 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:172 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:186 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:199 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:214 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:229 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.
🟠 High semgrep apps/meteor/server/bridges/slack/SlackAPI.ts:242 app.config.semgrep.rules.rocketchat.ssrf-validation-bypass-without-justification SSRF validation is disabled. Ensure the URL is not user-controlled or is restricted to a known-safe allowlist.

@julio-rocketchat

Copy link
Copy Markdown
Member

/layne exception-approve LAYNE-40ff54ded49388a9 LAYNE-a03618bb043d0e60 LAYNE-dfa1044ca4ac93d5 LAYNE-c84a1219c89a6a64 LAYNE-a24dde934c022920 LAYNE-740fe4661e9634ba LAYNE-e2e5abcf124ff915 LAYNE-f3a64acc0efe0d91 LAYNE-fe41fedccfb015a4 LAYNE-3e3b9c3235001f53 LAYNE-f737280aba6ebe45 LAYNE-4140dbe675a2f1a4 LAYNE-13eea44db3398875 LAYNE-b63865b6b5ce7c50 reason: false positives

@rc-layne

rc-layne Bot commented Jun 30, 2026

Copy link
Copy Markdown

✅ Exception recorded for LAYNE-40ff54ded49388a9, LAYNE-a03618bb043d0e60, LAYNE-dfa1044ca4ac93d5, LAYNE-c84a1219c89a6a64, LAYNE-a24dde934c022920, LAYNE-740fe4661e9634ba, LAYNE-e2e5abcf124ff915, LAYNE-f3a64acc0efe0d91, LAYNE-fe41fedccfb015a4, LAYNE-3e3b9c3235001f53, LAYNE-f737280aba6ebe45, LAYNE-4140dbe675a2f1a4, LAYNE-13eea44db3398875, LAYNE-b63865b6b5ce7c50 by @julio-rocketchat: "false positives". Re-running scan...

@ggazzo
ggazzo merged commit 3001445 into develop Jun 30, 2026
83 of 85 checks passed
@ggazzo
ggazzo deleted the backend-restructure-phase2 branch June 30, 2026 17:08
@sampaiodiego

Copy link
Copy Markdown
Member Author

/jira ARCH-1539

@dionisio-bot

dionisio-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Dionisio (Jira)

The PR description was sent as plain text because Jira rejected the formatted body.

ggazzo added a commit that referenced this pull request Jul 27, 2026
The restructure (#40259, #41115, #41126, #41155, #41225, #41315, #41381)
moved API, settings, auth, notifications, integrations and slash-command
server code out of app/ into apps/meteor/server/ while this PR was open.
Update every path reference and fix related factual drift:

- app/api/server -> server/api (rest-endpoints, add-a-rest-endpoint,
  critical-flows, realtime-and-ddp, monorepo-layout, glossary)
- app/settings/server -> server/settings; fix settings import example
- sendMessage entry -> server/lib/messages/sendMessage.ts
- notifications streams -> server/modules/notifications; auth entry ->
  server/hooks/auth + server/lib/auth-providers
- slash commands: two registries (server/lib/utils + app/utils/client),
  server handlers in server/slashcommands/<name>/
- integrations -> server/lib/integrations + server/api/webhooks.ts
- ee/apps count 8 -> 6: stream-hub-service and federation-service do not
  exist; federation runs in-process (server/services/), noted
- module/package counts: ~100 -> ~37 app modules, 68 -> ~65 packages;
  drop nonexistent apps/docs workspace and string-helpers
- Yarn 4.12.0 -> 4.17.1 (getting-started, troubleshooting)
- Mongo troubleshooting: align with change-streams story; MONGO_OPLOG_URL
  is prod/ms-only; env vars must be shell-exported (no .env loader in dev)
- drop stale apps/meteor/.env.example pointer
- glossary proxify: models throw immediately; only core-services proxify
  waits/hangs
- useTranslation: teach react-i18next form ({ t }), ui-contexts one is
  deprecated; useUniqueId does not exist (use React useId); theming via
  useThemeMode in ui-client (no ui-theming package)
- remove Blaze bridge section: Blaze is fully removed
- add-a-rest-endpoint: add the mandatory side-effect import step in
  server/api/index.ts (endpoint silently never mounts without it)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants