diff --git a/frontend/web/components/TryIt.js b/frontend/web/components/TryIt.js
index c14f13e0184e..ee7234c19fc6 100644
--- a/frontend/web/components/TryIt.js
+++ b/frontend/web/components/TryIt.js
@@ -3,6 +3,11 @@ import Highlight from './Highlight'
import ConfigProvider from 'common/providers/ConfigProvider'
import Constants from 'common/constants'
+// Running a test is a real SDK evaluation, which marks the environment as
+// integrated (environment.first_evaluated) — hide it until the project looks
+// genuinely in use.
+export const MIN_FLAGS_TO_SHOW_TRY_IT = 3
+
const TryIt = class extends Component {
static displayName = 'TryIt'
@@ -52,7 +57,8 @@ const TryIt = class extends Component {
}
render() {
- return Utils.getFlagsmithHasFeature('try_it') ? (
+ return Utils.getFlagsmithHasFeature('try_it') &&
+ (E2E || (this.props.totalFeatures || 0) >= MIN_FLAGS_TO_SHOW_TRY_IT) ? (
diff --git a/frontend/web/components/pages/IdentityPage.tsx b/frontend/web/components/pages/IdentityPage.tsx
index 41b16b903fb0..e4dc84b8eee4 100644
--- a/frontend/web/components/pages/IdentityPage.tsx
+++ b/frontend/web/components/pages/IdentityPage.tsx
@@ -71,7 +71,9 @@ const IdentityPage: FC = () => {
{ skip: !projectId },
)
- const { getEnvironmentIdFromKey } = useProjectEnvironments(projectId!)
+ const { getEnvironmentIdFromKey, project } = useProjectEnvironments(
+ projectId!,
+ )
const apiParams = environmentId
? buildApiFilterParams(
@@ -423,6 +425,12 @@ const IdentityPage: FC = () => {
title='Check to see what features and traits are coming back for this user'
environmentId={environmentId}
userId={identityName}
+ totalFeatures={Math.max(
+ // The list count is filter-aware but live; the
+ // project total is unfiltered but cached.
+ paging?.count ?? 0,
+ project?.total_features ?? 0,
+ )}
/>
diff --git a/frontend/web/components/pages/features/FeaturesPage.tsx b/frontend/web/components/pages/features/FeaturesPage.tsx
index 3bb1193ef34f..863449489ba0 100644
--- a/frontend/web/components/pages/features/FeaturesPage.tsx
+++ b/frontend/web/components/pages/features/FeaturesPage.tsx
@@ -413,6 +413,12 @@ const FeaturesPage: FC = ({ forcedTagIds, pageTitle }) => {
>
)}
diff --git a/frontend/web/components/pages/features/components/FeaturesSDKIntegration.tsx b/frontend/web/components/pages/features/components/FeaturesSDKIntegration.tsx
index e92c7b281eb1..2e0efb30c584 100644
--- a/frontend/web/components/pages/features/components/FeaturesSDKIntegration.tsx
+++ b/frontend/web/components/pages/features/components/FeaturesSDKIntegration.tsx
@@ -9,11 +9,13 @@ import { openIntegrationModal } from 'components/integrations/openIntegrationMod
type FeaturesSDKIntegrationProps = {
projectId: number
environmentId: string
+ totalFeatures?: number
}
export const FeaturesSDKIntegration: FC = ({
environmentId,
projectId,
+ totalFeatures,
}) => {
const hasMcp = Utils.hasIntegration('mcp')
return (
@@ -48,6 +50,7 @@ export const FeaturesSDKIntegration: FC = ({
>