SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
fix: added fix for changelog modal auto popup for new users (#8634)
Abhi kumar4888491a79b7
diff --git a/frontend/src/constants/changelog.ts b/frontend/src/constants/changelog.tsnew file mode 100644index 0000000000..14d3a7a183--- /dev/null+++ b/frontend/src/constants/changelog.ts@@ -0,0 +1 @@+export const MIN_ACCOUNT_AGE_FOR_CHANGELOG = 14;diff --git a/frontend/src/container/AppLayout/index.tsx b/frontend/src/container/AppLayout/index.tsxindex e467d39870..49d29f7775 100644--- a/frontend/src/container/AppLayout/index.tsx+++ b/frontend/src/container/AppLayout/index.tsx@@ -17,6 +17,7 @@ import ChangelogModal from 'components/ChangelogModal/ChangelogModal';import ChatSupportGateway from 'components/ChatSupportGateway/ChatSupportGateway';import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';import RefreshPaymentStatus from 'components/RefreshPaymentStatus/RefreshPaymentStatus';+import { MIN_ACCOUNT_AGE_FOR_CHANGELOG } from 'constants/changelog';import { Events } from 'constants/events';import { FeatureKeys } from 'constants/features';import { LOCALSTORAGE } from 'constants/localStorage';@@ -132,6 +133,13 @@ function AppLayout(props: AppLayoutProps): JSX.Element {);}, [activeLicense]);+ const daysSinceAccountCreation = useMemo(() => {+ const userCreationDate = dayjs(user.createdAt);+ const currentDate = dayjs();++ return Math.abs(currentDate.diff(userCreationDate, 'day'));+ }, [user.createdAt]);+const handleBillingOnSuccess = (data: SuccessResponseV2<CheckoutSuccessPayloadProps>,): void => {@@ -222,6 +230,7 @@ function AppLayout(props: AppLayoutProps): JSX.Element {isCloudUserVal &&Boolean(latestVersion) &&latestVersion !== seenChangelogVersion &&+ daysSinceAccountCreation > MIN_ACCOUNT_AGE_FOR_CHANGELOG && // Show to only users older than 2 weeks!isWorkspaceAccessRestricted) {// Automatically open the changelog modal for cloud users after 1s, if they've not seen this version before.@@ -233,6 +242,7 @@ function AppLayout(props: AppLayoutProps): JSX.Element {return (): void => {clearInterval(timer);};+ // eslint-disable-next-line react-hooks/exhaustive-deps}, [isCloudUserVal,latestVersion,