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
feat(changelog): show changelogs for newer versions available (#8270)
Abhi kumar3b1bf34d3e8f
diff --git a/frontend/src/api/changelog/getChangelogByVersion.ts b/frontend/src/api/changelog/getChangelogByVersion.tsnew file mode 100644index 0000000000..849c3a9f15--- /dev/null+++ b/frontend/src/api/changelog/getChangelogByVersion.ts@@ -0,0 +1,29 @@+import { ErrorResponseHandler } from 'api/ErrorResponseHandler';+import axios, { AxiosError } from 'axios';+import { ErrorResponse, SuccessResponse } from 'types/api';+import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';++const getChangelogByVersion = async (+ versionId: string,+): Promise<SuccessResponse<ChangelogSchema> | ErrorResponse> => {+ try {+ const response = await axios.get(`+ https://cms.signoz.cloud/api/release-changelogs?filters[version][$eq]=${versionId}&populate[features][sort]=sort_order:asc&populate[features][populate][media][fields]=id,ext,url,mime,alternativeText+ `);++ if (!Array.isArray(response.data.data) || response.data.data.length === 0) {+ throw new Error('No changelog found!');+ }++ return {+ statusCode: 200,+ error: null,+ message: response.statusText,+ payload: response.data.data[0],+ };+ } catch (error) {+ return ErrorResponseHandler(error as AxiosError);+ }+};++export default getChangelogByVersion;diff --git a/frontend/src/components/ChangelogModal/ChangelogModal.styles.scss b/frontend/src/components/ChangelogModal/ChangelogModal.styles.scssnew file mode 100644index 0000000000..8f6e992080--- /dev/null+++ b/frontend/src/components/ChangelogModal/ChangelogModal.styles.scss@@ -0,0 +1,161 @@+.changelog-modal {+ .ant-modal-content {+ padding: unset;+ background-color: var(--bg-ink-400, #121317);++ .ant-modal-header {+ margin-bottom: unset;+ }++ .ant-modal-footer {+ margin-top: unset;+ }+ }++ &-title {+ display: flex;+ align-items: center;+ gap: 8px;+ background-color: var(--bg-ink-400, #121317);+ padding: 16px;+ font-size: 14px;+ line-height: 20px;+ color: var(--text-vanilla-100, #fff);+ border-bottom: 1px solid var(--bg-slate-500, #161922);+ }++ &-footer.scroll-available {+ .scroll-btn-container {+ display: block;+ }+ }++ &-footer {+ position: relative;+ border: 1px solid var(--bg-slate-500, #161922);+ padding: 12px;+ display: flex;+ align-items: center;+ justify-content: space-between;++ &-label {+ color: var(--text-robin-400, #7190f9);+ font-size: 14px;+ line-height: 24px;+ position: relative;+ padding-left: 14px;++ &::before {+ content: '';+ position: absolute;+ top: 50%;+ left: 0;+ transform: translateY(-50%);+ width: 6px;+ height: 6px;+ border-radius: 100%;+ background-color: var(--bg-robin-500, #7190f9);+ }+ }++ &-ctas {+ display: flex;++ & svg {+ font-size: 14px;+ }+ }++ .scroll-btn-container {+ display: none;+ position: absolute;+ top: -40px;+ left: 50%;+ transform: translateX(-50%);++ .scroll-btn {+ all: unset;+ padding: 4px 12px 4px 10px;+ background-color: var(--bg-slate-400, #1d212d);+ border-radius: 20px;+ cursor: pointer;+ display: flex;+ align-items: center;+ justify-content: center;+ gap: 4px;+ transition: background-color 0.1s;++ &:hover {+ background-color: var(--bg-slate-200, #2c3140);+ }++ &:active {+ background-color: var(--bg-slate-600, #1c1f2a);+ }++ span {+ font-size: 12px;+ line-height: 18px;+ color: var(--text-vanilla-400, #c0c1c3);+ }++ // add animation to the chevrons down icon+ svg {+ animation: pulse 1s infinite;+ }+ }+ }+ }++ &-content {+ max-height: calc(100vh - 300px);+ overflow-y: auto;+ padding: 16px;+ border: 1px solid var(--bg-slate-500, #161922);+ border-top-width: 0;+ border-bottom-width: 0;+ }+}++// pulse for the scroll for more icon+@keyframes pulse {+ 0% {+ opacity: 1;+ }+ 50% {+ opacity: 0.5;+ }+}++.lightMode {+ .changelog-modal {+ .ant-modal-content {+ background-color: var(--bg-vanilla-100);+ border-color: var(--bg-vanilla-300);+ }++ &-title {+ background: var(--bg-vanilla-100);+ color: var(--bg-ink-500);+ border-color: var(--bg-vanilla-300);+ }++ &-content {+ border-color: var(--bg-vanilla-300);+ }++ &-footer {+ border-color: var(--bg-vanilla-300);++ .scroll-btn-container {+ .scroll-btn {+ background-color: var(--bg-vanilla-300);++ span {+ color: var(--text-ink-500);+ }+ }+ }+ }+ }+}diff --git a/frontend/src/components/ChangelogModal/ChangelogModal.tsx b/frontend/src/components/ChangelogModal/ChangelogModal.tsxnew file mode 100644index 0000000000..90757cd2c7--- /dev/null+++ b/frontend/src/components/ChangelogModal/ChangelogModal.tsx@@ -0,0 +1,131 @@+import './ChangelogModal.styles.scss';++import { CheckOutlined, CloseOutlined } from '@ant-design/icons';+import { Button, Modal } from 'antd';+import cx from 'classnames';+import dayjs from 'dayjs';+import { ChevronsDown, ScrollText } from 'lucide-react';+import { useAppContext } from 'providers/App/App';+import { useCallback, useEffect, useRef, useState } from 'react';++import ChangelogRenderer from './components/ChangelogRenderer';++interface Props {+ onClose: () => void;+}++function ChangelogModal({ onClose }: Props): JSX.Element {+ const [hasScroll, setHasScroll] = useState(false);+ const changelogContentSectionRef = useRef<HTMLDivElement>(null);+ const { changelog } = useAppContext();++ const formattedReleaseDate = dayjs(changelog?.release_date).format(+ 'MMMM D, YYYY',+ );++ const checkScroll = useCallback((): void => {+ if (changelogContentSectionRef.current) {+ const {+ scrollHeight,+ clientHeight,+ scrollTop,+ } = changelogContentSectionRef.current;+ const isAtBottom = scrollHeight - clientHeight - scrollTop <= 8;+ setHasScroll(scrollHeight > clientHeight + 24 && !isAtBottom); // 24px - buffer height to show show more+ }+ }, []);++ useEffect(() => {+ checkScroll();+ const changelogContentSection = changelogContentSectionRef.current;++ if (changelogContentSection) {+ changelogContentSection.addEventListener('scroll', checkScroll);+ }++ return (): void => {+ if (changelogContentSection) {+ changelogContentSection.removeEventListener('scroll', checkScroll);+ }+ };+ }, [checkScroll]);++ const onClickUpdateWorkspace = (): void => {+ window.open(+ 'https://github.com/SigNoz/signoz/releases',+ '_blank',+ 'noopener,noreferrer',+ );+ };++ const onClickScrollForMore = (): void => {+ if (changelogContentSectionRef.current) {+ changelogContentSectionRef.current.scrollTo({+ top: changelogContentSectionRef.current.scrollTop + 600, // Scroll 600px from the current position+ behavior: 'smooth',+ });+ }+ };++ return (+ <Modal+ className={cx('changelog-modal')}+ title={+ <div className="changelog-modal-title">+ <ScrollText size={16} />+ What’s New ⎯ Changelog : {formattedReleaseDate}+ </div>+ }+ width={820}+ open+ onCancel={onClose}+ footer={+ <div+ className={cx('changelog-modal-footer', hasScroll && 'scroll-available')}+ >+ {changelog?.features && changelog.features.length > 0 && (+ <span className="changelog-modal-footer-label">+ {changelog.features.length} new + {changelog.features.length > 1 ? 'features' : 'feature'}+ </span>+ )}+ <div className="changelog-modal-footer-ctas">+ <Button type="default" icon={<CloseOutlined />} onClick={onClose}>+ Skip for now+ </Button>+ <Button+ type="primary"+ icon={<CheckOutlined />}+ onClick={onClickUpdateWorkspace}+ >+ Update my workspace+ </Button>+ </div>+ {changelog && (+ <div className="scroll-btn-container">+ <button+ data-testid="scroll-more-btn"+ type="button"+ className="scroll-btn"+ onClick={onClickScrollForMore}+ >+ <ChevronsDown size={14} />+ <span>Scroll for more</span>+ </button>+ </div>+ )}+ </div>+ }+ >+ <div+ className="changelog-modal-content"+ data-testid="changelog-content"+ ref={changelogContentSectionRef}+ >+ {changelog && <ChangelogRenderer changelog={changelog} />}+ </div>+ </Modal>+ );+}++export default ChangelogModal;diff --git a/frontend/src/components/ChangelogModal/__test__/ChangelogModal.test.tsx b/frontend/src/components/ChangelogModal/__test__/ChangelogModal.test.tsxnew file mode 100644index 0000000000..c8a65e1db0--- /dev/null+++ b/frontend/src/components/ChangelogModal/__test__/ChangelogModal.test.tsx@@ -0,0 +1,79 @@+/* eslint-disable sonarjs/no-duplicate-string */+/* eslint-disable sonarjs/no-identical-functions */+/* eslint-disable @typescript-eslint/explicit-function-return-type */++import { fireEvent, render, screen } from '@testing-library/react';++import ChangelogModal from '../ChangelogModal';++const mockChangelog = {+ release_date: '2025-06-10',+ features: [+ {+ id: 1,+ title: 'Feature 1',+ description: 'Description for feature 1',+ media: null,+ },+ ],+ bug_fixes: 'Bug fix details',+ maintenance: 'Maintenance details',+};++// Mock react-markdown to just render children as plain text+jest.mock(+ 'react-markdown',+ () =>+ function ReactMarkdown({ children }: any) {+ return <div>{children}</div>;+ },+);++// mock useAppContext+jest.mock('providers/App/App', () => ({+ useAppContext: jest.fn(() => ({ changelog: mockChangelog })),+}));++describe('ChangelogModal', () => {+ it('renders modal with changelog data', () => {+ render(<ChangelogModal onClose={jest.fn()} />);+ expect(+ screen.getByText('What’s New ⎯ Changelog : June 10, 2025'),+ ).toBeInTheDocument();+ expect(screen.getByText('Feature 1')).toBeInTheDocument();+ expect(screen.getByText('Description for feature 1')).toBeInTheDocument();+ expect(screen.getByText('Bug fix details')).toBeInTheDocument();+ expect(screen.getByText('Maintenance details')).toBeInTheDocument();+ });++ it('calls onClose when Skip for now is clicked', () => {+ const onClose = jest.fn();+ render(<ChangelogModal onClose={onClose} />);+ fireEvent.click(screen.getByText('Skip for now'));+ expect(onClose).toHaveBeenCalled();+ });++ it('opens migration docs when Update my workspace is clicked', () => {+ window.open = jest.fn();+ render(<ChangelogModal onClose={jest.fn()} />);+ fireEvent.click(screen.getByText('Update my workspace'));+ expect(window.open).toHaveBeenCalledWith(+ 'https://github.com/SigNoz/signoz/releases',+ '_blank',+ 'noopener,noreferrer',+ );+ });++ it('scrolls for more when Scroll for more is clicked', () => {+ render(<ChangelogModal onClose={jest.fn()} />);+ const scrollBtn = screen.getByTestId('scroll-more-btn');+ const contentDiv = screen.getByTestId('changelog-content');+ if (contentDiv) {+ contentDiv.scrollTo = jest.fn();+ }+ fireEvent.click(scrollBtn);+ if (contentDiv) {+ expect(contentDiv.scrollTo).toHaveBeenCalled();+ }+ });+});diff --git a/frontend/src/components/ChangelogModal/__test__/ChangelogRenderer.test.tsx b/frontend/src/components/ChangelogModal/__test__/ChangelogRenderer.test.tsxnew file mode 100644index 0000000000..4667c41162--- /dev/null+++ b/frontend/src/components/ChangelogModal/__test__/ChangelogRenderer.test.tsx@@ -0,0 +1,63 @@+/* eslint-disable sonarjs/no-duplicate-string */+/* eslint-disable sonarjs/no-identical-functions */+/* eslint-disable @typescript-eslint/explicit-function-return-type */++import { render, screen } from '@testing-library/react';++import ChangelogRenderer from '../components/ChangelogRenderer';++// Mock react-markdown to just render children as plain text+jest.mock(+ 'react-markdown',+ () =>+ function ReactMarkdown({ children }: any) {+ return <div>{children}</div>;+ },+);++const mockChangelog = {+ id: 1,+ documentId: 'changelog-doc-1',+ version: '1.0.0',+ createdAt: '2025-06-09T12:00:00Z',+ release_date: '2025-06-10',+ features: [+ {+ id: 1,+ documentId: '1',+ title: 'Feature 1',+ description: 'Description for feature 1',+ sort_order: 1,+ createdAt: '',+ updatedAt: '',+ publishedAt: '',+ deployment_type: 'All',+ media: {+ id: 1,+ documentId: 'doc1',+ ext: '.webp',+ url: '/uploads/feature1.webp',+ mime: 'image/webp',+ alternativeText: null,+ },+ },+ ],+ bug_fixes: 'Bug fix details',+ updatedAt: '2025-06-09T12:00:00Z',+ publishedAt: '2025-06-09T12:00:00Z',+ maintenance: 'Maintenance details',+};++describe('ChangelogRenderer', () => {+ it('renders release date', () => {+ render(<ChangelogRenderer changelog={mockChangelog} />);+ expect(screen.getByText('June 10, 2025')).toBeInTheDocument();+ });++ it('renders features, media, and description', () => {+ render(<ChangelogRenderer changelog={mockChangelog} />);+ expect(screen.getByText('Feature 1')).toBeInTheDocument();+ expect(screen.getByAltText('Media')).toBeInTheDocument();+ expect(screen.getByText('Description for feature 1')).toBeInTheDocument();+ });+});diff --git a/frontend/src/components/ChangelogModal/components/ChangelogRenderer.styles.scss b/frontend/src/components/ChangelogModal/components/ChangelogRenderer.styles.scssnew file mode 100644index 0000000000..a56ac7492c--- /dev/null+++ b/frontend/src/components/ChangelogModal/components/ChangelogRenderer.styles.scss@@ -0,0 +1,136 @@+.changelog-renderer {+ position: relative;+ padding-left: 20px;++ .changelog-release-date {+ font-size: 14px;+ line-height: 20px;+ color: var(--text-vanilla-400, #c0c1c3);+ }++ &-list {+ display: flex;+ flex-direction: column;+ gap: 28px;+ }++ &-line {+ position: absolute;+ left: 0;+ top: 6px;+ bottom: -30px;+ width: 1px;+ background-color: var(--bg-slate-400, #1d212d);++ .inner-ball {+ position: absolute;+ left: 50%;+ width: 6px;+ height: 6px;+ border-radius: 100%;+ transform: translateX(-50%);+ background-color: var(--bg-robin-500, #7190f9);+ }+ }++ ul,+ ol {+ list-style: none;+ display: flex;+ flex-direction: column;+ gap: 16px;+ padding-left: 30px;++ li {+ position: relative;+ &::before {+ content: '';+ position: absolute;+ left: -10px;+ top: 10px;+ width: 20px;+ height: 2px;+ background-color: var(--bg-robin-500, #7190f9);+ transform: translate(-100%, -50%);+ }+ }+ }++ li,+ p {+ font-size: 14px;+ line-height: 20px;+ color: var(--text-vanilla-400, #c0c1c3);+ }++ code {+ padding: 2px 4px;+ background-color: var(--bg-slate-500, #161922);+ border-radius: 6px;+ font-size: 95%;+ vertical-align: middle;+ border: 1px solid var(--bg-slate-600, #1c1f2a);+ }+ a {+ color: var(--text-robin-500, #7190f9);+ font-weight: 600;+ text-decoration: underline;++ &:hover {+ text-decoration: none;+ }+ }++ h1,+ h2,+ h3,+ h4,+ h5,+ h6 {+ font-weight: 600;+ color: var(--text-vanilla-100, #fff);+ }++ h1 {+ font-size: 24px;+ line-height: 32px;+ }++ h2 {+ font-size: 20px;+ line-height: 28px;+ }++ .changelog-media-image {+ height: auto;+ width: 100%;+ overflow: hidden;+ border-radius: 4px;+ border: 1px solid var(--bg-slate-400, #1d212d);+ }+}++.lightMode {+ .changelog-renderer {+ .changelog-release-date {+ color: var(--text-ink-500);+ }++ &-line {+ background-color: var(--bg-vanilla-300);+ }+ li,+ p {+ color: var(--text-ink-500);+ }++ h1,+ h2,+ h3,+ h4,+ h5,+ h6 {+ color: var(--text-ink-500);+ }+ }+}diff --git a/frontend/src/components/ChangelogModal/components/ChangelogRenderer.tsx b/frontend/src/components/ChangelogModal/components/ChangelogRenderer.tsxnew file mode 100644index 0000000000..63aa1037df--- /dev/null+++ b/frontend/src/components/ChangelogModal/components/ChangelogRenderer.tsx@@ -0,0 +1,89 @@+import './ChangelogRenderer.styles.scss';++import dayjs from 'dayjs';+import ReactMarkdown from 'react-markdown';+import {+ ChangelogSchema,+ Media,+ SupportedImageTypes,+ SupportedVideoTypes,+} from 'types/api/changelog/getChangelogByVersion';++interface Props {+ changelog: ChangelogSchema;+}++function renderMedia(media: Media): JSX.Element | null {+ if (SupportedImageTypes.includes(media.ext)) {+ return (+ <img+ src={media.url}+ alt={media.alternativeText || 'Media'}+ width={800}+ height={450}+ className="changelog-media-image"+ />+ );+ }+ if (SupportedVideoTypes.includes(media.ext)) {+ return (+ <video+ autoPlay+ controls+ controlsList="nodownload noplaybackrate"+ loop+ className="my-3 h-auto w-full rounded"+ >+ <source src={media.url} type={media.mime} />+ <track kind="captions" src="" label="No captions available" default />+ Your browser does not support the video tag.+ </video>+ );+ }++ return null;+}++function ChangelogRenderer({ changelog }: Props): JSX.Element {+ const formattedReleaseDate = dayjs(changelog.release_date).format(+ 'MMMM D, YYYY',+ );++ return (+ <div className="changelog-renderer">+ <div className="changelog-renderer-line">+ <div className="inner-ball" />+ </div>+ <span className="changelog-release-date">{formattedReleaseDate}</span>+ {changelog.features && changelog.features.length > 0 && (+ <div className="changelog-renderer-list flex flex-col gap-7">+ {changelog.features.map((feature) => (+ <div key={feature.id}>+ <h2>{feature.title}</h2>+ {feature.media && renderMedia(feature.media)}+ <ReactMarkdown>{feature.description}</ReactMarkdown>+ </div>+ ))}+ </div>+ )}+ {changelog.bug_fixes && changelog.bug_fixes.length > 0 && (+ <div>+ <h2>Bug Fixes</h2>+ {changelog.bug_fixes && (+ <ReactMarkdown>{changelog.bug_fixes}</ReactMarkdown>+ )}+ </div>+ )}+ {changelog.maintenance && changelog.maintenance.length > 0 && (+ <div>+ <h2>Maintenance</h2>+ {changelog.maintenance && (+ <ReactMarkdown>{changelog.maintenance}</ReactMarkdown>+ )}+ </div>+ )}+ </div>+ );+}++export default ChangelogRenderer;diff --git a/frontend/src/container/AppLayout/index.tsx b/frontend/src/container/AppLayout/index.tsxindex 34409b1826..6e0b3b4348 100644--- a/frontend/src/container/AppLayout/index.tsx+++ b/frontend/src/container/AppLayout/index.tsx@@ -7,6 +7,7 @@ import * as Sentry from '@sentry/react';import { Flex } from 'antd';import getLocalStorageApi from 'api/browser/localstorage/get';import setLocalStorageApi from 'api/browser/localstorage/set';+import getChangelogByVersion from 'api/changelog/getChangelogByVersion';import logEvent from 'api/common/logEvent';import manageCreditCardApi from 'api/v1/portal/create';import getUserLatestVersion from 'api/v1/version/getLatestVersion';@@ -40,9 +41,10 @@ import {import { Helmet } from 'react-helmet-async';import { useTranslation } from 'react-i18next';import { useMutation, useQueries } from 'react-query';-import { useDispatch } from 'react-redux';+import { useDispatch, useSelector } from 'react-redux';import { useLocation } from 'react-router-dom';import { Dispatch } from 'redux';+import { AppState } from 'store/reducers';import AppActions from 'types/actions';import {UPDATE_CURRENT_ERROR,@@ -50,15 +52,18 @@ import {UPDATE_LATEST_VERSION,UPDATE_LATEST_VERSION_ERROR,} from 'types/actions/app';-import { SuccessResponseV2 } from 'types/api';+import { ErrorResponse, SuccessResponse, SuccessResponseV2 } from 'types/api';import { CheckoutSuccessPayloadProps } from 'types/api/billing/checkout';+import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';import APIError from 'types/api/error';import {LicenseEvent,LicensePlatform,LicenseState,} from 'types/api/licensesV3/getActive';+import AppReducer from 'types/reducer/app';import { USER_ROLES } from 'types/roles';+import { checkVersionState } from 'utils/app';import { eventEmitter } from 'utils/getEventEmitter';import {getFormattedDate,@@ -81,6 +86,7 @@ function AppLayout(props: AppLayoutProps): JSX.Element {isFetchingFeatureFlags,featureFlagsFetchError,userPreferences,+ updateChangelog,} = useAppContext();const { notifications } = useNotifications();@@ -92,6 +98,15 @@ function AppLayout(props: AppLayoutProps): JSX.Element {const [showSlowApiWarning, setShowSlowApiWarning] = useState(false);const [slowApiWarningShown, setSlowApiWarningShown] = useState(false);+ const [shouldFetchChangelog, setShouldFetchChangelog] = useState<boolean>(+ false,+ );++ const { currentVersion, latestVersion } = useSelector<AppState, AppReducer>(+ (state) => state.app,+ );++ const isLatestVersion = checkVersionState(currentVersion, latestVersion);const handleBillingOnSuccess = (data: SuccessResponseV2<CheckoutSuccessPayloadProps>,@@ -129,7 +144,11 @@ function AppLayout(props: AppLayoutProps): JSX.Element {const { isCloudUser: isCloudUserVal } = useGetTenantLicense();- const [getUserVersionResponse, getUserLatestVersionResponse] = useQueries([+ const [+ getUserVersionResponse,+ getUserLatestVersionResponse,+ getChangelogByVersionResponse,+ ] = useQueries([{queryFn: getUserVersion,queryKey: ['getUserVersion', user?.accessJwt],@@ -140,6 +159,12 @@ function AppLayout(props: AppLayoutProps): JSX.Element {queryKey: ['getUserLatestVersion', user?.accessJwt],enabled: isLoggedIn,},+ {+ queryFn: (): Promise<SuccessResponse<ChangelogSchema> | ErrorResponse> =>+ getChangelogByVersion(latestVersion),+ queryKey: ['getChangelogByVersion', latestVersion],+ enabled: isLoggedIn && !isCloudUserVal && shouldFetchChangelog,+ },]);useEffect(() => {@@ -242,6 +267,30 @@ function AppLayout(props: AppLayoutProps): JSX.Element {notifications,]);+ useEffect(() => {+ if (!isLatestVersion) {+ setShouldFetchChangelog(true);+ }+ }, [isLatestVersion]);++ useEffect(() => {+ if (+ getChangelogByVersionResponse.isFetched &&+ getChangelogByVersionResponse.isSuccess &&+ getChangelogByVersionResponse.data &&+ getChangelogByVersionResponse.data.payload+ ) {+ updateChangelog(getChangelogByVersionResponse.data.payload);+ }+ }, [+ updateChangelog,+ getChangelogByVersionResponse.isFetched,+ getChangelogByVersionResponse.isLoading,+ getChangelogByVersionResponse.isError,+ getChangelogByVersionResponse.data,+ getChangelogByVersionResponse.isSuccess,+ ]);+const isToDisplayLayout = isLoggedIn;const routeKey = useMemo(() => getRouteKey(pathname), [pathname]);diff --git a/frontend/src/container/SideNav/SideNav.tsx b/frontend/src/container/SideNav/SideNav.tsxindex 1deb6c4732..40cbbd2add 100644--- a/frontend/src/container/SideNav/SideNav.tsx+++ b/frontend/src/container/SideNav/SideNav.tsx@@ -23,6 +23,7 @@ import logEvent from 'api/common/logEvent';import { Logout } from 'api/utils';import updateUserPreference from 'api/v1/user/preferences/name/update';import cx from 'classnames';+import ChangelogModal from 'components/ChangelogModal/ChangelogModal';import { FeatureKeys } from 'constants/features';import ROUTES from 'constants/routes';import { GlobalShortcuts } from 'constants/shortcuts/globalShortcuts';@@ -124,6 +125,7 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {trialInfo,isLoggedIn,userPreferences,+ changelog,updateUserPreferenceInContext,} = useAppContext();@@ -155,6 +157,7 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {const [hasScroll, setHasScroll] = useState(false);const navTopSectionRef = useRef<HTMLDivElement>(null);+ const [showChangelogModal, setShowChangelogModal] = useState<boolean>(false);const checkScroll = useCallback((): void => {if (navTopSectionRef.current) {@@ -737,20 +740,13 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {// eslint-disable-next-line react-hooks/exhaustive-deps}, [isCloudUser, isEnterpriseSelfHostedUser]);- const onClickVersionHandler = useCallback(- (event: MouseEvent): void => {- if (isCloudUser) {- return;- }+ const onClickVersionHandler = useCallback((): void => {+ if (isCloudUser) {+ return;+ }- if (isCtrlMetaKey(event)) {- openInNewTab(ROUTES.VERSION);- } else {- history.push(ROUTES.VERSION);- }- },- [isCloudUser],- );+ setShowChangelogModal(true);+ }, [isCloudUser]);useEffect(() => {if (!isLatestVersion && !isCloudUser) {@@ -790,7 +786,9 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {'brand-title-section',isCommunityEnterpriseUser && 'community-enterprise-user',isCloudUser && 'cloud-user',- showVersionUpdateNotification && 'version-update-notification',+ showVersionUpdateNotification &&+ changelog &&+ 'version-update-notification',)}><span className="license-type"> {licenseTag} </span>@@ -801,7 +799,8 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {overlayClassName="version-tooltip-overlay"arrow={false}overlay={- showVersionUpdateNotification && (+ showVersionUpdateNotification &&+ changelog && (<div className="version-update-notification-tooltip"><div className="version-update-notification-tooltip-title">There's a new version available.@@ -819,7 +818,7 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {{currentVersion}</span>- {showVersionUpdateNotification && (+ {showVersionUpdateNotification && changelog && (<span className="version-update-notification-dot-icon" />)}</div>@@ -1050,6 +1049,9 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {</div></div></Modal>+ {showChangelogModal && (+ <ChangelogModal onClose={(): void => setShowChangelogModal(false)} />+ )}</div>);}diff --git a/frontend/src/providers/App/App.tsx b/frontend/src/providers/App/App.tsxindex e0d0aafa81..e7b9ab9aa9 100644--- a/frontend/src/providers/App/App.tsx+++ b/frontend/src/providers/App/App.tsx@@ -19,6 +19,7 @@ import {useState,} from 'react';import { useQuery } from 'react-query';+import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';import { FeatureFlagProps as FeatureFlags } from 'types/api/features/getFeaturesFlags';import {LicensePlatform,@@ -58,6 +59,7 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {(): boolean => getLocalStorageApi(LOCALSTORAGE.IS_LOGGED_IN) === 'true',);const [org, setOrg] = useState<Organization[] | null>(null);+ const [changelog, setChangelog] = useState<ChangelogSchema | null>(null);// if the user.id is not present, for migration older cases then we need to logout only for current logged in users!useEffect(() => {@@ -253,6 +255,13 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {[org],);+ const updateChangelog = useCallback(+ (payload: ChangelogSchema): void => {+ setChangelog(payload);+ },+ [setChangelog],+ );+// global event listener for AFTER_LOGIN event to start the user fetch post all actions are completeuseGlobalEventListener('AFTER_LOGIN', (event) => {if (event.detail) {@@ -296,11 +305,13 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {featureFlagsFetchError,orgPreferencesFetchError,activeLicense,+ changelog,activeLicenseRefetch,updateUser,updateOrgPreferences,updateUserPreferenceInContext,updateOrg,+ updateChangelog,versionData: versionData?.payload || null,}),[@@ -319,8 +330,10 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {orgPreferences,activeLicenseRefetch,orgPreferencesFetchError,+ changelog,updateUserPreferenceInContext,updateOrg,+ updateChangelog,user,userFetchError,versionData,diff --git a/frontend/src/providers/App/types.ts b/frontend/src/providers/App/types.tsindex 7369a816d1..1fc32028de 100644--- a/frontend/src/providers/App/types.ts+++ b/frontend/src/providers/App/types.ts@@ -1,3 +1,4 @@+import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';import APIError from 'types/api/error';import { FeatureFlagProps as FeatureFlags } from 'types/api/features/getFeaturesFlags';import { LicenseResModel, TrialInfo } from 'types/api/licensesV3/getActive';@@ -26,11 +27,13 @@ export interface IAppContext {activeLicenseFetchError: APIError | null;featureFlagsFetchError: unknown;orgPreferencesFetchError: unknown;+ changelog: ChangelogSchema | null;activeLicenseRefetch: () => void;updateUser: (user: IUser) => void;updateOrgPreferences: (orgPreferences: OrgPreference[]) => void;updateUserPreferenceInContext: (userPreference: UserPreference) => void;updateOrg(orgId: string, updatedOrgName: string): void;+ updateChangelog(payload: ChangelogSchema): void;versionData: PayloadProps | null;}diff --git a/frontend/src/tests/test-utils.tsx b/frontend/src/tests/test-utils.tsxindex 9b5c14c36c..ba4257f93c 100644--- a/frontend/src/tests/test-utils.tsx+++ b/frontend/src/tests/test-utils.tsx@@ -143,6 +143,7 @@ export function getAppContextMock(},isFetchingActiveLicense: false,activeLicenseFetchError: null,+ changelog: null,user: {accessJwt: 'some-token',refreshJwt: 'some-refresh-token',@@ -236,6 +237,7 @@ export function getAppContextMock(updateOrg: jest.fn(),updateOrgPreferences: jest.fn(),activeLicenseRefetch: jest.fn(),+ updateChangelog: jest.fn(),versionData: {version: '1.0.0',ee: 'Y',diff --git a/frontend/src/types/api/changelog/getChangelogByVersion.ts b/frontend/src/types/api/changelog/getChangelogByVersion.tsnew file mode 100644index 0000000000..735d8c4b02--- /dev/null+++ b/frontend/src/types/api/changelog/getChangelogByVersion.ts@@ -0,0 +1,39 @@+export type Media = {+ id: number;+ documentId: string;+ ext: string;+ url: string;+ mime: string;+ alternativeText: string | null;+ [key: string]: any; // Allow other fields (e.g., mime, size) to be flexible+};++type Feature = {+ id: number;+ documentId: string;+ title: string;+ sort_order: number | null;+ createdAt: string;+ updatedAt: string;+ publishedAt: string;+ description: string;+ deployment_type: string | null;+ media: Media | null;+};++export interface ChangelogSchema {+ id: number;+ documentId: string;+ version: string;+ release_date: string;+ bug_fixes: string | null;+ maintenance: string | null;+ createdAt: string;+ updatedAt: string;+ publishedAt: string;+ features: Feature[];+}++export const SupportedImageTypes = ['.jpg', '.jpeg', '.png', '.gif', '.webp'];++export const SupportedVideoTypes = ['.mp4', '.webm'];