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: removed plan name and added copiable license info in custom domain card (#10558)
SagarRajput-7ed553fb02e4c
diff --git a/frontend/src/AppRoutes/Private.tsx b/frontend/src/AppRoutes/Private.tsxindex 4e5ed9df1e..cbcca1f649 100644--- a/frontend/src/AppRoutes/Private.tsx+++ b/frontend/src/AppRoutes/Private.tsx@@ -128,6 +128,7 @@ function PrivateRoute({ children }: PrivateRouteProps): JSX.Element {isAdmin &&(path === ROUTES.SETTINGS ||path === ROUTES.ORG_SETTINGS ||+ path === ROUTES.MEMBERS_SETTINGS ||path === ROUTES.BILLING ||path === ROUTES.MY_SETTINGS);diff --git a/frontend/src/container/CustomDomainSettings/CustomDomainEditModal.tsx b/frontend/src/container/CustomDomainSettings/CustomDomainEditModal.tsxindex e362ceaa48..ac06108717 100644--- a/frontend/src/container/CustomDomainSettings/CustomDomainEditModal.tsx+++ b/frontend/src/container/CustomDomainSettings/CustomDomainEditModal.tsx@@ -30,14 +30,15 @@ export default function CustomDomainEditModal({onClearError,onSubmit,}: CustomDomainEditModalProps): JSX.Element {- const [value, setValue] = useState(customDomainSubdomain ?? '');+ const initialSubdomain = customDomainSubdomain ?? '';+ const [value, setValue] = useState(initialSubdomain);const [validationError, setValidationError] = useState<string | null>(null);useEffect(() => {if (isOpen) {- setValue(customDomainSubdomain ?? '');+ setValue(initialSubdomain);}- }, [isOpen, customDomainSubdomain]);+ }, [isOpen, initialSubdomain]);const handleClose = (): void => {setValidationError(null);@@ -58,6 +59,11 @@ export default function CustomDomainEditModal({};const handleSubmit = (): void => {+ if (value === initialSubdomain) {+ setValidationError('Input is unchanged');+ return;+ }+if (!value) {setValidationError('This field is required');return;@@ -84,7 +90,7 @@ export default function CustomDomainEditModal({const hasError = Boolean(errorMessage);- const statusIcon = ((): JSX.Element => {+ const statusIcon = ((): JSX.Element | null => {if (isLoading) {return (<LoaderCircle size={16} className="animate-spin edit-modal-status-icon" />@@ -95,7 +101,9 @@ export default function CustomDomainEditModal({return <CircleAlert size={16} color={Color.BG_CHERRY_500} />;}- return <CircleCheck size={16} color={Color.BG_FOREST_500} />;+ return value && value.length >= 3 ? (+ <CircleCheck size={16} color={Color.BG_FOREST_500} />+ ) : null;})();return (@@ -189,7 +197,7 @@ export default function CustomDomainEditModal({color="primary"className="edit-modal-apply-btn"onClick={handleSubmit}- disabled={isLoading}+ disabled={isLoading || value === initialSubdomain}loading={isLoading}>Apply Changesdiff --git a/frontend/src/container/CustomDomainSettings/CustomDomainSettings.styles.scss b/frontend/src/container/CustomDomainSettings/CustomDomainSettings.styles.scssindex c1b833fdc6..119542af96 100644--- a/frontend/src/container/CustomDomainSettings/CustomDomainSettings.styles.scss+++ b/frontend/src/container/CustomDomainSettings/CustomDomainSettings.styles.scss@@ -81,6 +81,10 @@padding-left: 26px;}+ .custom-domain-card-meta-row.workspace-name-hidden {+ padding-left: 0;+ }+.custom-domain-card-meta-timezone {display: inline-flex;align-items: center;@@ -117,32 +121,6 @@background: var(--l2-border);margin: 0;}-- .custom-domain-card-bottom {- display: flex;- align-items: center;- gap: var(--spacing-5);- padding: var(--padding-3);- }-- .custom-domain-card-license {- color: var(--l1-foreground);- font-size: var(--paragraph-base-400-font-size);- line-height: var(--line-height-20);- letter-spacing: -0.07px;- }-- .custom-domain-plan-badge {- display: inline-flex;- align-items: center;- padding: 0 2px;- border-radius: 2px;- background: var(--l2-background);- color: var(--l2-foreground);- font-family: 'SF Mono', 'Fira Code', monospace;- font-size: var(--paragraph-base-400-font-size);- line-height: var(--line-height-20);- }}.workspace-url-trigger {diff --git a/frontend/src/container/CustomDomainSettings/CustomDomainSettings.tsx b/frontend/src/container/CustomDomainSettings/CustomDomainSettings.tsxindex 93c519fe54..1bea14a9db 100644--- a/frontend/src/container/CustomDomainSettings/CustomDomainSettings.tsx+++ b/frontend/src/container/CustomDomainSettings/CustomDomainSettings.tsx@@ -69,8 +69,9 @@ function DomainUpdateToast({}export default function CustomDomainSettings(): JSX.Element {- const { org, activeLicense } = useAppContext();+ const { org } = useAppContext();const { timezone } = useTimezone();+const [isEditModalOpen, setIsEditModalOpen] = useState(false);const [isPollingEnabled, setIsPollingEnabled] = useState(false);const [hosts, setHosts] = useState<ZeustypesHostDTO[] | null>(null);@@ -175,7 +176,8 @@ export default function CustomDomainSettings(): JSX.Element {[hosts, activeHost],);- const planName = activeLicense?.plan?.name;+ const workspaceName =+ org?.[0]?.displayName || customDomainSubdomain || activeHost?.name;if (isLoadingHosts) {return (@@ -191,106 +193,98 @@ export default function CustomDomainSettings(): JSX.Element {return (<>- <div className="custom-domain-card">- <div className="custom-domain-card-top">- <div className="custom-domain-card-info">+ <div className="custom-domain-card-top">+ <div className="custom-domain-card-info">+ {!!workspaceName && (<div className="custom-domain-card-name-row"><span className="beacon" />- <span className="custom-domain-card-org-name">- {org?.[0]?.displayName ? org?.[0]?.displayName : customDomainSubdomain}- </span>+ <span className="custom-domain-card-org-name">{workspaceName}</span></div>+ )}- <div className="custom-domain-card-meta-row">- <Dropdown- trigger={['click']}- dropdownRender={(): JSX.Element => (- <div className="workspace-url-dropdown">- <span className="workspace-url-dropdown-header">- All Workspace URLs- </span>- <div className="workspace-url-dropdown-divider" />- {sortedHosts.map((host) => {- const isActive = host.name === activeHost?.name;- return (- <a- key={host.name}- href={host.url}- target="_blank"- rel="noopener noreferrer"- className={`workspace-url-dropdown-item${- isActive ? ' workspace-url-dropdown-item--active' : ''- }`}- >- <span className="workspace-url-dropdown-item-label">- {stripProtocol(host.url ?? '')}- </span>- {isActive ? (- <Check size={14} className="workspace-url-dropdown-item-check" />- ) : (- <ExternalLink- size={12}- className="workspace-url-dropdown-item-external"- />- )}- </a>- );- })}- </div>- )}+ <div+ className={`custom-domain-card-meta-row ${+ !workspaceName ? 'workspace-name-hidden' : ''+ }`}+ >+ <Dropdown+ trigger={['click']}+ dropdownRender={(): JSX.Element => (+ <div className="workspace-url-dropdown">+ <span className="workspace-url-dropdown-header">+ All Workspace URLs+ </span>+ <div className="workspace-url-dropdown-divider" />+ {sortedHosts.map((host) => {+ const isActive = host.name === activeHost?.name;+ return (+ <a+ key={host.name}+ href={host.url}+ target="_blank"+ rel="noopener noreferrer"+ className={`workspace-url-dropdown-item${+ isActive ? ' workspace-url-dropdown-item--active' : ''+ }`}+ >+ <span className="workspace-url-dropdown-item-label">+ {stripProtocol(host.url ?? '')}+ </span>+ {isActive ? (+ <Check size={14} className="workspace-url-dropdown-item-check" />+ ) : (+ <ExternalLink+ size={12}+ className="workspace-url-dropdown-item-external"+ />+ )}+ </a>+ );+ })}+ </div>+ )}+ >+ <Button+ type="button"+ size="xs"+ className="workspace-url-trigger"+ disabled={isFetchingHosts}>- <Button- type="button"- size="xs"- className="workspace-url-trigger"- disabled={isFetchingHosts}- >- <Link2 size={12} />- <span>{stripProtocol(activeHost?.url ?? '')}</span>- <ChevronDown size={12} />- </Button>- </Dropdown>- <span className="custom-domain-card-meta-timezone">- <Clock size={11} />- {timezone.offset}- </span>- </div>+ <Link2 size={12} />+ <span>{stripProtocol(activeHost?.url ?? '')}</span>+ <ChevronDown size={12} />+ </Button>+ </Dropdown>+ <span className="custom-domain-card-meta-timezone">+ <Clock size={11} />+ {timezone.offset}+ </span></div>-- <Button- variant="solid"- size="sm"- className="custom-domain-edit-button"- prefixIcon={<FilePenLine size={12} />}- disabled={isFetchingHosts || isPollingEnabled}- onClick={(): void => setIsEditModalOpen(true)}- >- Edit workspace link- </Button></div>- {isPollingEnabled && (- <Callout- type="info"- showIcon- className="custom-domain-callout"- size="small"- icon={<SolidAlertCircle size={13} color="primary" />}- message={`Updating your URL to ⎯ ${customDomainSubdomain}.${dnsSuffix}. This may take a few mins.`}- />- )}-- <div className="custom-domain-card-divider" />-- <div className="custom-domain-card-bottom">- <span className="beacon" />- <span className="custom-domain-card-license">- {planName && <code className="custom-domain-plan-badge">{planName}</code>}{' '}- license is currently active- </span>- </div>+ <Button+ variant="solid"+ size="sm"+ className="custom-domain-edit-button"+ prefixIcon={<FilePenLine size={12} />}+ disabled={isFetchingHosts || isPollingEnabled}+ onClick={(): void => setIsEditModalOpen(true)}+ >+ Edit workspace link+ </Button></div>+ {isPollingEnabled && (+ <Callout+ type="info"+ showIcon+ className="custom-domain-callout"+ size="small"+ icon={<SolidAlertCircle size={13} color="primary" />}+ message={`Updating your URL to ⎯ ${customDomainSubdomain}.${dnsSuffix}. This may take a few mins.`}+ />+ )}+<CustomDomainEditModalisOpen={isEditModalOpen}onClose={(): void => setIsEditModalOpen(false)}diff --git a/frontend/src/container/CustomDomainSettings/__tests__/CustomDomainSettings.test.tsx b/frontend/src/container/CustomDomainSettings/__tests__/CustomDomainSettings.test.tsxindex f0a9f2218a..36cf651639 100644--- a/frontend/src/container/CustomDomainSettings/__tests__/CustomDomainSettings.test.tsx+++ b/frontend/src/container/CustomDomainSettings/__tests__/CustomDomainSettings.test.tsx@@ -239,4 +239,87 @@ describe('CustomDomainSettings', () => {const { container } = render(toastRenderer('test-id'));expect(container).toHaveTextContent(/myteam\.test\.cloud/i);});++ describe('Workspace Name rendering', () => {+ it('renders org displayName when available from appContext', async () => {+ server.use(+ rest.get(ZEUS_HOSTS_ENDPOINT, (_, res, ctx) =>+ res(ctx.status(200), ctx.json(mockHostsResponse)),+ ),+ );++ render(<CustomDomainSettings />, undefined, {+ appContextOverrides: {+ org: [{ id: 'xyz', displayName: 'My Org Name', createdAt: 0 }],+ },+ });++ expect(await screen.findByText('My Org Name')).toBeInTheDocument();+ });++ it('falls back to customDomainSubdomain when org displayName is missing', async () => {+ server.use(+ rest.get(ZEUS_HOSTS_ENDPOINT, (_, res, ctx) =>+ res(ctx.status(200), ctx.json(mockHostsResponse)),+ ),+ );++ render(<CustomDomainSettings />, undefined, {+ appContextOverrides: { org: [] },+ });++ expect(await screen.findByText('custom-host')).toBeInTheDocument();+ });++ it('falls back to activeHost.name when neither org name nor custom domain exists', async () => {+ const onlyDefaultHostResponse = {+ ...mockHostsResponse,+ data: {+ ...mockHostsResponse.data,+ hosts: mockHostsResponse.data.hosts+ ? [mockHostsResponse.data.hosts[0]]+ : [],+ },+ };++ server.use(+ rest.get(ZEUS_HOSTS_ENDPOINT, (_, res, ctx) =>+ res(ctx.status(200), ctx.json(onlyDefaultHostResponse)),+ ),+ );++ render(<CustomDomainSettings />, undefined, {+ appContextOverrides: { org: [] },+ });++ // 'accepted-starfish' is the default host's name+ expect(await screen.findByText('accepted-starfish')).toBeInTheDocument();+ });++ it('does not render the card name row if workspaceName is totally falsy', async () => {+ const emptyHostsResponse = {+ ...mockHostsResponse,+ data: {+ ...mockHostsResponse.data,+ hosts: [],+ },+ };++ server.use(+ rest.get(ZEUS_HOSTS_ENDPOINT, (_, res, ctx) =>+ res(ctx.status(200), ctx.json(emptyHostsResponse)),+ ),+ );++ const { container } = render(<CustomDomainSettings />, undefined, {+ appContextOverrides: { org: [] },+ });++ await screen.findByRole('button', { name: /edit workspace link/i });++ expect(+ container.querySelector('.custom-domain-card-name-row'),+ ).not.toBeInTheDocument();+ });+ });});diff --git a/frontend/src/container/GeneralSettings/GeneralSettings.tsx b/frontend/src/container/GeneralSettings/GeneralSettings.tsxindex fad67b3668..dcaddd2df0 100644--- a/frontend/src/container/GeneralSettings/GeneralSettings.tsx+++ b/frontend/src/container/GeneralSettings/GeneralSettings.tsx@@ -10,6 +10,7 @@ import setRetentionApi from 'api/settings/setRetention';import setRetentionApiV2 from 'api/settings/setRetentionV2';import TextToolTip from 'components/TextToolTip';import CustomDomainSettings from 'container/CustomDomainSettings';+import LicenseKeyRow from 'container/GeneralSettings/LicenseKeyRow/LicenseKeyRow';import GeneralSettingsCloud from 'container/GeneralSettingsCloud';import useComponentPermission from 'hooks/useComponentPermission';import { useGetTenantLicense } from 'hooks/useGetTenantLicense';@@ -81,7 +82,7 @@ function GeneralSettings({logsTtlValuesPayload,);- const { user } = useAppContext();+ const { user, activeLicense } = useAppContext();const [setRetentionPermission] = useComponentPermission(['set_retention_period'],@@ -680,7 +681,15 @@ function GeneralSettings({</span></div>- {showCustomDomainSettings && <CustomDomainSettings />}+ {(showCustomDomainSettings || activeLicense?.key) && (+ <div className="custom-domain-card">+ {showCustomDomainSettings && <CustomDomainSettings />}+ {showCustomDomainSettings && activeLicense?.key && (+ <div className="custom-domain-card-divider" />+ )}+ {activeLicense?.key && <LicenseKeyRow />}+ </div>+ )}<div className="retention-controls-container"><div className="retention-controls-header">diff --git a/frontend/src/container/GeneralSettings/LicenseKeyRow/LicenseKeyRow.styles.scss b/frontend/src/container/GeneralSettings/LicenseKeyRow/LicenseKeyRow.styles.scssnew file mode 100644index 0000000000..6f943a3304--- /dev/null+++ b/frontend/src/container/GeneralSettings/LicenseKeyRow/LicenseKeyRow.styles.scss@@ -0,0 +1,65 @@+.license-key-row {+ display: flex;+ align-items: center;+ justify-content: space-between;+ padding: var(--padding-2) var(--padding-3);+ gap: var(--spacing-5);++ &__left {+ display: inline-flex;+ align-items: center;+ gap: 12px;+ color: var(--l2-foreground);++ svg {+ flex-shrink: 0;+ }+ }++ &__label {+ color: var(--l2-foreground);+ font-size: var(--paragraph-base-400-font-size);+ line-height: var(--line-height-20);+ letter-spacing: -0.07px;+ flex-shrink: 0;+ }++ &__value {+ display: inline-flex;+ align-items: stretch;+ }++ &__code {+ display: inline-flex;+ align-items: center;+ padding: 1px 2px;+ border-radius: 2px 0 0 2px;+ background: var(--l3-background);+ border: 1px solid var(--l2-border);+ color: var(--l2-foreground);+ font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;+ font-size: var(--paragraph-base-400-font-size);+ line-height: var(--line-height-20);+ white-space: nowrap;+ margin-right: -1px;+ }++ &__copy-btn {+ display: inline-flex;+ align-items: center;+ justify-content: center;+ width: 26px;+ padding: 1px 2px;+ border-radius: 0 2px 2px 0;+ background: var(--l3-background);+ border: 1px solid var(--l2-border);+ color: var(--l2-foreground);+ cursor: pointer;+ flex-shrink: 0;+ height: 24px;++ &:hover {+ background: var(--l3-background-hover);+ }+ }+}diff --git a/frontend/src/container/GeneralSettings/LicenseKeyRow/LicenseKeyRow.tsx b/frontend/src/container/GeneralSettings/LicenseKeyRow/LicenseKeyRow.tsxnew file mode 100644index 0000000000..dae4fa7e2c--- /dev/null+++ b/frontend/src/container/GeneralSettings/LicenseKeyRow/LicenseKeyRow.tsx@@ -0,0 +1,48 @@+import { useCopyToClipboard } from 'react-use';+import { Button } from '@signozhq/button';+import { Copy, KeyRound } from '@signozhq/icons';+import { toast } from '@signozhq/sonner';+import { useAppContext } from 'providers/App/App';+import { getMaskedKey } from 'utils/maskedKey';++import './LicenseKeyRow.styles.scss';++function LicenseKeyRow(): JSX.Element | null {+ const { activeLicense } = useAppContext();+ const [, copyToClipboard] = useCopyToClipboard();++ if (!activeLicense?.key) {+ return null;+ }++ const handleCopyLicenseKey = (text: string): void => {+ copyToClipboard(text);+ toast.success('License key copied to clipboard.', { richColors: true });+ };++ return (+ <div className="license-key-row">+ <span className="license-key-row__left">+ <KeyRound size={14} />+ <span className="license-key-row__label">SigNoz License Key</span>+ </span>+ <span className="license-key-row__value">+ <code className="license-key-row__code">+ {getMaskedKey(activeLicense.key)}+ </code>+ <Button+ type="button"+ size="xs"+ aria-label="Copy license key"+ data-testid="license-key-row-copy-btn"+ className="license-key-row__copy-btn"+ onClick={(): void => handleCopyLicenseKey(activeLicense.key)}+ >+ <Copy size={12} />+ </Button>+ </span>+ </div>+ );+}++export default LicenseKeyRow;diff --git a/frontend/src/container/GeneralSettings/LicenseKeyRow/__tests__/LicenseKeyRow.test.tsx b/frontend/src/container/GeneralSettings/LicenseKeyRow/__tests__/LicenseKeyRow.test.tsxnew file mode 100644index 0000000000..fecfd21d26--- /dev/null+++ b/frontend/src/container/GeneralSettings/LicenseKeyRow/__tests__/LicenseKeyRow.test.tsx@@ -0,0 +1,61 @@+import { render, screen, userEvent, waitFor } from 'tests/test-utils';++import LicenseKeyRow from '../LicenseKeyRow';++const mockCopyToClipboard = jest.fn();++jest.mock('react-use', () => ({+ __esModule: true,+ useCopyToClipboard: (): [unknown, jest.Mock] => [null, mockCopyToClipboard],+}));++const mockToastSuccess = jest.fn();++jest.mock('@signozhq/sonner', () => ({+ toast: {+ success: (...args: unknown[]): unknown => mockToastSuccess(...args),+ },+}));++describe('LicenseKeyRow', () => {+ afterEach(() => {+ jest.clearAllMocks();+ });++ it('renders nothing when activeLicense key is absent', () => {+ const { container } = render(<LicenseKeyRow />, undefined, {+ appContextOverrides: { activeLicense: null },+ });++ expect(container).toBeEmptyDOMElement();+ });++ it('renders label and masked key when activeLicense key exists', () => {+ render(<LicenseKeyRow />, undefined, {+ appContextOverrides: {+ activeLicense: { key: 'abcdefghij' } as any,+ },+ });++ expect(screen.getByText('SigNoz License Key')).toBeInTheDocument();+ expect(screen.getByText('ab·······ij')).toBeInTheDocument();+ });++ it('calls copyToClipboard and shows success toast when clipboard is available', async () => {+ const user = userEvent.setup({ pointerEventsCheck: 0 });++ render(<LicenseKeyRow />);++ await user.click(screen.getByRole('button', { name: /copy license key/i }));++ await waitFor(() => {+ expect(mockCopyToClipboard).toHaveBeenCalledWith('test-key');+ expect(mockToastSuccess).toHaveBeenCalledWith(+ 'License key copied to clipboard.',+ {+ richColors: true,+ },+ );+ });+ });+});diff --git a/frontend/src/container/MySettings/LicenseSection/LicenseSection.tsx b/frontend/src/container/MySettings/LicenseSection/LicenseSection.tsxindex 6ebc5a269c..892b80988b 100644--- a/frontend/src/container/MySettings/LicenseSection/LicenseSection.tsx+++ b/frontend/src/container/MySettings/LicenseSection/LicenseSection.tsx@@ -4,6 +4,7 @@ import { Typography } from 'antd';import { useNotifications } from 'hooks/useNotifications';import { Copy } from 'lucide-react';import { useAppContext } from 'providers/App/App';+import { getMaskedKey } from 'utils/maskedKey';import './LicenseSection.styles.scss';@@ -12,15 +13,6 @@ function LicenseSection(): JSX.Element | null {const { notifications } = useNotifications();const [, handleCopyToClipboard] = useCopyToClipboard();- const getMaskedKey = (key: string): string => {- if (!key || key.length < 4) {- return key || 'N/A';- }- return `${key.substring(0, 2)}********${key- .substring(key.length - 2)- .trim()}`;- };-const handleCopyKey = (text: string): void => {handleCopyToClipboard(text);notifications.success({diff --git a/frontend/src/container/MySettings/__tests__/MySettings.test.tsx b/frontend/src/container/MySettings/__tests__/MySettings.test.tsxindex a06d52b4fb..2cfb3f38e8 100644--- a/frontend/src/container/MySettings/__tests__/MySettings.test.tsx+++ b/frontend/src/container/MySettings/__tests__/MySettings.test.tsx@@ -271,7 +271,7 @@ describe('MySettings Flows', () => {},});- expect(within(container).getByText('ab********cd')).toBeInTheDocument();+ expect(within(container).getByText('ab·······cd')).toBeInTheDocument();});it('Should not mask license key if it is too short', () => {diff --git a/frontend/src/container/SideNav/config.ts b/frontend/src/container/SideNav/config.tsindex 90fa55ad5c..7ee40f99a6 100644--- a/frontend/src/container/SideNav/config.ts+++ b/frontend/src/container/SideNav/config.ts@@ -38,6 +38,7 @@ export const routeConfig: Record<string, QueryParams[]> = {[ROUTES.MY_SETTINGS]: [QueryParams.resourceAttributes],[ROUTES.NOT_FOUND]: [QueryParams.resourceAttributes],[ROUTES.ORG_SETTINGS]: [QueryParams.resourceAttributes],+ [ROUTES.MEMBERS_SETTINGS]: [QueryParams.resourceAttributes],[ROUTES.PASSWORD_RESET]: [QueryParams.resourceAttributes],[ROUTES.SETTINGS]: [QueryParams.resourceAttributes],[ROUTES.SIGN_UP]: [QueryParams.resourceAttributes],diff --git a/frontend/src/pages/Settings/Settings.tsx b/frontend/src/pages/Settings/Settings.tsxindex 0d1210ef67..918d23bcdc 100644--- a/frontend/src/pages/Settings/Settings.tsx+++ b/frontend/src/pages/Settings/Settings.tsx@@ -63,6 +63,7 @@ function SettingsPage(): JSX.Element {isAdmin &&(item.key === ROUTES.BILLING ||item.key === ROUTES.ORG_SETTINGS ||+ item.key === ROUTES.MEMBERS_SETTINGS ||item.key === ROUTES.MY_SETTINGS ||item.key === ROUTES.SHORTCUTS)),diff --git a/frontend/src/pages/Settings/utils.ts b/frontend/src/pages/Settings/utils.tsindex 9b9ce343b8..3270352a05 100644--- a/frontend/src/pages/Settings/utils.ts+++ b/frontend/src/pages/Settings/utils.ts@@ -36,6 +36,7 @@ export const getRoutes = (if (isWorkspaceBlocked && isAdmin) {settings.push(...organizationSettings(t),+ ...membersSettings(t),...mySettings(t),...billingSettings(t),...keyboardShortcuts(t),diff --git a/frontend/src/utils/maskedKey.ts b/frontend/src/utils/maskedKey.tsnew file mode 100644index 0000000000..d26c3b43c0--- /dev/null+++ b/frontend/src/utils/maskedKey.ts@@ -0,0 +1,9 @@+/**+ * Masks a key string, showing only the first 2 and last 2 characters.+ */+export function getMaskedKey(key: string): string {+ if (!key || key.length < 4) {+ return key || 'N/A';+ }+ return `${key.substring(0, 2)}·······${key.slice(-2).trim()}`;+}