From 52efd37fd965e83485349efd23884a664e07b28d Mon Sep 17 00:00:00 2001 From: claude code agent 227 Date: Sat, 20 Jun 2026 20:10:09 +0300 Subject: [PATCH] fix(page-templates): import ThrottleModule into collab app so it boots PageTemplateController (added on this branch) guards its lookup/toggle routes with UserThrottlerGuard, which depends on the throttler options provided by ThrottleModule. CollaborationModule -> TransclusionModule registers that controller, and the collab server bootstraps CollabAppModule, which did not import ThrottleModule. The API server's AppModule does, so :3000 booted, but the collab server (:3001) crashed at startup with 'Nest can't resolve dependencies of the UserThrottlerGuard ... THROTTLER:MODULE_OPTIONS'. Without collab the editor can't sync, so live editing was broken on this branch. Import ThrottleModule into CollabAppModule, mirroring AppModule, so the guard resolves in the collab process too. Co-Authored-By: Claude Opus 4.8 --- apps/server/src/collaboration/server/collab-app.module.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/server/src/collaboration/server/collab-app.module.ts b/apps/server/src/collaboration/server/collab-app.module.ts index 85738d1c..aaa9ffba 100644 --- a/apps/server/src/collaboration/server/collab-app.module.ts +++ b/apps/server/src/collaboration/server/collab-app.module.ts @@ -13,6 +13,11 @@ import { LoggerModule } from '../../common/logger/logger.module'; import { RedisModule } from '@nestjs-labs/nestjs-ioredis'; import { RedisConfigService } from '../../integrations/redis/redis-config.service'; import { CaslModule } from '../../core/casl/casl.module'; +// TransclusionModule (via CollaborationModule) registers PageTemplateController, +// whose UserThrottlerGuard needs the throttler options from ThrottleModule. The +// API server's AppModule imports it; the collab process must too or it fails to +// resolve THROTTLER:MODULE_OPTIONS at boot. +import { ThrottleModule } from '../../integrations/throttle/throttle.module'; import { CacheModule } from '@nestjs/cache-manager'; import KeyvRedis from '@keyv/redis'; @@ -22,6 +27,7 @@ import KeyvRedis from '@keyv/redis'; DatabaseModule, EnvironmentModule, CaslModule, + ThrottleModule, CollaborationModule, QueueModule, HealthModule,