Skip to content

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.

Feat: show changelog in the sidebar + cloud users (#8503)

Abhi kumarb7025af70349
diff --git a/frontend/src/api/changelog/getChangelogByVersion.ts b/frontend/src/api/changelog/getChangelogByVersion.ts
index 849c3a9f15..b9b3f1f9c9 100644
--- a/frontend/src/api/changelog/getChangelogByVersion.ts
+++ b/frontend/src/api/changelog/getChangelogByVersion.ts
@@ -1,14 +1,32 @@
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
import axios, { AxiosError } from 'axios';
import { ErrorResponse, SuccessResponse } from 'types/api';
-import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';
+import {
+ ChangelogSchema,
+ DeploymentType,
+} from 'types/api/changelog/getChangelogByVersion';
const getChangelogByVersion = async (
versionId: string,
+ deployment_type?: DeploymentType,
): Promise<SuccessResponse<ChangelogSchema> | ErrorResponse> => {
try {
+ let queryParams = `filters[version][$eq]=${versionId}&populate[features][sort]=sort_order:asc&populate[features][populate][media][fields]=id,ext,url,mime,alternativeText`;
+
+ if (
+ deployment_type &&
+ Object.values(DeploymentType).includes(deployment_type)
+ ) {
+ const excludedDeploymentType =
+ deployment_type === DeploymentType.CLOUD_ONLY
+ ? DeploymentType.OSS_ONLY
+ : DeploymentType.CLOUD_ONLY;
+
+ queryParams = `${queryParams}&populate[features][filters][deployment_type][$notIn]=${excludedDeploymentType}`;
+ }
+
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
+ https://cms.signoz.cloud/api/release-changelogs?${queryParams}
`);
if (!Array.isArray(response.data.data) || response.data.data.length === 0) {
diff --git a/frontend/src/components/ChangelogModal/ChangelogModal.styles.scss b/frontend/src/components/ChangelogModal/ChangelogModal.styles.scss
index 8f6e992080..ea7a2b4102 100644
--- a/frontend/src/components/ChangelogModal/ChangelogModal.styles.scss
+++ b/frontend/src/components/ChangelogModal/ChangelogModal.styles.scss
@@ -60,6 +60,7 @@
&-ctas {
display: flex;
+ margin-left: auto;
& svg {
font-size: 14px;
diff --git a/frontend/src/components/ChangelogModal/ChangelogModal.tsx b/frontend/src/components/ChangelogModal/ChangelogModal.tsx
index 90757cd2c7..77ca5013e5 100644
--- a/frontend/src/components/ChangelogModal/ChangelogModal.tsx
+++ b/frontend/src/components/ChangelogModal/ChangelogModal.tsx
@@ -2,27 +2,59 @@ import './ChangelogModal.styles.scss';
import { CheckOutlined, CloseOutlined } from '@ant-design/icons';
import { Button, Modal } from 'antd';
+import updateUserPreference from 'api/v1/user/preferences/name/update';
import cx from 'classnames';
+import { USER_PREFERENCES } from 'constants/userPreferences';
import dayjs from 'dayjs';
import { ChevronsDown, ScrollText } from 'lucide-react';
import { useAppContext } from 'providers/App/App';
import { useCallback, useEffect, useRef, useState } from 'react';
+import { useMutation } from 'react-query';
+import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';
+import { UserPreference } from 'types/api/preferences/preference';
import ChangelogRenderer from './components/ChangelogRenderer';
interface Props {
+ changelog: ChangelogSchema;
onClose: () => void;
}
-function ChangelogModal({ onClose }: Props): JSX.Element {
+function ChangelogModal({ changelog, onClose }: Props): JSX.Element {
const [hasScroll, setHasScroll] = useState(false);
const changelogContentSectionRef = useRef<HTMLDivElement>(null);
- const { changelog } = useAppContext();
+ const { userPreferences, updateUserPreferenceInContext } = useAppContext();
const formattedReleaseDate = dayjs(changelog?.release_date).format(
'MMMM D, YYYY',
);
+ const seenChangelogVersion = userPreferences?.find(
+ (preference) =>
+ preference.name === USER_PREFERENCES.LAST_SEEN_CHANGELOG_VERSION,
+ )?.value as string;
+
+ const { mutate: updateUserPreferenceMutation } = useMutation(
+ updateUserPreference,
+ );
+
+ useEffect(() => {
+ // Update the seen version
+ if (seenChangelogVersion !== changelog.version) {
+ const version = {
+ name: USER_PREFERENCES.LAST_SEEN_CHANGELOG_VERSION,
+ value: changelog.version,
+ };
+ updateUserPreferenceInContext(version as UserPreference);
+ updateUserPreferenceMutation(version);
+ }
+ }, [
+ seenChangelogVersion,
+ changelog.version,
+ updateUserPreferenceMutation,
+ updateUserPreferenceInContext,
+ ]);
+
const checkScroll = useCallback((): void => {
if (changelogContentSectionRef.current) {
const {
diff --git a/frontend/src/components/ChangelogModal/__test__/ChangelogModal.test.tsx b/frontend/src/components/ChangelogModal/__test__/ChangelogModal.test.tsx
index c8a65e1db0..da92fd6aff 100644
--- a/frontend/src/components/ChangelogModal/__test__/ChangelogModal.test.tsx
+++ b/frontend/src/components/ChangelogModal/__test__/ChangelogModal.test.tsx
@@ -3,10 +3,22 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { fireEvent, render, screen } from '@testing-library/react';
+import { USER_PREFERENCES } from 'constants/userPreferences';
+import MockQueryClientProvider from 'providers/test/MockQueryClientProvider';
+import {
+ ChangelogSchema,
+ DeploymentType,
+} from 'types/api/changelog/getChangelogByVersion';
import ChangelogModal from '../ChangelogModal';
-const mockChangelog = {
+const mockChangelog: ChangelogSchema = {
+ id: 1,
+ documentId: 'doc-1',
+ version: 'v1.0.0',
+ createdAt: '2025-06-09T12:00:00Z',
+ updatedAt: '2025-06-09T13:00:00Z',
+ publishedAt: '2025-06-09T14:00:00Z',
release_date: '2025-06-10',
features: [
{
@@ -14,6 +26,12 @@ const mockChangelog = {
title: 'Feature 1',
description: 'Description for feature 1',
media: null,
+ documentId: 'feature-1',
+ sort_order: 1,
+ createdAt: '2025-06-09T12:00:00Z',
+ updatedAt: '2025-06-09T13:00:00Z',
+ publishedAt: '2025-06-09T14:00:00Z',
+ deployment_type: DeploymentType.ALL,
},
],
bug_fixes: 'Bug fix details',
@@ -28,15 +46,30 @@ jest.mock(
return <div>{children}</div>;
},
);
-
// mock useAppContext
jest.mock('providers/App/App', () => ({
- useAppContext: jest.fn(() => ({ changelog: mockChangelog })),
+ useAppContext: jest.fn(() => ({
+ updateUserPreferenceInContext: jest.fn(),
+ userPreferences: [
+ {
+ name: USER_PREFERENCES.LAST_SEEN_CHANGELOG_VERSION,
+ value: 'v1.0.0',
+ },
+ ],
+ })),
}));
+function renderChangelog(onClose: () => void = jest.fn()): void {
+ render(
+ <MockQueryClientProvider>
+ <ChangelogModal changelog={mockChangelog} onClose={onClose} />
+ </MockQueryClientProvider>,
+ );
+}
+
describe('ChangelogModal', () => {
it('renders modal with changelog data', () => {
- render(<ChangelogModal onClose={jest.fn()} />);
+ renderChangelog();
expect(
screen.getByText('What’s New ⎯ Changelog : June 10, 2025'),
).toBeInTheDocument();
@@ -48,14 +81,14 @@ describe('ChangelogModal', () => {
it('calls onClose when Skip for now is clicked', () => {
const onClose = jest.fn();
- render(<ChangelogModal onClose={onClose} />);
+ renderChangelog(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()} />);
+ renderChangelog();
fireEvent.click(screen.getByText('Update my workspace'));
expect(window.open).toHaveBeenCalledWith(
'https://github.com/SigNoz/signoz/releases',
@@ -65,7 +98,7 @@ describe('ChangelogModal', () => {
});
it('scrolls for more when Scroll for more is clicked', () => {
- render(<ChangelogModal onClose={jest.fn()} />);
+ renderChangelog();
const scrollBtn = screen.getByTestId('scroll-more-btn');
const contentDiv = screen.getByTestId('changelog-content');
if (contentDiv) {
diff --git a/frontend/src/components/ChangelogModal/__test__/ChangelogRenderer.test.tsx b/frontend/src/components/ChangelogModal/__test__/ChangelogRenderer.test.tsx
index 4667c41162..ed844f89b4 100644
--- a/frontend/src/components/ChangelogModal/__test__/ChangelogRenderer.test.tsx
+++ b/frontend/src/components/ChangelogModal/__test__/ChangelogRenderer.test.tsx
@@ -3,6 +3,10 @@
/* eslint-disable @typescript-eslint/explicit-function-return-type */
import { render, screen } from '@testing-library/react';
+import {
+ ChangelogSchema,
+ DeploymentType,
+} from 'types/api/changelog/getChangelogByVersion';
import ChangelogRenderer from '../components/ChangelogRenderer';
@@ -15,23 +19,19 @@ jest.mock(
},
);
-const mockChangelog = {
+const mockChangelog: ChangelogSchema = {
id: 1,
- documentId: 'changelog-doc-1',
- version: '1.0.0',
+ documentId: 'doc-1',
+ version: 'v1.0.0',
createdAt: '2025-06-09T12:00:00Z',
+ updatedAt: '2025-06-09T13:00:00Z',
+ publishedAt: '2025-06-09T14: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',
@@ -40,11 +40,15 @@ const mockChangelog = {
mime: 'image/webp',
alternativeText: null,
},
+ documentId: 'feature-1',
+ sort_order: 1,
+ createdAt: '2025-06-09T12:00:00Z',
+ updatedAt: '2025-06-09T13:00:00Z',
+ publishedAt: '2025-06-09T14:00:00Z',
+ deployment_type: DeploymentType.ALL,
},
],
bug_fixes: 'Bug fix details',
- updatedAt: '2025-06-09T12:00:00Z',
- publishedAt: '2025-06-09T12:00:00Z',
maintenance: 'Maintenance details',
};
diff --git a/frontend/src/constants/userPreferences.ts b/frontend/src/constants/userPreferences.ts
index 3fbaa4de53..682acd085a 100644
--- a/frontend/src/constants/userPreferences.ts
+++ b/frontend/src/constants/userPreferences.ts
@@ -1,4 +1,5 @@
export const USER_PREFERENCES = {
SIDENAV_PINNED: 'sidenav_pinned',
NAV_SHORTCUTS: 'nav_shortcuts',
+ LAST_SEEN_CHANGELOG_VERSION: 'last_seen_changelog_version',
};
diff --git a/frontend/src/container/AppLayout/index.tsx b/frontend/src/container/AppLayout/index.tsx
index 9938c48000..c84297b3ba 100644
--- a/frontend/src/container/AppLayout/index.tsx
+++ b/frontend/src/container/AppLayout/index.tsx
@@ -13,6 +13,7 @@ import manageCreditCardApi from 'api/v1/portal/create';
import getUserLatestVersion from 'api/v1/version/getLatestVersion';
import getUserVersion from 'api/v1/version/getVersion';
import cx from 'classnames';
+import ChangelogModal from 'components/ChangelogModal/ChangelogModal';
import ChatSupportGateway from 'components/ChatSupportGateway/ChatSupportGateway';
import OverlayScrollbar from 'components/OverlayScrollbar/OverlayScrollbar';
import { Events } from 'constants/events';
@@ -54,7 +55,10 @@ import {
} from 'types/actions/app';
import { ErrorResponse, SuccessResponse, SuccessResponseV2 } from 'types/api';
import { CheckoutSuccessPayloadProps } from 'types/api/billing/checkout';
-import { ChangelogSchema } from 'types/api/changelog/getChangelogByVersion';
+import {
+ ChangelogSchema,
+ DeploymentType,
+} from 'types/api/changelog/getChangelogByVersion';
import APIError from 'types/api/error';
import {
LicenseEvent,
@@ -86,6 +90,9 @@ function AppLayout(props: AppLayoutProps): JSX.Element {
featureFlagsFetchError,
userPreferences,
updateChangelog,
+ toggleChangelogModal,
+ showChangelogModal,
+ changelog,
} = useAppContext();
const { notifications } = useNotifications();
@@ -138,6 +145,15 @@ function AppLayout(props: AppLayoutProps): JSX.Element {
const { isCloudUser: isCloudUserVal } = useGetTenantLicense();
+ const changelogForTenant = isCloudUserVal
+ ? DeploymentType.CLOUD_ONLY
+ : DeploymentType.OSS_ONLY;
+
+ const seenChangelogVersion = userPreferences?.find(
+ (preference) =>
+ preference.name === USER_PREFERENCES.LAST_SEEN_CHANGELOG_VERSION,
+ )?.value as string;
+
const [
getUserVersionResponse,
getUserLatestVersionResponse,
@@ -155,12 +171,35 @@ function AppLayout(props: AppLayoutProps): JSX.Element {
},
{
queryFn: (): Promise<SuccessResponse<ChangelogSchema> | ErrorResponse> =>
- getChangelogByVersion(latestVersion),
- queryKey: ['getChangelogByVersion', latestVersion],
- enabled: isLoggedIn && !isCloudUserVal && Boolean(latestVersion),
+ getChangelogByVersion(latestVersion, changelogForTenant),
+ queryKey: ['getChangelogByVersion', latestVersion, changelogForTenant],
+ enabled: isLoggedIn && Boolean(latestVersion),
},
]);
+ useEffect(() => {
+ let timer: ReturnType<typeof setTimeout>;
+ if (
+ isCloudUserVal &&
+ Boolean(latestVersion) &&
+ latestVersion !== seenChangelogVersion
+ ) {
+ // Automatically open the changelog modal for cloud users after 1s, if they've not seen this version before.
+ timer = setTimeout(() => {
+ toggleChangelogModal();
+ }, 1000);
+ }
+
+ return (): void => {
+ clearInterval(timer);
+ };
+ }, [
+ isCloudUserVal,
+ latestVersion,
+ seenChangelogVersion,
+ toggleChangelogModal,
+ ]);
+
useEffect(() => {
if (getUserLatestVersionResponse.status === 'idle' && isLoggedIn) {
getUserLatestVersionResponse.refetch();
@@ -683,6 +722,9 @@ function AppLayout(props: AppLayoutProps): JSX.Element {
</Flex>
{showAddCreditCardModal && <ChatSupportGateway />}
+ {showChangelogModal && changelog && (
+ <ChangelogModal changelog={changelog} onClose={toggleChangelogModal} />
+ )}
</Layout>
);
}
diff --git a/frontend/src/container/SideNav/SideNav.styles.scss b/frontend/src/container/SideNav/SideNav.styles.scss
index aad45823f9..1b1b474037 100644
--- a/frontend/src/container/SideNav/SideNav.styles.scss
+++ b/frontend/src/container/SideNav/SideNav.styles.scss
@@ -829,6 +829,20 @@
}
}
+.nav-item-label-container {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+
+ & span {
+ display: block;
+ max-width: 170px;
+ white-space: nowrap; /* Prevents line breaks */
+ overflow: hidden; /* Hides overflowing content */
+ text-overflow: ellipsis;
+ }
+}
+
.nav-dropdown-overlay {
.ant-dropdown-menu {
margin-left: 8px !important;
diff --git a/frontend/src/container/SideNav/SideNav.tsx b/frontend/src/container/SideNav/SideNav.tsx
index 27f653d59c..1d33c04293 100644
--- a/frontend/src/container/SideNav/SideNav.tsx
+++ b/frontend/src/container/SideNav/SideNav.tsx
@@ -23,7 +23,6 @@ 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';
@@ -35,16 +34,20 @@ import { useNotifications } from 'hooks/useNotifications';
import history from 'lib/history';
import { isArray } from 'lodash-es';
import {
+ ArrowUpRight,
Check,
ChevronDown,
ChevronsDown,
ChevronUp,
Cog,
Ellipsis,
+ GitCommitVertical,
GripVertical,
+ LampDesk,
Logs,
MousePointerClick,
PackagePlus,
+ ScrollText,
X,
} from 'lucide-react';
import { useAppContext } from 'providers/App/App';
@@ -74,7 +77,11 @@ import {
primaryMenuItems,
} from './menuItems';
import NavItem from './NavItem/NavItem';
-import { SidebarItem } from './sideNav.types';
+import {
+ CHANGELOG_LABEL,
+ DropdownSeparator,
+ SidebarItem,
+} from './sideNav.types';
import { getActiveMenuKeyFromPath } from './sideNav.utils';
function SortableFilter({ item }: { item: SidebarItem }): JSX.Element {
@@ -126,6 +133,7 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
isLoggedIn,
userPreferences,
changelog,
+ toggleChangelogModal,
updateUserPreferenceInContext,
} = useAppContext();
@@ -143,7 +151,9 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
const [
helpSupportDropdownMenuItems,
setHelpSupportDropdownMenuItems,
- ] = useState<SidebarItem[]>(DefaultHelpSupportDropdownMenuItems);
+ ] = useState<(SidebarItem | DropdownSeparator)[]>(
+ DefaultHelpSupportDropdownMenuItems,
+ );
const [pinnedMenuItems, setPinnedMenuItems] = useState<SidebarItem[]>([]);
@@ -157,7 +167,6 @@ 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) {
@@ -511,7 +520,9 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
useEffect(() => {
if (!isAdmin) {
setHelpSupportDropdownMenuItems((prevState) =>
- prevState.filter((item) => item.key !== 'invite-collaborators'),
+ prevState.filter(
+ (item) => !('key' in item) || item.key !== 'invite-collaborators',
+ ),
);
}
@@ -527,8 +538,63 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
)
) {
setHelpSupportDropdownMenuItems((prevState) =>
- prevState.filter((item) => item.key !== 'chat-support'),
+ prevState.filter((item) => !('key' in item) || item.key !== 'chat-support'),
+ );
+ }
+
+ if (changelog) {
+ const firstTwoFeatures = changelog.features.slice(0, 2);
+ const dropdownItems: SidebarItem[] = firstTwoFeatures.map(
+ (feature, idx) => ({
+ key: `changelog-${idx + 1}`,
+ label: (
+ <div className="nav-item-label-container">
+ <span>{feature.title}</span>
+ </div>
+ ),
+ icon: idx === 0 ? <LampDesk size={14} /> : <GitCommitVertical size={14} />,
+ itemKey: `changelog-${idx + 1}`,
+ }),
);
+ const changelogKey = CHANGELOG_LABEL.toLowerCase().replace(' ', '-');
+ setHelpSupportDropdownMenuItems((prevState) => {
+ if (dropdownItems.length === 0) {
+ return [
+ ...prevState,
+ {
+ key: changelogKey,
+ label: (
+ <div className="nav-item-label-container">
+ <span>{CHANGELOG_LABEL}</span>
+ <ArrowUpRight size={14} />
+ </div>
+ ),
+ icon: <ScrollText size={14} />,
+ itemKey: changelogKey,
+ },
+ ];
+ }
+
+ return [
+ ...prevState,
+ {
+ type: 'group',
+ label: "WHAT's NEW",
+ },
+ ...dropdownItems,
+ {
+ key: changelogKey,
+ label: (
+ <div className="nav-item-label-container">
+ <span>{CHANGELOG_LABEL}</span>
+ <ArrowUpRight size={14} />
+ </div>
+ ),
+ icon: <ScrollText size={14} />,
+ itemKey: changelogKey,
+ },
+ ];
+ });
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [
@@ -537,6 +603,7 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
isPremiumSupportEnabled,
isCloudUser,
trialInfo,
+ changelog,
]);
const [isCurrentOrgSettings] = useComponentPermission(
@@ -668,34 +735,41 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
const handleHelpSupportMenuItemClick = (info: SidebarItem): void => {
const item = helpSupportDropdownMenuItems.find(
- (item) => item.key === info.key,
+ (item) => !('type' in item) && item.key === info.key,
);
- if (item?.isExternal && item?.url) {
+ if (item && !('type' in item) && item.isExternal && item.url) {
window.open(item.url, '_blank');
}
- logEvent('Help Popover: Item clicked', {
- menuRoute: item?.key,
- menuLabel: item?.label,
- });
+ if (item && !('type' in item)) {
+ logEvent('Help Popover: Item clicked', {
+ menuRoute: item.key,
+ menuLabel: String(item.label),
+ });
- switch (item?.key) {
- case ROUTES.SHORTCUTS:
- history.push(ROUTES.SHORTCUTS);
- break;
- case 'invite-collaborators':
- history.push(`${ROUTES.ORG_SETTINGS}#invite-team-members`);
- break;
- case 'chat-support':
- if (window.pylon) {
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
- // @ts-ignore
- window.Pylon('show');
- }
- break;
- default:
- break;
+ switch (item.key) {
+ case ROUTES.SHORTCUTS:
+ history.push(ROUTES.SHORTCUTS);
+ break;
+ case 'invite-collaborators':
+ history.push(`${ROUTES.ORG_SETTINGS}#invite-team-members`);
+ break;
+ case 'chat-support':
+ if (window.pylon) {
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ window.Pylon('show');
+ }
+ break;
+ case 'changelog-1':
+ case 'changelog-2':
+ case CHANGELOG_LABEL.toLowerCase().replace(' ', '-'):
+ toggleChangelogModal();
+ break;
+ default:
+ break;
+ }
}
};
@@ -738,8 +812,8 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
return;
}
- setShowChangelogModal(true);
- }, [isCloudUser, changelog]);
+ toggleChangelogModal();
+ }, [isCloudUser, changelog, toggleChangelogModal]);
useEffect(() => {
if (!isLatestVersion && !isCloudUser) {
@@ -1045,9 +1119,6 @@ function SideNav({ isPinned }: { isPinned: boolean }): JSX.Element {
</div>
</div>
</Modal>
- {showChangelogModal && (
- <ChangelogModal onClose={(): void => setShowChangelogModal(false)} />
- )}
</div>
);
}
diff --git a/frontend/src/container/SideNav/sideNav.types.ts b/frontend/src/container/SideNav/sideNav.types.ts
index 4783ece9d8..cfd61b4998 100644
--- a/frontend/src/container/SideNav/sideNav.types.ts
+++ b/frontend/src/container/SideNav/sideNav.types.ts
@@ -22,6 +22,13 @@ export interface SidebarItem {
itemKey?: string;
}
+export const CHANGELOG_LABEL = 'Full Changelog';
+
+export interface DropdownSeparator {
+ type: 'divider' | 'group';
+ label?: ReactNode;
+}
+
export enum SecondaryMenuItemKey {
Slack = 'slack',
Version = 'version',
diff --git a/frontend/src/providers/App/App.tsx b/frontend/src/providers/App/App.tsx
index e7b9ab9aa9..786d2c40c3 100644
--- a/frontend/src/providers/App/App.tsx
+++ b/frontend/src/providers/App/App.tsx
@@ -61,6 +61,8 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {
const [org, setOrg] = useState<Organization[] | null>(null);
const [changelog, setChangelog] = useState<ChangelogSchema | null>(null);
+ const [showChangelogModal, setShowChangelogModal] = useState<boolean>(false);
+
// if the user.id is not present, for migration older cases then we need to logout only for current logged in users!
useEffect(() => {
if (!user.id && isLoggedIn) {
@@ -262,6 +264,10 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {
[setChangelog],
);
+ const toggleChangelogModal = useCallback(() => {
+ setShowChangelogModal((prev) => !prev);
+ }, []);
+
// global event listener for AFTER_LOGIN event to start the user fetch post all actions are complete
useGlobalEventListener('AFTER_LOGIN', (event) => {
if (event.detail) {
@@ -306,12 +312,14 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {
orgPreferencesFetchError,
activeLicense,
changelog,
+ showChangelogModal,
activeLicenseRefetch,
updateUser,
updateOrgPreferences,
updateUserPreferenceInContext,
updateOrg,
updateChangelog,
+ toggleChangelogModal,
versionData: versionData?.payload || null,
}),
[
@@ -331,9 +339,11 @@ export function AppProvider({ children }: PropsWithChildren): JSX.Element {
activeLicenseRefetch,
orgPreferencesFetchError,
changelog,
+ showChangelogModal,
updateUserPreferenceInContext,
updateOrg,
updateChangelog,
+ toggleChangelogModal,
user,
userFetchError,
versionData,
diff --git a/frontend/src/providers/App/types.ts b/frontend/src/providers/App/types.ts
index 1fc32028de..6518cd8b4e 100644
--- a/frontend/src/providers/App/types.ts
+++ b/frontend/src/providers/App/types.ts
@@ -28,12 +28,14 @@ export interface IAppContext {
featureFlagsFetchError: unknown;
orgPreferencesFetchError: unknown;
changelog: ChangelogSchema | null;
+ showChangelogModal: boolean;
activeLicenseRefetch: () => void;
updateUser: (user: IUser) => void;
updateOrgPreferences: (orgPreferences: OrgPreference[]) => void;
updateUserPreferenceInContext: (userPreference: UserPreference) => void;
updateOrg(orgId: string, updatedOrgName: string): void;
updateChangelog(payload: ChangelogSchema): void;
+ toggleChangelogModal(): void;
versionData: PayloadProps | null;
}
diff --git a/frontend/src/tests/test-utils.tsx b/frontend/src/tests/test-utils.tsx
index ba4257f93c..aa56772cb4 100644
--- a/frontend/src/tests/test-utils.tsx
+++ b/frontend/src/tests/test-utils.tsx
@@ -233,11 +233,13 @@ export function getAppContextMock(
isFetchingOrgPreferences: false,
orgPreferencesFetchError: null,
isLoggedIn: true,
+ showChangelogModal: false,
updateUser: jest.fn(),
updateOrg: jest.fn(),
updateOrgPreferences: jest.fn(),
activeLicenseRefetch: jest.fn(),
updateChangelog: jest.fn(),
+ toggleChangelogModal: 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.ts
index 735d8c4b02..cca55906a8 100644
--- a/frontend/src/types/api/changelog/getChangelogByVersion.ts
+++ b/frontend/src/types/api/changelog/getChangelogByVersion.ts
@@ -8,6 +8,12 @@ export type Media = {
[key: string]: any; // Allow other fields (e.g., mime, size) to be flexible
};
+export enum DeploymentType {
+ ALL = 'All',
+ CLOUD_ONLY = 'Cloud only',
+ OSS_ONLY = 'OSS Only',
+}
+
type Feature = {
id: number;
documentId: string;
@@ -17,7 +23,7 @@ type Feature = {
updatedAt: string;
publishedAt: string;
description: string;
- deployment_type: string | null;
+ deployment_type: DeploymentType;
media: Media | null;
};
diff --git a/pkg/types/preferencetypes/name.go b/pkg/types/preferencetypes/name.go
index 2ff280e0fe..00e1852afe 100644
--- a/pkg/types/preferencetypes/name.go
+++ b/pkg/types/preferencetypes/name.go
@@ -18,6 +18,7 @@ var (
NameWelcomeChecklistSetupSavedViewSkipped = Name{valuer.NewString("welcome_checklist_setup_saved_view_skipped")}
NameSidenavPinned = Name{valuer.NewString("sidenav_pinned")}
NameNavShortcuts = Name{valuer.NewString("nav_shortcuts")}
+ NameLastSeenChangelogVersion = Name{valuer.NewString("last_seen_changelog_version")}
)
type Name struct{ valuer.String }
@@ -35,6 +36,7 @@ func NewName(name string) (Name, error) {
NameWelcomeChecklistSetupSavedViewSkipped.StringValue(),
NameSidenavPinned.StringValue(),
NameNavShortcuts.StringValue(),
+ NameLastSeenChangelogVersion.StringValue(),
},
name,
)
diff --git a/pkg/types/preferencetypes/preference.go b/pkg/types/preferencetypes/preference.go
index d1461797f2..fafa5b6d8c 100644
--- a/pkg/types/preferencetypes/preference.go
+++ b/pkg/types/preferencetypes/preference.go
@@ -145,6 +145,15 @@ func NewAvailablePreference() map[Name]Preference {
AllowedValues: []string{},
Value: MustNewValue([]any{}, ValueTypeArray),
},
+ NameLastSeenChangelogVersion: {
+ Name: NameLastSeenChangelogVersion,
+ Description: "Changelog version seen by the user.",
+ ValueType: ValueTypeString,
+ DefaultValue: MustNewValue("", ValueTypeString),
+ AllowedScopes: []Scope{ScopeUser},
+ AllowedValues: []string{},
+ Value: MustNewValue("", ValueTypeString),
+ },
}
}