Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feature: announcements for cloud and self-hosted

Scott Wilson747e5786cd47
diff --git a/Dockerfile.fips.standalone-infisical b/Dockerfile.fips.standalone-infisical
index 0d339242e2..2781b647e8 100644
--- a/Dockerfile.fips.standalone-infisical
+++ b/Dockerfile.fips.standalone-infisical
@@ -107,6 +107,17 @@ COPY --chown=non-root-user:nodejs standalone-entrypoint.sh standalone-entrypoint
RUN npm i -g tsconfig-paths
RUN npm run build
+# Bake in-app announcements + their images at build time so self-hosted / air-gapped
+# instances don't make any outbound calls to Contentful at runtime. No-ops silently
+# if Contentful build args are not supplied (cloud / dev builds).
+ARG CONTENTFUL_SPACE_ID
+ARG CONTENTFUL_DELIVERY_TOKEN
+ARG CONTENTFUL_ENVIRONMENT=master
+ENV CONTENTFUL_SPACE_ID=$CONTENTFUL_SPACE_ID
+ENV CONTENTFUL_DELIVERY_TOKEN=$CONTENTFUL_DELIVERY_TOKEN
+ENV CONTENTFUL_ENVIRONMENT=$CONTENTFUL_ENVIRONMENT
+RUN npm run bake:announcements
+
# Production stage
FROM base AS backend-runner
diff --git a/Dockerfile.standalone-infisical b/Dockerfile.standalone-infisical
index ba546af87c..0a74eefbea 100644
--- a/Dockerfile.standalone-infisical
+++ b/Dockerfile.standalone-infisical
@@ -108,6 +108,17 @@ RUN npm i -g tsconfig-paths
ENV NODE_OPTIONS="--max-old-space-size=8192"
RUN npm run build
+# Bake in-app announcements + their images at build time so self-hosted / air-gapped
+# instances don't make any outbound calls to Contentful at runtime. No-ops silently
+# if Contentful build args are not supplied (cloud / dev builds).
+ARG CONTENTFUL_SPACE_ID
+ARG CONTENTFUL_DELIVERY_TOKEN
+ARG CONTENTFUL_ENVIRONMENT=master
+ENV CONTENTFUL_SPACE_ID=$CONTENTFUL_SPACE_ID
+ENV CONTENTFUL_DELIVERY_TOKEN=$CONTENTFUL_DELIVERY_TOKEN
+ENV CONTENTFUL_ENVIRONMENT=$CONTENTFUL_ENVIRONMENT
+RUN npm run bake:announcements
+
# Production dependencies (runs in parallel with backend-build)
FROM base AS backend-prod-deps
diff --git a/backend/package.json b/backend/package.json
index d1c83fd749..dbf1642520 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -22,6 +22,7 @@
"test:e2e-watch": "vitest -c vitest.e2e.config.mts --bail=1",
"test:e2e-coverage": "vitest run --coverage -c vitest.e2e.config.mts",
"test:bdd": "cd bdd && uv run behave",
+ "bake:announcements": "tsx ./scripts/bake-announcements.ts",
"generate:component": "tsx ./scripts/create-backend-file.ts",
"generate:schema": "tsx ./scripts/generate-schema-types.ts && eslint --fix --ext ts ./src/db/schemas",
"auditlog-migration:latest": "node ./dist/db/rename-migrations-to-mjs.mjs && knex --knexfile ./dist/db/auditlog-knexfile.mjs --client pg migrate:latest",
diff --git a/backend/scripts/bake-announcements.ts b/backend/scripts/bake-announcements.ts
new file mode 100644
index 0000000000..4fae4621d5
--- /dev/null
+++ b/backend/scripts/bake-announcements.ts
@@ -0,0 +1,126 @@
+/* eslint-disable */
+//
+// Bakes the latest Contentful announcements into a static JSON file plus local image
+// assets, for use by self-hosted / air-gapped deployments. Output:
+// dist/announcement-assets/announcements.json
+// dist/announcement-assets/images/<sha>.<ext>
+//
+// Image URLs in the JSON are rewritten to /api/v1/announcement/assets/<filename>
+// so the backend can serve them locally without any outbound calls at runtime.
+//
+// Run during Docker build for self-hosted images. Skips silently if Contentful
+// credentials are not provided (cloud builds, dev builds).
+//
+import crypto from "node:crypto";
+import fs from "node:fs/promises";
+import path from "node:path";
+
+const SPACE = process.env.CONTENTFUL_SPACE_ID;
+const TOKEN = process.env.CONTENTFUL_DELIVERY_TOKEN;
+const ENV = process.env.CONTENTFUL_ENVIRONMENT || "master";
+const CONTENT_TYPE = "featureUpdate";
+const BAKE_LIMIT = Number(process.env.BAKE_ANNOUNCEMENTS_LIMIT || "5");
+const OUT_DIR = path.resolve(process.cwd(), "dist", "announcement-assets");
+const IMAGE_DIR = path.join(OUT_DIR, "images");
+const JSON_PATH = path.join(OUT_DIR, "announcements.json");
+
+type ContentfulAsset = {
+ sys: { id: string };
+ fields: { file?: { url?: string; contentType?: string } };
+};
+
+type ContentfulEntry = {
+ sys: { id: string };
+ fields: {
+ title?: string;
+ body?: string;
+ image?: { sys: { id: string } };
+ link?: string;
+ linkLabel?: string;
+ published?: string;
+ };
+};
+
+type ContentfulResponse = {
+ items: ContentfulEntry[];
+ includes?: { Asset?: ContentfulAsset[] };
+};
+
+async function downloadAsset(url: string, assetId: string): Promise<{ filename: string; bytes: number } | null> {
+ const res = await fetch(url);
+ if (!res.ok) {
+ console.warn(`[bake-announcements] failed to download ${url}: ${res.status}`);
+ return null;
+ }
+ const buf = Buffer.from(await res.arrayBuffer());
+ const hash = crypto.createHash("sha256").update(buf).digest("hex").slice(0, 16);
+ const ext = path.extname(new URL(url).pathname).toLowerCase() || ".bin";
+ const filename = `${hash}${ext}`;
+ await fs.writeFile(path.join(IMAGE_DIR, filename), buf);
+ console.log(`[bake-announcements] asset ${assetId} -> ${filename} (${buf.length} bytes)`);
+ return { filename, bytes: buf.length };
+}
+
+async function main() {
+ if (!SPACE || !TOKEN) {
+ console.warn(
+ "[bake-announcements] CONTENTFUL_SPACE_ID or CONTENTFUL_DELIVERY_TOKEN not set — skipping bake. Backend will fetch live at runtime."
+ );
+ return;
+ }
+
+ const url = new URL(`https://cdn.contentful.com/spaces/${SPACE}/environments/${ENV}/entries`);
+ url.searchParams.set("content_type", CONTENT_TYPE);
+ url.searchParams.set("order", "-fields.published");
+ url.searchParams.set("limit", String(BAKE_LIMIT));
+ url.searchParams.set("include", "1");
+
+ console.log(`[bake-announcements] fetching ${url.toString()}`);
+ const res = await fetch(url, { headers: { Authorization: `Bearer ${TOKEN}` } });
+ if (!res.ok) {
+ throw new Error(`Contentful fetch failed: ${res.status} ${res.statusText}`);
+ }
+ const data = (await res.json()) as ContentfulResponse;
+
+ await fs.mkdir(IMAGE_DIR, { recursive: true });
+
+ const assetMap = new Map<string, string>(); // assetId -> remote URL
+ for (const asset of data.includes?.Asset ?? []) {
+ const remoteUrl = asset.fields?.file?.url;
+ if (!remoteUrl) continue;
+ assetMap.set(asset.sys.id, remoteUrl.startsWith("//") ? `https:${remoteUrl}` : remoteUrl);
+ }
+
+ const downloaded = new Map<string, string>(); // assetId -> local filename
+ for (const [assetId, remoteUrl] of assetMap) {
+ const result = await downloadAsset(remoteUrl, assetId);
+ if (result) downloaded.set(assetId, result.filename);
+ }
+
+ const announcements = data.items.flatMap((entry) => {
+ if (!entry?.fields?.title || !entry.fields.body || !entry.fields.published) return [];
+ const imageId = entry.fields.image?.sys?.id;
+ const filename = imageId ? downloaded.get(imageId) : null;
+ return [
+ {
+ id: entry.sys.id,
+ title: entry.fields.title,
+ body: entry.fields.body,
+ imageUrl: filename ? `/api/v1/announcement/assets/${filename}` : null,
+ link: entry.fields.link ?? null,
+ linkLabel: entry.fields.linkLabel ?? null,
+ published: entry.fields.published
+ }
+ ];
+ });
+
+ await fs.writeFile(JSON_PATH, `${JSON.stringify(announcements, null, 2)}\n`);
+ console.log(
+ `[bake-announcements] wrote ${announcements.length} announcement(s) and ${downloaded.size} image(s) to ${OUT_DIR}`
+ );
+}
+
+main().catch((err) => {
+ console.error("[bake-announcements] failed:", err);
+ process.exit(1);
+});
diff --git a/backend/src/@types/fastify.d.ts b/backend/src/@types/fastify.d.ts
index bb3b6c6f50..685429eb98 100644
--- a/backend/src/@types/fastify.d.ts
+++ b/backend/src/@types/fastify.d.ts
@@ -75,6 +75,7 @@ import { RequestMemoizer } from "@app/lib/request-context/request-memoizer";
import { TAuthMode } from "@app/server/plugins/auth/inject-identity";
import { TAccountRecoveryServiceFactory } from "@app/services/account-recovery/account-recovery-service";
import { TAdditionalPrivilegeServiceFactory } from "@app/services/additional-privilege/additional-privilege-service";
+import { TAnnouncementServiceFactory } from "@app/services/announcement/announcement-service";
import { TAppConnectionServiceFactory } from "@app/services/app-connection/app-connection-service";
import { TAppConnectionCredentialRotationServiceFactory } from "@app/services/app-connection/credential-rotation";
import { TApprovalPolicyServiceFactory } from "@app/services/approval-policy/approval-policy-service";
@@ -390,6 +391,7 @@ declare module "fastify" {
projectEventsSSE: TProjectEventsSSEService;
identityAuthTemplate: TIdentityAuthTemplateServiceFactory;
notification: TNotificationServiceFactory;
+ announcement: TAnnouncementServiceFactory;
offlineUsageReport: TOfflineUsageReportServiceFactory;
pamFolder: TPamFolderServiceFactory;
pamResource: TPamResourceServiceFactory;
diff --git a/backend/src/db/migrations/20260506120000_users-last-seen-announcement.ts b/backend/src/db/migrations/20260506120000_users-last-seen-announcement.ts
new file mode 100644
index 0000000000..ff4680801d
--- /dev/null
+++ b/backend/src/db/migrations/20260506120000_users-last-seen-announcement.ts
@@ -0,0 +1,23 @@
+import { Knex } from "knex";
+
+import { TableName } from "../schemas";
+
+const COLUMN = "lastSeenAnnouncementId";
+
+export async function up(knex: Knex): Promise<void> {
+ const hasColumn = await knex.schema.hasColumn(TableName.Users, COLUMN);
+ if (!hasColumn) {
+ await knex.schema.alterTable(TableName.Users, (t) => {
+ t.string(COLUMN).nullable();
+ });
+ }
+}
+
+export async function down(knex: Knex): Promise<void> {
+ const hasColumn = await knex.schema.hasColumn(TableName.Users, COLUMN);
+ if (hasColumn) {
+ await knex.schema.alterTable(TableName.Users, (t) => {
+ t.dropColumn(COLUMN);
+ });
+ }
+}
diff --git a/backend/src/db/schemas/users.ts b/backend/src/db/schemas/users.ts
index 64cda04f9e..a7662775cc 100644
--- a/backend/src/db/schemas/users.ts
+++ b/backend/src/db/schemas/users.ts
@@ -31,7 +31,8 @@ export const UsersSchema = z.object({
hashedPassword: z.string().nullable().optional(),
isGoogleVerified: z.boolean().nullable().optional(),
isGitHubVerified: z.boolean().nullable().optional(),
- isGitLabVerified: z.boolean().nullable().optional()
+ isGitLabVerified: z.boolean().nullable().optional(),
+ lastSeenAnnouncementId: z.string().nullable().optional()
});
export type TUsers = z.infer<typeof UsersSchema>;
diff --git a/backend/src/keystore/keystore.ts b/backend/src/keystore/keystore.ts
index 81f1a61f1b..9df284b857 100644
--- a/backend/src/keystore/keystore.ts
+++ b/backend/src/keystore/keystore.ts
@@ -71,6 +71,7 @@ export const KeyStorePrefixes = {
`sse-connections:${projectId}:${identityId}` as const,
ActiveSSEConnections: (projectId: string, identityId: string, connectionId: string) =>
`sse-connections:${projectId}:${identityId}:${connectionId}` as const,
+ RecentAnnouncements: "announcements:recent" as const,
ProjectPermissionMarker: (projectId: string, actorType: string, actorId: string, actionProjectType: string) =>
`project-permission-marker:${projectId}:${actorType}:${actorId}:${actionProjectType}` as const,
diff --git a/backend/src/lib/config/env.ts b/backend/src/lib/config/env.ts
index e2e8fbcb5f..ac110a57db 100644
--- a/backend/src/lib/config/env.ts
+++ b/backend/src/lib/config/env.ts
@@ -229,6 +229,12 @@ const envSchema = z
// HubSpot Forms API for capturing signups
HUBSPOT_PORTAL_ID: zpStr(z.string().optional()),
HUBSPOT_SIGNUP_FORM_ID: zpStr(z.string().optional()),
+ // In-app announcements (Contentful). Public read-only delivery token; safe to bake in defaults.
+ // Self-hosted admins can disable outbound calls with ANNOUNCEMENTS_ENABLED=false.
+ ANNOUNCEMENTS_ENABLED: zodStrBool.default("true"),
+ CONTENTFUL_SPACE_ID: zpStr(z.string().optional()),
+ CONTENTFUL_DELIVERY_TOKEN: zpStr(z.string().optional()),
+ CONTENTFUL_ENVIRONMENT: zpStr(z.string().optional().default("master")),
// GitHub API token for upgrade path tool
GITHUB_API_TOKEN: zpStr(z.string().optional()),
// jwt options
diff --git a/backend/src/server/routes/index.ts b/backend/src/server/routes/index.ts
index a39b55c7a3..0a2b90a462 100644
--- a/backend/src/server/routes/index.ts
+++ b/backend/src/server/routes/index.ts
@@ -227,6 +227,7 @@ import { accessTokenQueueServiceFactory } from "@app/services/access-token-queue
import { accountRecoveryServiceFactory } from "@app/services/account-recovery/account-recovery-service";
import { additionalPrivilegeDALFactory } from "@app/services/additional-privilege/additional-privilege-dal";
import { additionalPrivilegeServiceFactory } from "@app/services/additional-privilege/additional-privilege-service";
+import { announcementServiceFactory } from "@app/services/announcement/announcement-service";
import { appConnectionDALFactory } from "@app/services/app-connection/app-connection-dal";
import { appConnectionServiceFactory } from "@app/services/app-connection/app-connection-service";
import {
@@ -849,6 +850,8 @@ export const registerRoutes = async (
const notificationService = notificationServiceFactory({ notificationQueue, userNotificationDAL });
+ const announcementService = announcementServiceFactory({ userDAL, keyStore });
+
const clickhouseAuditLogDAL = clickhouse
? clickhouseAuditLogDALFactory(clickhouse, db, envConfig.CLICKHOUSE_AUDIT_LOG_TABLE_NAME)
: undefined;
@@ -3374,6 +3377,7 @@ export const registerRoutes = async (
projectEvents: projectEventsService,
projectEventsSSE: projectEventsSSEService,
notification: notificationService,
+ announcement: announcementService,
pamFolder: pamFolderService,
pamResource: pamResourceService,
pamDomain: pamDomainService,
diff --git a/backend/src/server/routes/v1/announcement-router.ts b/backend/src/server/routes/v1/announcement-router.ts
new file mode 100644
index 0000000000..00ac98cfc3
--- /dev/null
+++ b/backend/src/server/routes/v1/announcement-router.ts
@@ -0,0 +1,122 @@
+import { createReadStream } from "node:fs";
+import { stat } from "node:fs/promises";
+import path from "node:path";
+
+import { z } from "zod";
+
+import { NotFoundError, UnauthorizedError } from "@app/lib/errors";
+import { readLimit, writeLimit } from "@app/server/config/rateLimiter";
+import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
+import { BUNDLED_IMAGE_DIR } from "@app/services/announcement/announcement-service";
+import { AuthMode } from "@app/services/auth/auth-type";
+
+const AnnouncementSchema = z.object({
+ id: z.string(),
+ title: z.string(),
+ body: z.string(),
+ imageUrl: z.string().nullable(),
+ link: z.string().nullable(),
+ linkLabel: z.string().nullable(),
+ published: z.string()
+});
+
+const ASSET_FILENAME_RE = /^[a-zA-Z0-9_-]+\.[a-zA-Z0-9]+$/;
+const MIME_BY_EXT: Record<string, string> = {
+ ".png": "image/png",
+ ".jpg": "image/jpeg",
+ ".jpeg": "image/jpeg",
+ ".webp": "image/webp",
+ ".gif": "image/gif",
+ ".svg": "image/svg+xml"
+};
+
+export const registerAnnouncementRouter = async (server: FastifyZodProvider) => {
+ server.route({
+ url: "/recent",
+ config: {
+ rateLimit: readLimit
+ },
+ method: "GET",
+ schema: {
+ operationId: "listRecentAnnouncements",
+ response: {
+ 200: z.object({
+ announcements: AnnouncementSchema.array(),
+ lastSeenAnnouncementId: z.string().nullable()
+ })
+ }
+ },
+ onRequest: verifyAuth([AuthMode.JWT]),
+ handler: async (req) => {
+ // this is to appease the type derivation below
+ if (req.auth.authMode !== AuthMode.JWT) {
+ throw new UnauthorizedError({ message: "This endpoint can only be accessed by users" });
+ }
+ return server.services.announcement.listRecentAnnouncements({ userId: req.auth.userId });
+ }
+ });
+
+ server.route({
+ url: "/seen",
+ config: {
+ rateLimit: writeLimit
+ },
+ method: "POST",
+ schema: {
+ operationId: "markAnnouncementSeen",
+ body: z.object({
+ announcementId: z.string().min(1).max(255)
+ }),
+ response: {
+ 200: z.object({
+ lastSeenAnnouncementId: z.string().nullable()
+ })
+ }
+ },
+ onRequest: verifyAuth([AuthMode.JWT]),
+ handler: async (req) => {
+ // this is to appease the type derivation below
+ if (req.auth.authMode !== AuthMode.JWT) {
+ throw new UnauthorizedError({ message: "This endpoint can only be accessed by users" });
+ }
+ return server.services.announcement.markAnnouncementSeen({
+ userId: req.auth.userId,
+ announcementId: req.body.announcementId
+ });
+ }
+ });
+
+ // Serves images baked into the image at build time (see scripts/bake-announcements.ts).
+ // Filenames are content-hashed so caching is safe to be long-lived and immutable.
+ server.route({
+ url: "/assets/:filename",
+ config: {
+ rateLimit: readLimit
+ },
+ method: "GET",
+ schema: {
+ params: z.object({
+ filename: z.string()
+ })
+ },
+ handler: async (req, reply) => {
+ const { filename } = req.params;
+ if (!ASSET_FILENAME_RE.test(filename)) {
+ throw new NotFoundError({ message: "Asset not found" });
+ }
+
+ const filePath = path.join(BUNDLED_IMAGE_DIR, filename);
+ try {
+ await stat(filePath);
+ } catch {
+ throw new NotFoundError({ message: "Asset not found" });
+ }
+
+ const ext = path.extname(filename).toLowerCase();
+ return reply
+ .type(MIME_BY_EXT[ext] ?? "application/octet-stream")
+ .header("cache-control", "public, max-age=31536000, immutable")
+ .send(createReadStream(filePath));
+ }
+ });
+};
diff --git a/backend/src/server/routes/v1/index.ts b/backend/src/server/routes/v1/index.ts
index 1eafb60492..c06a8fe14a 100644
--- a/backend/src/server/routes/v1/index.ts
+++ b/backend/src/server/routes/v1/index.ts
@@ -8,6 +8,7 @@ import { registerSecretSyncRouter, SECRET_SYNC_REGISTER_ROUTER_MAP } from "@app/
import { registerAccountRecoveryRouter } from "./account-recovery-router";
import { registerAdminRouter } from "./admin-router";
+import { registerAnnouncementRouter } from "./announcement-router";
import { APPROVAL_POLICY_REGISTER_ROUTER_MAP } from "./approval-policy-routers";
import { registerAuthRoutes } from "./auth-router";
import { registerProjectBotRouter } from "./bot-router";
@@ -123,6 +124,7 @@ export const registerV1Routes = async (server: FastifyZodProvider) => {
await server.register(registerOrgAdminRouter, { prefix: "/organization-admin" });
await server.register(registerUserRouter, { prefix: "/user" });
await server.register(registerNotificationRouter, { prefix: "/notifications" });
+ await server.register(registerAnnouncementRouter, { prefix: "/announcement" });
await server.register(registerInviteOrgRouter, { prefix: "/invite-org" });
await server.register(registerUserActionRouter, { prefix: "/user-action" });
await server.register(registerDeprecatedSecretImportRouter, { prefix: "/secret-imports" });
diff --git a/backend/src/services/announcement/announcement-service.ts b/backend/src/services/announcement/announcement-service.ts
new file mode 100644
index 0000000000..1ccfc00156
--- /dev/null
+++ b/backend/src/services/announcement/announcement-service.ts
@@ -0,0 +1,161 @@
+import fs from "node:fs/promises";
+import path from "node:path";
+
+import { KeyStorePrefixes, TKeyStoreFactory } from "@app/keystore/keystore";
+import { withCache } from "@app/lib/cache/with-cache";
+import { getConfig } from "@app/lib/config/env";
+import { request } from "@app/lib/config/request";
+import { NotFoundError } from "@app/lib/errors";
+import { logger } from "@app/lib/logger";
+import { TUserDALFactory } from "@app/services/user/user-dal";
+
+import { TAnnouncement, TContentfulEntriesResponse } from "./announcement-types";
+
+const CONTENT_TYPE = "featureUpdate";
+const RECENT_LIMIT = 5;
+const CACHE_TTL_SECONDS = 30 * 60;
+// New users get a 7-day grace period before any announcements surface — avoids
+// hitting them with marketing modals during onboarding.
+const NEW_USER_GRACE_PERIOD_MS = 7 * 24 * 60 * 60 * 1000;
+
+// Bundled-mode: if this file exists on disk, the backend serves announcements from it
+// (and any referenced images from BUNDLED_IMAGE_DIR) instead of calling Contentful.
+// Written by `scripts/bake-announcements.ts` during Docker build for self-hosted images.
+export const BUNDLED_DIR = path.resolve(process.cwd(), "dist", "announcement-assets");
+export const BUNDLED_JSON_PATH = path.join(BUNDLED_DIR, "announcements.json");
+export const BUNDLED_IMAGE_DIR = path.join(BUNDLED_DIR, "images");
+
+type TAnnouncementServiceFactoryDep = {
+ userDAL: Pick<TUserDALFactory, "findById" | "updateById">;
+ keyStore: Pick<TKeyStoreFactory, "getItem" | "setItemWithExpiry">;
+};
+
+export type TAnnouncementServiceFactory = ReturnType<typeof announcementServiceFactory>;
+
+export const announcementServiceFactory = ({ userDAL, keyStore }: TAnnouncementServiceFactoryDep) => {
+ let hasLoggedFetchError = false;
+ // null = not yet checked, [] = no bundle present, [...] = bundled announcements
+ let bundled: TAnnouncement[] | null = null;
+ let bundleChecked = false;
+
+ const loadBundled = async (): Promise<TAnnouncement[] | null> => {
+ if (bundleChecked) return bundled;
+ bundleChecked = true;
+ try {
+ const raw = await fs.readFile(BUNDLED_JSON_PATH, "utf8");
+ bundled = JSON.parse(raw) as TAnnouncement[];
+ logger.info(
+ `Loaded ${bundled.length} bundled announcement(s) from ${BUNDLED_JSON_PATH} — Contentful fetches disabled`
+ );
+ return bundled;
+ } catch (err) {
+ const { code } = err as NodeJS.ErrnoException;
+ if (code !== "ENOENT") {
+ logger.warn({ err }, `Failed to read bundled announcements at ${BUNDLED_JSON_PATH}`);
+ }
+ bundled = null;
+ return null;
+ }
+ };
+
+ const fetchRecent = async (): Promise<TAnnouncement[]> => {
+ const appCfg = getConfig();
+
+ if (!appCfg.ANNOUNCEMENTS_ENABLED || !appCfg.CONTENTFUL_SPACE_ID || !appCfg.CONTENTFUL_DELIVERY_TOKEN) {
+ return [];
+ }
+
+ const url = `https://cdn.contentful.com/spaces/${appCfg.CONTENTFUL_SPACE_ID}/environments/${appCfg.CONTENTFUL_ENVIRONMENT}/entries`;
+
+ const { data } = await request.get<TContentfulEntriesResponse>(url, {
+ params: {
+ content_type: CONTENT_TYPE,
+ order: "-fields.published",
+ limit: RECENT_LIMIT,
+ include: 1
+ },
+ headers: {
+ Authorization: `Bearer ${appCfg.CONTENTFUL_DELIVERY_TOKEN}`
+ },
+ timeout: 5000
+ });
+
+ const assetById = new Map<string, string>();
+ for (const asset of data.includes?.Asset ?? []) {
+ const fileUrl = asset.fields?.file?.url;
+ if (fileUrl) {
+ assetById.set(asset.sys.id, fileUrl.startsWith("//") ? `https:${fileUrl}` : fileUrl);
+ }
+ }
+
+ return data.items.flatMap<TAnnouncement>((entry) => {
+ if (!entry?.fields?.title || !entry.fields.body || !entry.fields.published) return [];
+
+ const imageAssetId = entry.fields.image?.sys?.id;
+ const imageUrl = imageAssetId ? (assetById.get(imageAssetId) ?? null) : null;
+
+ return [
+ {
+ id: entry.sys.id,
+ title: entry.fields.title,
+ body: entry.fields.body,
+ imageUrl,
+ link: entry.fields.link ?? null,
+ linkLabel: entry.fields.linkLabel ?? null,
+ published: entry.fields.published
+ }
+ ];
+ });
+ };
+
+ const getAnnouncements = async (): Promise<TAnnouncement[]> => {
+ const appCfg = getConfig();
+ if (!appCfg.ANNOUNCEMENTS_ENABLED) return [];
+
+ const fromBundle = await loadBundled();
+ if (fromBundle) return fromBundle.slice(0, RECENT_LIMIT);
+
+ return withCache({
+ keyStore,
+ key: KeyStorePrefixes.RecentAnnouncements,
+ ttlSeconds: CACHE_TTL_SECONDS,
+ fetcher: fetchRecent
+ });
+ };
+
+ const listRecentAnnouncements = async ({
+ userId
+ }: {
+ userId: string;
+ }): Promise<{ announcements: TAnnouncement[]; lastSeenAnnouncementId: string | null }> => {
+ const user = await userDAL.findById(userId);
+ const lastSeenAnnouncementId = user?.lastSeenAnnouncementId ?? null;
+
+ if (user?.createdAt && Date.now() - new Date(user.createdAt).getTime() < NEW_USER_GRACE_PERIOD_MS) {
+ return { announcements: [], lastSeenAnnouncementId };
+ }
+
+ try {
+ const announcements = await getAnnouncements();
+ hasLoggedFetchError = false;
+ return { announcements, lastSeenAnnouncementId };
+ } catch (err) {
+ if (!hasLoggedFetchError) {
+ logger.warn({ err }, "Failed to fetch announcements — feature will be hidden until next attempt");
+ hasLoggedFetchError = true;
+ }
+ return { announcements: [], lastSeenAnnouncementId };
+ }
+ };
+
+ const markAnnouncementSeen = async ({ userId, announcementId }: { userId: string; announcementId: string }) => {
+ const user = await userDAL.updateById(userId, { lastSeenAnnouncementId: announcementId });
+ if (!user) throw new NotFoundError({ message: "User not found" });
+ return { lastSeenAnnouncementId: user.lastSeenAnnouncementId ?? null };
+ };
+
+ return {
+ listRecentAnnouncements,
+ markAnnouncementSeen
+ };
+};
diff --git a/backend/src/services/announcement/announcement-types.ts b/backend/src/services/announcement/announcement-types.ts
new file mode 100644
index 0000000000..4843caa789
--- /dev/null
+++ b/backend/src/services/announcement/announcement-types.ts
@@ -0,0 +1,37 @@
+export type TAnnouncement = {
+ id: string;
+ title: string;
+ body: string;
+ imageUrl: string | null;
+ link: string | null;
+ linkLabel: string | null;
+ published: string;
+};
+
+type TContentfulAsset = {
+ sys: { id: string };
+ fields: {
+ file?: {
+ url?: string;
+ };
+ };
+};
+
+export type TContentfulAnnouncementEntry = {
+ sys: { id: string };
+ fields: {
+ title?: string;
+ body?: string;
+ image?: { sys: { id: string } };
+ link?: string;
+ linkLabel?: string;
+ published?: string;
+ };
+};
+
+export type TContentfulEntriesResponse = {
+ items: TContentfulAnnouncementEntry[];
+ includes?: {
+ Asset?: TContentfulAsset[];
+ };
+};
diff --git a/frontend/index.html b/frontend/index.html
index 2a66cba2ab..38ccb729bd 100644
--- a/frontend/index.html
+++ b/frontend/index.html
@@ -13,7 +13,7 @@
child-src https://api.stripe.com;
frame-src https://js.stripe.com/ https://api.stripe.com https://www.youtube.com/ https://hcaptcha.com https://*.hcaptcha.com https://www.googletagmanager.com;
connect-src 'self' wss://nexus-websocket-a.intercom.io https://api-iam.intercom.io https://api.heroku.com/ https://id.heroku.com/oauth/authorize https://id.heroku.com/oauth/token https://checkout.stripe.com https://app.posthog.com https://*.posthog.com https://api.stripe.com https://api.pwnedpasswords.com http://127.0.0.1:* https://hcaptcha.com https://*.hcaptcha.com https://www.googletagmanager.com https://www.google-analytics.com https://region1.google-analytics.com https://analytics.google.com https://stats.g.doubleclick.net https://googleads.g.doubleclick.net https://forms.hscollectedforms.net https://forms.hubspot.com https://api.hubapi.com https://*.ads.linkedin.com https://tags.srv.stackadapt.com https://api.unifyintent.com https://pixel-config.reddit.com https://cdn.jsdelivr.net/npm/@lottiefiles/[email protected]/dist/dotlottie-player.wasm https://*.s3.amazonaws.com https://*.s3.us-east-1.amazonaws.com https://*.s3.us-east-2.amazonaws.com https://*.s3.us-west-1.amazonaws.com https://*.s3.us-west-2.amazonaws.com https://*.s3.af-south-1.amazonaws.com https://*.s3.ap-east-1.amazonaws.com https://*.s3.ap-south-1.amazonaws.com https://*.s3.ap-south-2.amazonaws.com https://*.s3.ap-southeast-1.amazonaws.com https://*.s3.ap-southeast-2.amazonaws.com https://*.s3.ap-southeast-3.amazonaws.com https://*.s3.ap-southeast-4.amazonaws.com https://*.s3.ap-northeast-1.amazonaws.com https://*.s3.ap-northeast-2.amazonaws.com https://*.s3.ap-northeast-3.amazonaws.com https://*.s3.ca-central-1.amazonaws.com https://*.s3.eu-central-1.amazonaws.com https://*.s3.eu-central-2.amazonaws.com https://*.s3.eu-west-1.amazonaws.com https://*.s3.eu-west-2.amazonaws.com https://*.s3.eu-west-3.amazonaws.com https://*.s3.eu-south-1.amazonaws.com https://*.s3.eu-south-2.amazonaws.com https://*.s3.eu-north-1.amazonaws.com https://*.s3.me-south-1.amazonaws.com https://*.s3.me-central-1.amazonaws.com https://*.s3.sa-east-1.amazonaws.com https://*.s3.us-gov-east-1.amazonaws.com https://*.s3.us-gov-west-1.amazonaws.com;
- img-src 'self' https://static.intercomassets.com https://js.intercomcdn.com https://downloads.intercomcdn.com https://*.stripe.com https://i.ytimg.com/ data: https://www.googletagmanager.com https://www.google-analytics.com https://www.google.com https://googleads.g.doubleclick.net https://www.googleadservices.com https://track.hubspot.com https://forms.hubspot.com https://forms.hsforms.com https://alb.reddit.com https://*.ads.linkedin.com;
+ img-src 'self' https://static.intercomassets.com https://js.intercomcdn.com https://downloads.intercomcdn.com https://*.stripe.com https://i.ytimg.com/ data: https://images.ctfassets.net https://www.googletagmanager.com https://www.google-analytics.com https://www.google.com https://googleads.g.doubleclick.net https://www.googleadservices.com https://track.hubspot.com https://forms.hubspot.com https://forms.hsforms.com https://alb.reddit.com https://*.ads.linkedin.com;
media-src 'self' https://js.intercomcdn.com;
font-src 'self' https://fonts.intercomcdn.com/ https://fonts.gstatic.com;
"
diff --git a/frontend/src/components/announcements/AnnouncementModal.tsx b/frontend/src/components/announcements/AnnouncementModal.tsx
new file mode 100644
index 0000000000..11c020cbe9
--- /dev/null
+++ b/frontend/src/components/announcements/AnnouncementModal.tsx
@@ -0,0 +1,124 @@
+import { useEffect, useState } from "react";
+import { ChevronLeft, ChevronRight, ExternalLink } from "lucide-react";
+
+import {
+ Button,
+ Dialog,
+ DialogContent,
+ DialogDescription,
+ DialogHeader,
+ DialogTitle,
+ IconButton
+} from "@app/components/v3";
+import { TAnnouncement } from "@app/hooks/api/announcement";
+
+type Props = {
+ announcements: TAnnouncement[];
+ isOpen: boolean;
+ onOpenChange: (open: boolean) => void;
+};
+
+const dateFormatter = new Intl.DateTimeFormat(undefined, {
+ year: "numeric",
+ month: "long",
+ day: "numeric"
+});
+
+const formatPublished = (iso: string) => {
+ const date = new Date(iso);
+ return Number.isNaN(date.getTime()) ? null : dateFormatter.format(date);
+};
+
+export const AnnouncementModal = ({ announcements, isOpen, onOpenChange }: Props) => {
+ const [index, setIndex] = useState(0);
+
+ useEffect(() => {
+ if (isOpen) setIndex(0);
+ }, [isOpen]);
+
+ const announcement = announcements[index];
+ if (!announcement) return null;
+
+ const ctaLabel = announcement.linkLabel || (announcement.link ? "Learn more" : null);
+ const publishedLabel = formatPublished(announcement.published);
+ const total = announcements.length;
+ const hasPrev = index > 0;
+ const hasNext = index < total - 1;
+ const showPager = total > 1;
+
+ return (
+ <Dialog open={isOpen} onOpenChange={onOpenChange}>
+ <DialogContent className="max-w-xl overflow-hidden p-0">
+ {announcement.imageUrl && (
+ <div className="aspect-[16/9] w-full overflow-hidden bg-muted">
+ <img
+ src={announcement.imageUrl}
+ alt=""
+ loading="eager"
+ className="h-full w-full object-cover"
+ />
+ </div>
+ )}
+ <div className="flex flex-col gap-4 p-4">
+ <DialogHeader>
+ {publishedLabel && (
+ <time
+ dateTime={announcement.published}
+ className="text-xs font-medium tracking-wide text-muted uppercase"
+ >
+ {publishedLabel}
+ </time>
+ )}
+ <DialogTitle>{announcement.title}</DialogTitle>
+ <DialogDescription className="my-4 whitespace-pre-line text-foreground/75">
+ {announcement.body}
+ </DialogDescription>
+ {announcement.link && ctaLabel && (
+ <a
+ href={announcement.link}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="inline-flex w-fit items-center gap-1.5 text-sm text-white underline"
+ >
+ {ctaLabel}
+ <ExternalLink className="size-3.5" />
+ </a>
+ )}
+ </DialogHeader>
+ <div className="flex items-center justify-between gap-2">
+ {showPager ? (
+ <div className="flex items-center gap-1.5 text-sm text-muted">
+ <IconButton
+ variant="ghost"
+ size="xs"
+ aria-label="Previous announcement"
+ onClick={() => setIndex((i) => Math.max(0, i - 1))}
+ isDisabled={!hasPrev}
+ >
+ <ChevronLeft />
+ </IconButton>
+ <span className="tabular-nums">
+ {index + 1} / {total}
+ </span>
+ <IconButton
+ variant="ghost"
+ size="xs"
+ aria-label="Next announcement"
+ onClick={() => setIndex((i) => Math.min(total - 1, i + 1))}
+ isDisabled={!hasNext}
+ >
+ <ChevronRight />
+ </IconButton>
+ </div>
+ ) : (
+ <span aria-hidden="true" />
+ )}
+ <Button variant="outline" onClick={() => onOpenChange(false)}>
+ Got it
+ </Button>
+ </div>
+ </div>
+ </DialogContent>
+ </Dialog>
+ );
+};
diff --git a/frontend/src/components/announcements/AnnouncementNavButton.tsx b/frontend/src/components/announcements/AnnouncementNavButton.tsx
new file mode 100644
index 0000000000..e0d066e4e9
--- /dev/null
+++ b/frontend/src/components/announcements/AnnouncementNavButton.tsx
@@ -0,0 +1,55 @@
+import { useState } from "react";
+import { Megaphone } from "lucide-react";
+
+import { IconButton, Tooltip, TooltipContent, TooltipTrigger } from "@app/components/v3";
+import { useGetRecentAnnouncements } from "@app/hooks/api/announcement";
+
+import { AnnouncementModal } from "./AnnouncementModal";
+import { useAnnouncementSeen } from "./useAnnouncementSeen";
+
+export const AnnouncementNavButton = () => {
+ const { data } = useGetRecentAnnouncements();
+ const announcements = data?.announcements;
+ const { hasUnseen, markSeen } = useAnnouncementSeen();
+ const [isOpen, setIsOpen] = useState(false);
+
+ if (!announcements || announcements.length === 0) return null;
+
+ const latest = announcements[0];
+ const showUnreadDot = hasUnseen(latest.id);
+
+ const handleOpenChange = (open: boolean) => {
+ setIsOpen(open);
+ if (!open) markSeen(latest.id);
+ };
+
+ return (
+ <>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <IconButton
+ variant="outline"
+ size="sm"
+ aria-label="What's new"
+ className="relative"
+ onClick={() => setIsOpen(true)}
+ >
+ <Megaphone className={showUnreadDot ? "text-warning" : ""} />
+ {showUnreadDot && (
+ <span
+ aria-hidden="true"
+ className="absolute -top-0.5 -right-0.5 z-10 size-2 rounded-full bg-warning ring-2 ring-background"
+ />
+ )}
+ </IconButton>
+ </TooltipTrigger>
+ <TooltipContent side="bottom">What&apos;s New</TooltipContent>
+ </Tooltip>
+ <AnnouncementModal
+ announcements={announcements}
+ isOpen={isOpen}
+ onOpenChange={handleOpenChange}
+ />
+ </>
+ );
+};
diff --git a/frontend/src/components/announcements/useAnnouncementSeen.ts b/frontend/src/components/announcements/useAnnouncementSeen.ts
new file mode 100644
index 0000000000..38b29803ae
--- /dev/null
+++ b/frontend/src/components/announcements/useAnnouncementSeen.ts
@@ -0,0 +1,25 @@
+import { useCallback } from "react";
+
+import { useGetRecentAnnouncements, useMarkAnnouncementSeen } from "@app/hooks/api/announcement";
+
+export const useAnnouncementSeen = () => {
+ const { data } = useGetRecentAnnouncements();
+ const { mutate: markSeenMutation } = useMarkAnnouncementSeen();
+
+ const seenId = data?.lastSeenAnnouncementId ?? null;
+
+ const markSeen = useCallback(
+ (id: string) => {
+ if (id === seenId) return;
+ markSeenMutation(id);
+ },
+ [seenId, markSeenMutation]
+ );
+
+ const hasUnseen = useCallback(
+ (id: string | null | undefined) => Boolean(id && id !== seenId),
+ [seenId]
+ );
+
+ return { seenId, markSeen, hasUnseen };
+};
diff --git a/frontend/src/hooks/api/announcement/index.tsx b/frontend/src/hooks/api/announcement/index.tsx
new file mode 100644
index 0000000000..1833605030
--- /dev/null
+++ b/frontend/src/hooks/api/announcement/index.tsx
@@ -0,0 +1,3 @@
+export { useMarkAnnouncementSeen } from "./mutations";
+export { announcementKeys, useGetRecentAnnouncements } from "./queries";
+export type { TAnnouncement, TRecentAnnouncementsResponse } from "./types";
diff --git a/frontend/src/hooks/api/announcement/mutations.tsx b/frontend/src/hooks/api/announcement/mutations.tsx
new file mode 100644
index 0000000000..239cadb5fa
--- /dev/null
+++ b/frontend/src/hooks/api/announcement/mutations.tsx
@@ -0,0 +1,25 @@
+import { useMutation, useQueryClient } from "@tanstack/react-query";
+
+import { apiRequest } from "@app/config/request";
+
+import { announcementKeys } from "./queries";
+import { TRecentAnnouncementsResponse } from "./types";
+
+export const useMarkAnnouncementSeen = () => {
+ const queryClient = useQueryClient();
+
+ return useMutation({
+ mutationFn: async (announcementId: string) => {
+ const { data } = await apiRequest.post<{ lastSeenAnnouncementId: string | null }>(
+ "/api/v1/announcement/seen",
+ { announcementId }
+ );
+ return data.lastSeenAnnouncementId;
+ },
+ onSuccess: (lastSeenAnnouncementId) => {
+ queryClient.setQueryData<TRecentAnnouncementsResponse>(announcementKeys.recent(), (prev) =>
+ prev ? { ...prev, lastSeenAnnouncementId } : prev
+ );
+ }
+ });
+};
diff --git a/frontend/src/hooks/api/announcement/queries.tsx b/frontend/src/hooks/api/announcement/queries.tsx
new file mode 100644
index 0000000000..4ecc87cf0d
--- /dev/null
+++ b/frontend/src/hooks/api/announcement/queries.tsx
@@ -0,0 +1,28 @@
+import { useQuery } from "@tanstack/react-query";
+
+import { apiRequest } from "@app/config/request";
+
+import { TRecentAnnouncementsResponse } from "./types";
+
+export const announcementKeys = {
+ all: ["announcement"] as const,
+ recent: () => [...announcementKeys.all, "recent"] as const
+};
+
+export const useGetRecentAnnouncements = (enabled = true) => {
+ return useQuery({
+ queryKey: announcementKeys.recent(),
+ queryFn: async () => {
+ const { data } = await apiRequest.get<TRecentAnnouncementsResponse>(
+ "/api/v1/announcement/recent"
+ );
+ return data;
+ },
+ // Fetch once per session: a newly published announcement won't surface mid-session;
+ // the user picks it up on the next hard reload or new tab.
+ staleTime: Infinity,
+ refetchOnMount: false,
+ refetchOnReconnect: false,
+ enabled
+ });
+};
diff --git a/frontend/src/hooks/api/announcement/types.ts b/frontend/src/hooks/api/announcement/types.ts
new file mode 100644
index 0000000000..db7fc62b31
--- /dev/null
+++ b/frontend/src/hooks/api/announcement/types.ts
@@ -0,0 +1,14 @@
+export type TAnnouncement = {
+ id: string;
+ title: string;
+ body: string;
+ imageUrl: string | null;
+ link: string | null;
+ linkLabel: string | null;
+ published: string;
+};
+
+export type TRecentAnnouncementsResponse = {
+ announcements: TAnnouncement[];
+ lastSeenAnnouncementId: string | null;
+};
diff --git a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
index d9e205634a..42d1e0c8bb 100644
--- a/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/NavBar/Navbar.tsx
@@ -26,6 +26,7 @@ import {
} from "lucide-react";
import { twMerge } from "tailwind-merge";
+import { AnnouncementNavButton } from "@app/components/announcements/AnnouncementNavButton";
import { Mfa } from "@app/components/auth/Mfa";
import { createNotification } from "@app/components/notifications";
import { OrgPermissionCan } from "@app/components/permissions";
@@ -659,6 +660,7 @@ export const Navbar = () => {
)}
</DropdownMenuContent>
</DropdownMenu>
+ <AnnouncementNavButton />
<NotificationDropdown />
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
diff --git a/frontend/src/layouts/OrganizationLayout/components/NavBar/NotificationDropdown.tsx b/frontend/src/layouts/OrganizationLayout/components/NavBar/NotificationDropdown.tsx
index d9e533f1bc..77c1fe1794 100644
--- a/frontend/src/layouts/OrganizationLayout/components/NavBar/NotificationDropdown.tsx
+++ b/frontend/src/layouts/OrganizationLayout/components/NavBar/NotificationDropdown.tsx
@@ -2,7 +2,7 @@ import { useMemo } from "react";
import { faBell } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useRouter } from "@tanstack/react-router";
-import { Bell, BellDotIcon } from "lucide-react";
+import { Bell, BellIcon } from "lucide-react";
import {
ContentLoader,
@@ -45,7 +45,13 @@ export const NotificationDropdown = () => {
<DropdownMenu modal={false}>
<DropdownMenuTrigger asChild>
<IconButton variant="outline" size="sm" aria-label="Notifications" className="relative">
- {unreadCount > 0 ? <BellDotIcon className="text-warning" /> : <Bell />}
+ {unreadCount > 0 ? <BellIcon className="text-warning" /> : <Bell />}
+ {unreadCount > 0 && (
+ <span
+ aria-hidden="true"
+ className="absolute -top-0.5 -right-0.5 z-10 size-2 rounded-full bg-warning ring-2 ring-background"
+ />
+ )}
</IconButton>
</DropdownMenuTrigger>
<DropdownMenuContent
diff --git a/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx b/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
index 0f577aa463..21b5224201 100644
--- a/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
+++ b/frontend/src/pages/organization/ProjectsPage/ProjectsPage.tsx
@@ -1,13 +1,16 @@
// REFACTOR(akhilmhdh): This file needs to be split into multiple components too complex
-import { useState } from "react";
+import { useEffect, useState } from "react";
import { Helmet } from "react-helmet";
import { useTranslation } from "react-i18next";
import { Outlet, useMatches } from "@tanstack/react-router";
+import { AnnouncementModal } from "@app/components/announcements/AnnouncementModal";
+import { useAnnouncementSeen } from "@app/components/announcements/useAnnouncementSeen";
import { UpgradePlanModal } from "@app/components/license/UpgradePlanModal";
import { NewProjectModal } from "@app/components/projects";
import { PageHeader } from "@app/components/v2";
import { useOrganization, useSubscription } from "@app/context";
+import { useGetRecentAnnouncements } from "@app/hooks/api/announcement";
import { usePopUp } from "@app/hooks/usePopUp";
import { AllProjectView } from "./components/AllProjectView";
@@ -52,6 +55,23 @@ export const ProjectsPage = () => {
"upgradePlan"
] as const);
+ const { data: announcementData } = useGetRecentAnnouncements(!hasChildRoute);
+ const announcements = announcementData?.announcements;
+ const latestAnnouncement = announcements?.[0];
+ const { hasUnseen, markSeen } = useAnnouncementSeen();
+ const [isAnnouncementOpen, setIsAnnouncementOpen] = useState(false);
+
+ useEffect(() => {
+ if (latestAnnouncement && hasUnseen(latestAnnouncement.id)) {
+ setIsAnnouncementOpen(true);
+ }
+ }, [latestAnnouncement?.id]);
+
+ const handleAnnouncementOpenChange = (open: boolean) => {
+ setIsAnnouncementOpen(open);
+ if (!open && latestAnnouncement) markSeen(latestAnnouncement.id);
+ };
+
const { subscription } = useSubscription();
const { isSubOrganization } = useOrganization();
const isAddingProjectsAllowed = subscription?.workspaceLimit
@@ -98,6 +118,13 @@ export const ProjectsPage = () => {
onOpenChange={(isOpen) => handlePopUpToggle("upgradePlan", isOpen)}
text="You have reached the maximum number of projects allowed on your current plan. Upgrade to Infisical Pro plan to add more projects."
/>
+ {announcements && announcements.length > 0 && (
+ <AnnouncementModal
+ announcements={announcements}
+ isOpen={isAnnouncementOpen}
+ onOpenChange={handleAnnouncementOpenChange}
+ />
+ )}
</div>
);
};