From f73e2befab77d08f6c8a7d574cfad1469fef54ab Mon Sep 17 00:00:00 2001 From: Alex <55413326+AlexRubik@users.noreply.github.com> Date: Fri, 24 Apr 2026 12:22:24 -0700 Subject: [PATCH] refactor(access-intelligence): remove eager AccessIntelligenceModule import from AppModule (#20305) AccessIntelligenceModule was imported in both AppModule (eager) and OrganizationsRoutingModule (lazy via loadChildren). The eager import made all module-scoped providers application-scoped singletons, defeating lazy loading and preventing module-scoped service destruction when the user navigates away from /organizations/:id/access-intelligence. Remove the eager import so Angular honors the existing lazy route and scopes providers to the feature-module injector. This matches the pattern already used by OrganizationIntegrationsModule in the same routing module. [PM-26417] --- bitwarden_license/bit-web/src/app/app.module.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/bitwarden_license/bit-web/src/app/app.module.ts b/bitwarden_license/bit-web/src/app/app.module.ts index e9696a4549f..d034a0a1131 100644 --- a/bitwarden_license/bit-web/src/app/app.module.ts +++ b/bitwarden_license/bit-web/src/app/app.module.ts @@ -17,7 +17,6 @@ import { OrganizationsModule } from "./admin-console/organizations/organizations import { bitPolicyEditRegister } from "./admin-console/policies"; import { AppRoutingModule } from "./app-routing.module"; import { AppComponent } from "./app.component"; -import { AccessIntelligenceModule } from "./dirt/access-intelligence/access-intelligence.module"; /** * This is the AppModule for the commercial version of Bitwarden. @@ -38,7 +37,6 @@ import { AccessIntelligenceModule } from "./dirt/access-intelligence/access-inte AppRoutingModule, OssRoutingModule, OrganizationsModule, // Must be after OssRoutingModule for competing routes to resolve properly - AccessIntelligenceModule, RouterModule, WildcardRoutingModule, // Needs to be last to catch all non-existing routes ],