Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
refac: remove unused code
adilson6ef99eb17a78
diff --git a/backend/src/services/integration/integration-deprecation-queue.ts b/backend/src/services/integration/integration-deprecation-queue.tsindex e8d909d77e..59ad598d78 100644--- a/backend/src/services/integration/integration-deprecation-queue.ts+++ b/backend/src/services/integration/integration-deprecation-queue.ts@@ -39,12 +39,22 @@ type TIntegrationDeprecationQueueFactoryDep = {export type TIntegrationDeprecationQueueFactory = ReturnType<typeof integrationDeprecationQueueFactory>;-const EMAIL_SUBJECT = "Action required: move your native integrations to Secret Syncs";+const EMAIL_SUBJECT = `Action required: Migrate Native Integrations by ${NATIVE_INTEGRATION_DEPRECATION_DATE}`;// the notification dropdown renders the title on a single ellipsised line next to a timestamp, so this// stays shorter than the subject line and front-loads the part that mattersconst NOTIFICATION_TITLE = `Native integrations stop working ${NATIVE_INTEGRATION_DEPRECATION_DATE}`;const NOTIFICATION_BODY = `Recreate your native integrations as Secret Syncs before ${NATIVE_INTEGRATION_DEPRECATION_DATE} to keep your secrets syncing.`;+// slug -> display name, built from static config; identical for every job, so computed once+let integrationNameBySlugCache: Map<string, string> | undefined;+const getIntegrationNameBySlug = async () => {+ if (!integrationNameBySlugCache) {+ const integrationOptions = await getIntegrationOptions();+ integrationNameBySlugCache = new Map(integrationOptions.map((option) => [option.slug, option.name]));+ }+ return integrationNameBySlugCache;+};+/*** Monthly nudge toward Secret Syncs for every org still holding native integrations.*@@ -77,47 +87,47 @@ export const integrationDeprecationQueueFactory = ({/** site-relative — see buildNativeIntegrationsPath */link?: string;}) => {- if (!recipients.length || !projects.length) return;+ if (!recipients.length) return;- // the worker can run long after the tick enqueued this job, and the caller sends several notices in- // sequence — re-check per notice so an org that migrated in the meantime stops hearing about it- if (!(await integrationDAL.hasIntegrationsByOrgId(orgId))) {- logger.info(`integrationDeprecationNotice: org no longer has native integrations, skipping [orgId=${orgId}]`);- return;- }+ const sendEmail = async () => {+ try {+ await smtpService.sendMail({+ template: SmtpTemplates.NativeIntegrationDeprecation,+ subjectLine: EMAIL_SUBJECT,+ recipients: recipients.map((recipient) => recipient.email),+ substitutions: {+ orgName,+ projects: projects.map((project) => ({+ name: project.projectName,+ integrations: project.integrations,+ url: buildNativeIntegrationsUrl(siteUrl, orgId, project.projectId)+ }))+ }+ });+ } catch (error) {+ logger.error(error, `integrationDeprecationNotice: failed to send email [orgId=${orgId}]`);+ }+ };- try {- await smtpService.sendMail({- template: SmtpTemplates.NativeIntegrationDeprecation,- subjectLine: EMAIL_SUBJECT,- recipients: recipients.map((recipient) => recipient.email),- substitutions: {- orgName,- projects: projects.map((project) => ({- name: project.projectName,- integrations: project.integrations,- url: buildNativeIntegrationsUrl(siteUrl, orgId, project.projectId)+ const createNotifications = async () => {+ try {+ await notificationService.createUserNotifications(+ recipients.map((recipient) => ({+ userId: recipient.userId,+ orgId,+ type: NotificationType.NATIVE_INTEGRATION_DEPRECATED,+ title: NOTIFICATION_TITLE,+ body: NOTIFICATION_BODY,+ link}))- }- });- } catch (error) {- logger.error(error, `integrationDeprecationNotice: failed to send email [orgId=${orgId}]`);- }+ );+ } catch (error) {+ logger.error(error, `integrationDeprecationNotice: failed to create notifications [orgId=${orgId}]`);+ }+ };- try {- await notificationService.createUserNotifications(- recipients.map((recipient) => ({- userId: recipient.userId,- orgId,- type: NotificationType.NATIVE_INTEGRATION_DEPRECATED,- title: NOTIFICATION_TITLE,- body: NOTIFICATION_BODY,- link- }))- );- } catch (error) {- logger.error(error, `integrationDeprecationNotice: failed to create notifications [orgId=${orgId}]`);- }+ // independent channels, each with its own error handling — one failing must not block the other+ await Promise.all([sendEmail(), createNotifications()]);};const sendOrgNotices = async ({ orgId, period }: { orgId: string; period: string }) => {@@ -135,24 +145,26 @@ export const integrationDeprecationQueueFactory = ({return;}- const rows = await integrationDAL.findProjectIntegrationsByOrgId(orgId);- if (!rows.length) return;+ const [hasIntegrations, rows, org, orgAdmins] = await Promise.all([+ integrationDAL.hasIntegrationsByOrgId(orgId),+ integrationDAL.findProjectIntegrationsByOrgId(orgId),+ orgDAL.findById(orgId),+ // findOrgMembersByRole includes members who were invited but never accepted+ orgDAL.findOrgMembersByRole(orgId, OrgMembershipRole.Admin)+ ]);- const integrationOptions = await getIntegrationOptions();- const integrationNameBySlug = new Map(integrationOptions.map((option) => [option.slug, option.name]));- const projects = groupIntegrationsByProject(rows, integrationNameBySlug);+ if (!hasIntegrations) {+ logger.info(`integrationDeprecationNotice: org no longer has native integrations, skipping [orgId=${orgId}]`);+ return;+ }+ if (!rows.length || !org) return;- const org = await orgDAL.findById(orgId);- if (!org) return;+ const projects = groupIntegrationsByProject(rows, await getIntegrationNameBySlug());- const [orgAdmins, projectAdmins] = await Promise.all([- // findOrgMembersByRole includes members who were invited but never accepted- orgDAL.findOrgMembersByRole(orgId, OrgMembershipRole.Admin),- projectMembershipDAL.findProjectMembersByProjectIds(- projects.map((project) => project.projectId),- { roles: [ProjectMembershipRole.Admin], orgId }- )- ]);+ const projectAdmins = await projectMembershipDAL.findProjectMembersByProjectIds(+ projects.map((project) => project.projectId),+ { roles: [ProjectMembershipRole.Admin], orgId }+ );const orgAdminRecipients = toRecipients(orgAdmins@@ -177,7 +189,8 @@ export const integrationDeprecationQueueFactory = ({);// then each project's admins get a notice scoped to their own project, minus anyone already reached above- for await (const project of projects) {+ for (const project of projects) {+ // eslint-disable-next-line no-await-in-loopawait notify(toRecipients(projectAdminsByProjectId[project.projectId] ?? [], orgAdminUserIds),[project],@@ -195,7 +208,7 @@ export const integrationDeprecationQueueFactory = ({cronJob.register({name: CronJobName.MonthlyNativeIntegrationDeprecationNotice,- pattern: "0 0 1 */3 *",+ pattern: "0 0 1 */3 *", // DO NOT FORGET TO UPDATE BEFORE MERGErunHashTtlS: 7 * 24 * 60 * 60,enabled: !appCfg.isSecondaryInstance,handler: async () => {@@ -212,18 +225,21 @@ export const integrationDeprecationQueueFactory = ({`cron[monthly-native-integration-deprecation-notice]: enqueuing [orgCount=${orgIds.length}] [period=${period}]`);- for await (const orgId of orgIds) {- await queueService.queue(- QueueName.IntegrationDeprecationNotice,- QueueJobs.SendIntegrationDeprecationNotice,- { orgId, period },- {- jobId: `integration-deprecation-notice-${orgId}-${period}`,- removeOnComplete: true,- removeOnFail: true- }- );- }+ // ioredis pipelines concurrent commands on one connection, so this is safe at any org count+ await Promise.all(+ orgIds.map((orgId) =>+ queueService.queue(+ QueueName.IntegrationDeprecationNotice,+ QueueJobs.SendIntegrationDeprecationNotice,+ { orgId, period },+ {+ jobId: `integration-deprecation-notice-${orgId}-${period}`,+ removeOnComplete: true,+ removeOnFail: true+ }+ )+ )+ );}});diff --git a/backend/src/services/integration/integration-service.ts b/backend/src/services/integration/integration-service.tsindex af66dcfd57..8eaeac96d5 100644--- a/backend/src/services/integration/integration-service.ts+++ b/backend/src/services/integration/integration-service.ts@@ -10,7 +10,6 @@ import {} from "@app/ee/services/permission/project-permission";import { NotFoundError } from "@app/lib/errors";import { TProjectPermission } from "@app/lib/types";-import { blockLocalAndPrivateIpAddresses } from "@app/lib/validator";import { TIntegrationAuthDALFactory } from "../integration-auth/integration-auth-dal";import { TIntegrationAuthServiceFactory } from "../integration-auth/integration-auth-service";@@ -27,7 +26,6 @@ import { TSecretImportDALFactory } from "../secret-import/secret-import-dal";import { TSecretV2BridgeDALFactory } from "../secret-v2-bridge/secret-v2-bridge-dal";import { TIntegrationDALFactory } from "./integration-dal";import {- TCreateIntegrationDTO,TDeleteIntegrationDTO,TGetIntegrationDTO,TSyncIntegrationDTO,@@ -67,92 +65,6 @@ export const integrationServiceFactory = ({projectFolderGrantDAL,orgDAL}: TIntegrationServiceFactoryDep) => {- const createIntegration = async ({- app,- actor,- actorOrgId,- path,- appId,- owner,- scope,- actorId,- region,- url,- isActive,- metadata,- secretPath,- targetService,- actorAuthMethod,- targetServiceId,- integrationAuthId,- sourceEnvironment,- targetEnvironment,- targetEnvironmentId- }: TCreateIntegrationDTO) => {- const integrationAuth = await integrationAuthDAL.findById(integrationAuthId);- if (!integrationAuth)- throw new NotFoundError({ message: `Integration auth with ID '${integrationAuthId}' not found` });-- const { permission } = await permissionService.getProjectPermission({- actor,- actorId,- projectId: integrationAuth.projectId,- actorAuthMethod,- actorOrgId,- actionProjectType: ActionProjectType.SecretManager- });- ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Create, ProjectPermissionSub.Integrations);-- throwIfMissingSecretReadValueOrDescribePermission(permission, ProjectPermissionSecretActions.ReadValue, {- environment: sourceEnvironment,- secretPath- });-- const folder = await folderDAL.findBySecretPath(integrationAuth.projectId, sourceEnvironment, secretPath);- if (!folder) {- throw new NotFoundError({- message: `Folder with path '${secretPath}' not found in environment with slug'${sourceEnvironment}'`- });- }-- if (url) {- await blockLocalAndPrivateIpAddresses(url);- }-- const integration = await integrationDAL.create({- envId: folder.envId,- secretPath,- isActive,- integrationAuthId,- targetEnvironmentId,- targetEnvironment,- targetServiceId,- targetService,- metadata,- region,- scope,- owner,- url,- appId,- path,- app,- integration: integrationAuth.integration- });-- await secretQueueService.syncIntegrations({- environment: sourceEnvironment,- secretPath,- projectId: integrationAuth.projectId- });- return {- integration: {- ...integration,- environment: folder.environment- },- integrationAuth- };- };-const updateIntegration = async ({actorId,actor,@@ -390,7 +302,6 @@ export const integrationServiceFactory = ({};return {- createIntegration,updateIntegration,deleteIntegration,listIntegrationByProject,diff --git a/backend/src/services/integration/integration-types.ts b/backend/src/services/integration/integration-types.tsindex f662affd81..e581e28565 100644--- a/backend/src/services/integration/integration-types.ts+++ b/backend/src/services/integration/integration-types.ts@@ -1,44 +1,5 @@import { TProjectPermission } from "@app/lib/types";-export type TCreateIntegrationDTO = {- secretPath: string;- integrationAuthId: string;- app?: string;- isActive: boolean;- appId?: string;- sourceEnvironment: string;- targetEnvironment?: string;- targetEnvironmentId?: string;- targetService?: string;- targetServiceId?: string;- owner?: string;- url?: string;- path?: string;- region?: string;- scope?: string;- metadata?: {- secretPrefix?: string;- secretSuffix?: string;- secretGCPLabel?: {- labelName: string;- labelValue: string;- };- secretAWSTag?: {- key: string;- value: string;- }[];-- githubVisibility?: string;- githubVisibilityRepoIds?: string[];-- kmsKeyId?: string;- shouldDisableDelete?: boolean;- shouldMaskSecrets?: boolean;- shouldProtectSecrets?: boolean;- shouldEnableDelete?: boolean;- };-} & Omit<TProjectPermission, "projectId">;-export type TGetIntegrationDTO = {id: string;} & Omit<TProjectPermission, "projectId">;diff --git a/backend/src/services/secret/secret-queue.ts b/backend/src/services/secret/secret-queue.tsindex 053f28d12a..cd7b0797e5 100644--- a/backend/src/services/secret/secret-queue.ts+++ b/backend/src/services/secret/secret-queue.ts@@ -38,6 +38,7 @@ import { ActorType } from "../auth/auth-type";import { TFolderCommitServiceFactory } from "../folder-commit/folder-commit-service";import { TIdentityDALFactory } from "../identity/identity-dal";import { TIntegrationDALFactory } from "../integration/integration-dal";+import { buildNativeIntegrationsUrl } from "../integration/integration-deprecation-fns";import { TIntegrationAuthDALFactory } from "../integration-auth/integration-auth-dal";import { TIntegrationAuthServiceFactory } from "../integration-auth/integration-auth-service";import { syncIntegrationSecrets } from "../integration-auth/integration-sync-secret";@@ -761,7 +762,7 @@ export const secretQueueFactory = ({environment: jobPayload.environmentName,count: jobPayload.count,projectName: project.name,- integrationUrl: `${appCfg.SITE_URL}/organizations/${project.orgId}/projects/secret-management/${project.id}/integrations?selectedTab=native-integrations`+ integrationUrl: buildNativeIntegrationsUrl(appCfg.SITE_URL ?? "", project.orgId, project.id)}});}diff --git a/backend/src/services/smtp/emails/NativeIntegrationDeprecationTemplate.tsx b/backend/src/services/smtp/emails/NativeIntegrationDeprecationTemplate.tsxindex 2af01d6e88..472c15ac80 100644--- a/backend/src/services/smtp/emails/NativeIntegrationDeprecationTemplate.tsx+++ b/backend/src/services/smtp/emails/NativeIntegrationDeprecationTemplate.tsx@@ -18,17 +18,16 @@ export const NativeIntegrationDeprecationTemplate = ({orgName,projects}: NativeIntegrationDeprecationTemplateProps) => {- const deprecationDate = NATIVE_INTEGRATION_DEPRECATION_DATE;const isSingleProject = projects.length === 1;return (<BaseEmailWrappertitle="Native Integrations are being retired"- preview={`Native Integrations are being retired on ${deprecationDate}. Your existing integrations keep working until then.`}+ preview={`Native Integrations are being retired on ${NATIVE_INTEGRATION_DEPRECATION_DATE}. Your existing integrations keep working until then.`}siteUrl={siteUrl}><Heading className="text-black text-[18px] leading-[28px] text-center font-normal p-0 mx-0">- <strong>Native Integrations Are Being Retired on {deprecationDate}</strong>+ <strong>Native Integrations must be migrated to Secret Syncs</strong></Heading><Section className="px-[24px] mb-[28px] mt-[36px] pt-[12px] pb-[8px] border border-solid border-gray-200 rounded-md bg-gray-50"><Text className="text-black text-[14px] leading-[24px]">@@ -42,7 +41,8 @@ export const NativeIntegrationDeprecationTemplate = ({<strong>{projects.length}</strong> projects in <strong>{orgName}</strong> still use native integrations.</>)}{" "}- Native Integrations are being retired on <strong>{deprecationDate}</strong> and you can learn more about it on{" "}+ Native Integrations are being retired on <strong>{NATIVE_INTEGRATION_DEPRECATION_DATE}</strong> and you can+ learn more about it on{" "}<BaseLink href="https://infisical.com/docs/integrations/secret-syncs/native-integrations-migration">Migrating Native Integrations</BaseLink>diff --git a/frontend/src/const/nativeIntegrationDeprecation.ts b/frontend/src/const/nativeIntegrationDeprecation.tsindex eabaf6b334..5f13778444 100644--- a/frontend/src/const/nativeIntegrationDeprecation.ts+++ b/frontend/src/const/nativeIntegrationDeprecation.ts@@ -1,6 +1,4 @@// Cutoff after which native integrations stop syncing secrets. Every in-product notice reads// this, so the date is stated in one place. The backend has its own copy in// backend/src/services/integration/integration-deprecation-fns.ts. Keep the two in sync.-const NATIVE_INTEGRATION_DEPRECATION_DATE = "August 5, 2027";--export { NATIVE_INTEGRATION_DEPRECATION_DATE };+export const NATIVE_INTEGRATION_DEPRECATION_DATE = "August 5, 2027";diff --git a/frontend/src/hooks/api/integrationAuth/index.tsx b/frontend/src/hooks/api/integrationAuth/index.tsxindex b70ee2ab9e..0ef77f07cf 100644--- a/frontend/src/hooks/api/integrationAuth/index.tsx+++ b/frontend/src/hooks/api/integrationAuth/index.tsx@@ -2,7 +2,6 @@ export { useDuplicateIntegrationAuth } from "./mutations";export {useAuthorizeIntegration,useDeleteIntegrationAuth,- useDeleteIntegrationAuths,useGetIntegrationAuthApps,useGetIntegrationAuthBitbucketWorkspaces,useGetIntegrationAuthById,diff --git a/frontend/src/hooks/api/integrationAuth/queries.tsx b/frontend/src/hooks/api/integrationAuth/queries.tsxindex f6c936480a..57b95576f9 100644--- a/frontend/src/hooks/api/integrationAuth/queries.tsx+++ b/frontend/src/hooks/api/integrationAuth/queries.tsx@@ -1022,28 +1022,6 @@ export const useSaveIntegrationAccessToken = () => {});};-export const useDeleteIntegrationAuths = () => {- const queryClient = useQueryClient();-- return useMutation<object, object, { integration: string; workspaceId: string }>({- mutationFn: ({ integration, workspaceId }) =>- apiRequest.delete(- `/api/v1/integration-auth?${new URLSearchParams({- integration,- projectId: workspaceId- })}`- ),- onSuccess: (_, { workspaceId }) => {- queryClient.invalidateQueries({- queryKey: projectKeys.getProjectAuthorization(workspaceId)- });- queryClient.invalidateQueries({- queryKey: projectKeys.getProjectIntegrations(workspaceId)- });- }- });-};-export const useDeleteIntegrationAuth = () => {// not usedconst queryClient = useQueryClient();diff --git a/frontend/src/hooks/api/projects/index.tsx b/frontend/src/hooks/api/projects/index.tsxindex db7f51995a..72cedcc498 100644--- a/frontend/src/hooks/api/projects/index.tsx+++ b/frontend/src/hooks/api/projects/index.tsx@@ -21,7 +21,6 @@ export {useGetUserProjects,useGetUserProjectsByType,useGetUserWorkspaceMemberships,- useGetWorkspaceAuthorizations,useGetWorkspaceById,useGetWorkspaceIndexStatus,useGetWorkspaceIntegrations,diff --git a/frontend/src/hooks/api/projects/queries.tsx b/frontend/src/hooks/api/projects/queries.tsxindex 45b043d96b..03e8866985 100644--- a/frontend/src/hooks/api/projects/queries.tsx+++ b/frontend/src/hooks/api/projects/queries.tsx@@ -8,7 +8,6 @@ import { TCertificateAuthority } from "../ca/types";import { TCertificate } from "../certificates/types";import { TCertificateTemplate } from "../certificateTemplates/types";import { TGroupMembership } from "../groups/types";-import { IntegrationAuth } from "../integrationAuth/types";import { TIntegration } from "../integrations/types";import { TPkiAlert } from "../pkiAlerts/types";import { pkiApplicationKeys } from "../pkiApplications/queries";@@ -190,25 +189,6 @@ export const useGetUserWorkspaceMemberships = (orgId: string) =>enabled: Boolean(orgId)});-const fetchWorkspaceAuthorization = async (projectId: string) => {- const { data } = await apiRequest.get<{ authorizations: IntegrationAuth[] }>(- `/api/v1/projects/${projectId}/authorizations`- );-- return data.authorizations;-};--export const useGetWorkspaceAuthorizations = <TData = IntegrationAuth[],>(- projectId: string,- select?: (data: IntegrationAuth[]) => TData-) =>- useQuery({- queryKey: projectKeys.getProjectAuthorization(projectId),- queryFn: () => fetchWorkspaceAuthorization(projectId),- enabled: Boolean(projectId),- select- });-export const fetchWorkspaceIntegrations = async (projectId: string) => {const { data } = await apiRequest.get<{ integrations: TIntegration[] }>(`/api/v1/projects/${projectId}/integrations`diff --git a/frontend/src/hooks/index.ts b/frontend/src/hooks/index.tsindex 39477c1833..8cd9cbba33 100644--- a/frontend/src/hooks/index.ts+++ b/frontend/src/hooks/index.ts@@ -1,4 +1,3 @@-export { useBannerDismissal } from "./useBannerDismissal";export {useCanUseOrgAppConnectionImport,useCanUseProjectAppConnectionImportdiff --git a/frontend/src/hooks/useBannerDismissal.ts b/frontend/src/hooks/useBannerDismissal.tsdeleted file mode 100644index 97022eed04..0000000000--- a/frontend/src/hooks/useBannerDismissal.ts+++ /dev/null@@ -1,28 +0,0 @@-import { useCallback, useState } from "react";--const ONE_DAY_MS = 24 * 60 * 60 * 1000;--const wasDismissedWithinLastDay = (storageKey: string): boolean => {- const dismissedAt = localStorage.getItem(storageKey);- if (!dismissedAt) return false;- const dismissedTime = parseInt(dismissedAt, 10);- return Date.now() - dismissedTime < ONE_DAY_MS;-};--/**- * Dismissal state for a banner, persisted for a day so it survives reloads and navigation but comes back- * afterwards. Same behaviour as the network health banner.- */-export const useBannerDismissal = (storageKey: string): [boolean, () => void] => {- // localStorage is the source of truth and is read on every render, so a changing storageKey (e.g.- // switching project) is picked up without the consumer having to remount. The state only exists to- // re-render after a dismissal.- const [, setDismissCount] = useState(0);-- const dismiss = useCallback(() => {- localStorage.setItem(storageKey, Date.now().toString());- setDismissCount((count) => count + 1);- }, [storageKey]);-- return [wasDismissedWithinLastDay(storageKey), dismiss];-};diff --git a/frontend/src/layouts/OrganizationLayout/components/NavBar/NotificationDropdown.tsx b/frontend/src/layouts/OrganizationLayout/components/NavBar/NotificationDropdown.tsxindex 959ad082ba..837e5c18f5 100644--- a/frontend/src/layouts/OrganizationLayout/components/NavBar/NotificationDropdown.tsx+++ b/frontend/src/layouts/OrganizationLayout/components/NavBar/NotificationDropdown.tsx@@ -33,12 +33,8 @@ export const NotificationDropdown = () => {// straight to `to` would resolve them against the current path and swallow the search params, so normalize to a// path + search + hash and let the router parse it via `href`.const openNotificationLink = (link: string) => {- try {- const { pathname, search, hash } = new URL(link, window.location.origin);- router.navigate({ href: `${pathname}${search}${hash}` });- } catch {- router.navigate({ to: link });- }+ const { pathname, search, hash } = new URL(link, window.location.origin);+ router.navigate({ href: `${pathname}${search}${hash}` });};const handleNotificationOpen = (notification: TUserNotification) => {diff --git a/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsCreationBlockedModal.tsx b/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsCreationBlockedModal.tsxindex 850cb2c67c..c7da05e2aa 100644--- a/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsCreationBlockedModal.tsx+++ b/frontend/src/pages/secret-manager/IntegrationsListPage/components/NativeIntegrationsTab/NativeIntegrationsCreationBlockedModal.tsx@@ -34,12 +34,11 @@ export const NativeIntegrationsCreationBlockedModal = ({ isOpen, onOpenChange }:const { currentProject } = useProject();const scopeVariant = useScopeVariant();- const telemetry = new Telemetry().getInstance();-// Fires on each open. Unlike a one-time nudge, this modal can be reopened many times per session,// and each attempt is a signal worth counting.useEffect(() => {if (isOpen) {+ const telemetry = new Telemetry().getInstance();telemetry.capture(CREATION_BLOCKED_MODAL_VIEWED_EVENT, {orgId: currentOrg.id,projectId: currentProject.id,