chore: reorganize backend folder structure — Phase 2 (external bridges) - #41115
Conversation
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>
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (53)
📜 Recent review details⏰ Context from checks skipped due to timeout. (5)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx,js}📄 CodeRabbit inference engine (.cursor/rules/playwright.mdc)
Files:
🧠 Learnings (3)📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-02-26T19:25:44.063ZApplied to files:
📚 Learning: 2026-05-06T12:21:44.083ZApplied to files:
🪛 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)
WalkthroughImport paths across IRC, Slack, Nextcloud, Smarsh, and WebDAV bridge modules are updated to reference modules under ChangesBridge import path consolidation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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.jsFile 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.jsFile 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.jsFile 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
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
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)
|
|
/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 |
|
✅ 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... |
|
/jira ARCH-1539 |
|
The PR description was sent as plain text because Jira rejected the formatted body. |
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>
Summary
app/*/server/intoserver/bridges/, with corrected relative importsserver/importPackages.ts,server/configuration/configureIRC.ts,app/file-upload/ufs/Webdav/server.ts) in the same commitircandwebdavREADMEs alongside their migrated codeThis is Phase 2 of the broader backend reorganization (see
apps/meteor/MIGRATION_PLAN.md) that consolidatesapp/*/server/modules intoserver/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.Moved modules
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/'sclient/andtests/(and its README) stay in place — client code is out of scope for this backend migration.Notes
scripts/migration/move-batch.mjs+ a newphase2-bridges.tsvmanifest), then verified withverify-no-old-imports.mjs.ircmodule used a few unusual long-form self-imports (../../../../app/irc/server/...) that the move script doesn't rewrite; these were caught byverify-no-old-imports.mjsand fixed by hand to short relative paths.import/orderwas auto-fixed.Test plan
app/{irc,slackbridge,smarsh-connector,webdav,nextcloud}/serverpaths (verify-no-old-imports.mjsclean)yarn lint --quietpassesgit log --follow)Summary by CodeRabbit
Refactor
Bug Fixes
Task: ARCH-2238