Skip to content

Commit cd5942d

Browse files
Merge pull request #2238 from redpanda-data/feature-flag-cleanup
frontend: remove ADP related flags already enabled
2 parents a8def9b + d7eea00 commit cd5942d

21 files changed

Lines changed: 212 additions & 602 deletions

frontend/src/components/constants.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,15 @@ export const BUILDER_API_KEY = '4abd0efa0759420b88149ada5c1eb216';
77
// By default, most feature flags will be false when there's no embedded mode on.
88
export const FEATURE_FLAGS = {
99
enableKnowledgeBaseInConsoleUi: false,
10-
enableRemoteMcpInConsole: false,
11-
enableRemoteMcpInspectorInConsole: false,
12-
enableRemoteMcpConnectClientInConsoleServerless: false,
1310
enableRpcnTiles: false,
1411
enableServerlessOnboardingWizard: false,
15-
enableAiAgentsInConsole: false,
16-
enableAiAgentsInspectorInConsole: false,
17-
enableAiAgentsInConsoleServerless: false,
18-
enableMcpServiceAccount: false,
19-
enablePipelineServiceAccount: false,
20-
enableTranscriptsInConsole: false,
2112
enableApiKeyConfigurationAgent: false,
22-
shadowlinkCloudUi: false,
2313
enableDataplaneObservabilityServerless: false,
2414
enableDataplaneObservability: false,
2515
};
2616

2717
// Cloud-managed tag keys for service account integration
28-
// These tags are created automatically when enableMcpServiceAccount is enabled
18+
// These tags are created automatically
2919
// and are critical for cleanup operations during deletion in Redpanda Cloud
3020
export const CLOUD_MANAGED_TAG_KEYS = {
3121
SERVICE_ACCOUNT_ID: 'rp_cloud_service_account_id',

frontend/src/components/pages/agents/details/ai-agent-details-page.tsx

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { getRouteApi, useNavigate } from '@tanstack/react-router';
1414
const routeApi = getRouteApi('/agents/$id');
1515

1616
import { Tabs, TabsContent, TabsList, TabsTrigger } from 'components/redpanda-ui/components/tabs';
17-
import { isFeatureFlagEnabled } from 'config';
1817
import { AlertCircle, Loader2, Network, Search, Settings } from 'lucide-react';
1918
import { runInAction } from 'mobx';
2019
import { useEffect, useState } from 'react';
@@ -37,8 +36,6 @@ export const updatePageTitle = (agentName?: string) => {
3736
};
3837

3938
export const AIAgentDetailsPage = () => {
40-
const isAiAgentsInspectorFeatureEnabled = isFeatureFlagEnabled('enableAiAgentsInspectorInConsole');
41-
4239
const { id } = routeApi.useParams();
4340
const navigate = useNavigate({ from: '/agents/$id' });
4441
// Use fine-grained selector to only re-render when tab changes
@@ -111,12 +108,10 @@ export const AIAgentDetailsPage = () => {
111108
A2A
112109
</div>
113110
</TabsTrigger>
114-
{Boolean(isAiAgentsInspectorFeatureEnabled) && (
115-
<TabsTrigger className="gap-2" value="inspector">
116-
<Search className="h-4 w-4" />
117-
Inspector
118-
</TabsTrigger>
119-
)}
111+
<TabsTrigger className="gap-2" value="inspector">
112+
<Search className="h-4 w-4" />
113+
Inspector
114+
</TabsTrigger>
120115
</TabsList>
121116

122117
<TabsContent value="configuration">
@@ -125,11 +120,9 @@ export const AIAgentDetailsPage = () => {
125120
<TabsContent value="agent-card">
126121
<AIAgentCardTab />
127122
</TabsContent>
128-
{Boolean(isAiAgentsInspectorFeatureEnabled) && (
129-
<TabsContent className="flex h-full flex-col" value="inspector">
130-
<AIAgentInspectorTab />
131-
</TabsContent>
132-
)}
123+
<TabsContent className="flex h-full flex-col" value="inspector">
124+
<AIAgentInspectorTab />
125+
</TabsContent>
133126
</Tabs>
134127
</div>
135128
);

frontend/src/components/pages/agents/list/ai-agent-list-page.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
import { create } from '@bufbuild/protobuf';
1313
import { createRouterTransport } from '@connectrpc/connect';
1414
import userEvent from '@testing-library/user-event';
15+
import { ListMCPServersResponseSchema, MCPServerSchema } from 'protogen/redpanda/api/dataplane/v1/mcp_pb';
16+
import { listMCPServers } from 'protogen/redpanda/api/dataplane/v1/mcp-MCPServerService_connectquery';
1517
import {
1618
AIAgent_State,
1719
AIAgentSchema,
@@ -29,8 +31,6 @@ import {
2931
startAIAgent,
3032
stopAIAgent,
3133
} from 'protogen/redpanda/api/dataplane/v1alpha3/ai_agent-AIAgentService_connectquery';
32-
import { ListMCPServersResponseSchema, MCPServerSchema } from 'protogen/redpanda/api/dataplane/v1alpha3/mcp_pb';
33-
import { listMCPServers } from 'protogen/redpanda/api/dataplane/v1alpha3/mcp-MCPServerService_connectquery';
3434
import { renderWithFileRoutes, screen, waitFor, within } from 'test-utils';
3535

3636
vi.mock('config', async (importOriginal) => {

frontend/src/components/pages/mcp-servers/create/metadata-step.tsx

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import { Textarea } from 'components/redpanda-ui/components/textarea';
1515
import { Heading, Text } from 'components/redpanda-ui/components/typography';
1616
import { ResourceTierSelect } from 'components/ui/connect/resource-tier-select';
1717
import { TagsFieldList } from 'components/ui/tag/tags-field-list';
18-
import { isFeatureFlagEnabled } from 'config';
1918
import { Controller, type UseFieldArrayReturn, type UseFormReturn } from 'react-hook-form';
2019

2120
import type { FormValues } from './schemas';
@@ -89,28 +88,26 @@ export const MetadataStep: React.FC<MetadataStepProps> = ({ form, tagFields, app
8988
)}
9089
</Field>
9190

92-
{isFeatureFlagEnabled('enableMcpServiceAccount') && (
93-
<Field data-invalid={!!form.formState.errors.serviceAccountName}>
94-
<FieldLabel htmlFor="serviceAccountName" required>
95-
Service Account Name
96-
</FieldLabel>
97-
<Input
98-
id="serviceAccountName"
99-
placeholder="e.g., cluster-abc123-mcp-my-server-sa"
100-
{...form.register('serviceAccountName')}
101-
aria-describedby={form.formState.errors.serviceAccountName ? 'serviceAccountName-error' : undefined}
102-
aria-invalid={!!form.formState.errors.serviceAccountName}
103-
/>
104-
<FieldDescription>
105-
This service account will be created automatically when you create the MCP server.
106-
</FieldDescription>
107-
{!!form.formState.errors.serviceAccountName && (
108-
<FieldError id="serviceAccountName-error">
109-
{form.formState.errors.serviceAccountName.message}
110-
</FieldError>
111-
)}
112-
</Field>
113-
)}
91+
<Field data-invalid={!!form.formState.errors.serviceAccountName}>
92+
<FieldLabel htmlFor="serviceAccountName" required>
93+
Service Account Name
94+
</FieldLabel>
95+
<Input
96+
id="serviceAccountName"
97+
placeholder="e.g., cluster-abc123-mcp-my-server-sa"
98+
{...form.register('serviceAccountName')}
99+
aria-describedby={form.formState.errors.serviceAccountName ? 'serviceAccountName-error' : undefined}
100+
aria-invalid={!!form.formState.errors.serviceAccountName}
101+
/>
102+
<FieldDescription>
103+
This service account will be created automatically when you create the MCP server.
104+
</FieldDescription>
105+
{!!form.formState.errors.serviceAccountName && (
106+
<FieldError id="serviceAccountName-error">
107+
{form.formState.errors.serviceAccountName.message}
108+
</FieldError>
109+
)}
110+
</Field>
114111
</div>
115112
</form>
116113
</div>

frontend/src/components/pages/mcp-servers/create/remote-mcp-create-page.tsx

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import {
2626
} from 'components/ui/service-account/service-account-selector';
2727
import { ExpandedYamlDialog } from 'components/ui/yaml/expanded-yaml-dialog';
2828
import { useYamlLabelSync } from 'components/ui/yaml/use-yaml-label-sync';
29-
import { isFeatureFlagEnabled } from 'config';
3029
import { ArrowLeft, FileText, Hammer, Loader2 } from 'lucide-react';
3130
import { MCPServer_ServiceAccountSchema } from 'protogen/redpanda/api/dataplane/v1/mcp_pb';
3231
import React, { useEffect, useMemo, useRef, useState } from 'react';
@@ -160,10 +159,13 @@ export const RemoteMCPCreatePage: React.FC = () => {
160159

161160
const handleNext = async (isOnMetadataStep: boolean, goNext: () => void) => {
162161
if (isOnMetadataStep) {
163-
const fieldsToValidate: Array<keyof FormValues> = ['displayName', 'description', 'resourcesTier', 'tags'];
164-
if (isFeatureFlagEnabled('enableMcpServiceAccount')) {
165-
fieldsToValidate.push('serviceAccountName');
166-
}
162+
const fieldsToValidate: Array<keyof FormValues> = [
163+
'displayName',
164+
'description',
165+
'resourcesTier',
166+
'tags',
167+
'serviceAccountName',
168+
];
167169
const valid = await form.trigger(fieldsToValidate);
168170
if (!valid) {
169171
return;
@@ -305,29 +307,25 @@ export const RemoteMCPCreatePage: React.FC = () => {
305307
};
306308
}
307309

308-
const useMcpServiceAccount = isFeatureFlagEnabled('enableMcpServiceAccount');
309310
let serviceAccountConfig: ReturnType<typeof create<typeof MCPServer_ServiceAccountSchema>> | undefined;
310311

311-
// Create service account if feature flag is enabled
312312
// NOTE: Service account and secret are created before MCP server creation.
313313
// If server creation fails, these resources will not be automatically cleaned up.
314314
// This matches the AI agents implementation pattern.
315-
if (useMcpServiceAccount) {
316-
const serviceAccountResult = await createServiceAccountIfNeeded(values.displayName);
317-
if (!serviceAccountResult) {
318-
return; // Error already shown by createServiceAccountIfNeeded
319-
}
315+
const serviceAccountResult = await createServiceAccountIfNeeded(values.displayName);
316+
if (!serviceAccountResult) {
317+
return; // Error already shown by createServiceAccountIfNeeded
318+
}
320319

321-
const { secretName, serviceAccountId } = serviceAccountResult;
320+
const { secretName, serviceAccountId } = serviceAccountResult;
322321

323-
// Add system-generated service account tags
324-
addServiceAccountTags(tagsMap, serviceAccountId, secretName);
322+
// Add system-generated service account tags
323+
addServiceAccountTags(tagsMap, serviceAccountId, secretName);
325324

326-
serviceAccountConfig = create(MCPServer_ServiceAccountSchema, {
327-
clientId: `\${secrets.${secretName}.client_id}`,
328-
clientSecret: `\${secrets.${secretName}.client_secret}`,
329-
});
330-
}
325+
serviceAccountConfig = create(MCPServer_ServiceAccountSchema, {
326+
clientId: `\${secrets.${secretName}.client_id}`,
327+
clientSecret: `\${secrets.${secretName}.client_secret}`,
328+
});
331329

332330
const mcpServerPayload = {
333331
displayName: values.displayName.trim(),
@@ -338,7 +336,7 @@ export const RemoteMCPCreatePage: React.FC = () => {
338336
cpuShares: tier?.cpu ?? '200m',
339337
memoryShares: tier?.memory ?? '800M',
340338
},
341-
...(useMcpServiceAccount && { serviceAccount: serviceAccountConfig }),
339+
serviceAccount: serviceAccountConfig,
342340
};
343341

344342
await createServer(
@@ -463,15 +461,13 @@ export const RemoteMCPCreatePage: React.FC = () => {
463461
)}
464462
</Stepper.Controls>
465463

466-
{isFeatureFlagEnabled('enableMcpServiceAccount') && (
467-
<ServiceAccountSelector
468-
createSecret={createSecret}
469-
onPendingChange={setIsCreateServiceAccountPending}
470-
ref={serviceAccountSelectorRef}
471-
resourceType="MCP server"
472-
serviceAccountName={serviceAccountName}
473-
/>
474-
)}
464+
<ServiceAccountSelector
465+
createSecret={createSecret}
466+
onPendingChange={setIsCreateServiceAccountPending}
467+
ref={serviceAccountSelectorRef}
468+
resourceType="MCP server"
469+
serviceAccountName={serviceAccountName}
470+
/>
475471

476472
{/* Expanded YAML Editor Dialog */}
477473
{expandedTool ? (

frontend/src/components/pages/mcp-servers/create/use-metadata-validation.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
* by the Apache License, Version 2.0
99
*/
1010

11-
import { isFeatureFlagEnabled } from 'config';
1211
import { useMemo } from 'react';
1312
import type { UseFormReturn } from 'react-hook-form';
1413

1514
import type { FormValues } from './schemas';
1615

1716
export function useMetadataValidation(form: UseFormReturn<FormValues>) {
1817
const formValues = form.watch();
19-
const isServiceAccountEnabled = isFeatureFlagEnabled('enableMcpServiceAccount');
2018

2119
const isMetadataComplete = useMemo(() => {
2220
// Check displayName (required)
@@ -35,14 +33,13 @@ export function useMetadataValidation(form: UseFormReturn<FormValues>) {
3533
form.formState.errors.description ||
3634
form.formState.errors.resourcesTier ||
3735
form.formState.errors.tags ||
38-
(isServiceAccountEnabled && form.formState.errors.serviceAccountName)
36+
form.formState.errors.serviceAccountName
3937
);
4038

4139
return !hasMetadataErrors;
4240
}, [
4341
formValues.displayName,
4442
formValues.resourcesTier,
45-
isServiceAccountEnabled,
4643
form.formState.errors.displayName,
4744
form.formState.errors.description,
4845
form.formState.errors.resourcesTier,

frontend/src/components/pages/mcp-servers/details/remote-mcp-configuration-tab.tsx

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import { extractSecretReferences, getUniqueSecretNames } from 'components/ui/sec
4040
import { ServiceAccountSection } from 'components/ui/service-account/service-account-section';
4141
import { ExpandedYamlDialog } from 'components/ui/yaml/expanded-yaml-dialog';
4242
import { YamlEditorCard } from 'components/ui/yaml/yaml-editor-card';
43-
import { isFeatureFlagEnabled } from 'config';
4443
import { Edit, FileText, Hammer, Plus, Save, Settings, ShieldCheck, Trash2 } from 'lucide-react';
4544
import type { LintHint } from 'protogen/redpanda/api/common/v1/linthint_pb';
4645
import { Scope } from 'protogen/redpanda/api/dataplane/v1/secret_pb';
@@ -993,27 +992,26 @@ export const RemoteMCPConfigurationTab = () => {
993992
)}
994993
</div>
995994

996-
{/* Service Account - Show only if feature flag is enabled */}
997-
{isFeatureFlagEnabled('enableMcpServiceAccount') &&
998-
mcpServerData?.mcpServer?.tags[CLOUD_MANAGED_TAG_KEYS.SERVICE_ACCOUNT_ID] && (
999-
<Card className="px-0 py-0" size="full">
1000-
<CardHeader className="border-b p-4 dark:border-border [.border-b]:pb-4">
1001-
<CardTitle className="flex items-center gap-2">
1002-
<ShieldCheck className="h-4 w-4" />
1003-
<Text className="font-semibold">Service Account</Text>
1004-
</CardTitle>
1005-
<Text className="text-sm" variant="muted">
1006-
The service account is used by the MCP server to authenticate to other systems within the Redpanda
1007-
Cloud platform (e.g. Redpanda broker).
1008-
</Text>
1009-
</CardHeader>
1010-
<CardContent className="px-4 pb-4">
1011-
<ServiceAccountSection
1012-
serviceAccountId={mcpServerData.mcpServer.tags[CLOUD_MANAGED_TAG_KEYS.SERVICE_ACCOUNT_ID]}
1013-
/>
1014-
</CardContent>
1015-
</Card>
1016-
)}
995+
{/* Service Account */}
996+
{mcpServerData?.mcpServer?.tags?.[CLOUD_MANAGED_TAG_KEYS.SERVICE_ACCOUNT_ID] && (
997+
<Card className="px-0 py-0" size="full">
998+
<CardHeader className="border-b p-4 dark:border-border [.border-b]:pb-4">
999+
<CardTitle className="flex items-center gap-2">
1000+
<ShieldCheck className="h-4 w-4" />
1001+
<Text className="font-semibold">Service Account</Text>
1002+
</CardTitle>
1003+
<Text className="text-sm" variant="muted">
1004+
The service account is used by the MCP server to authenticate to other systems within the Redpanda Cloud
1005+
platform (e.g. Redpanda broker).
1006+
</Text>
1007+
</CardHeader>
1008+
<CardContent className="px-4 pb-4">
1009+
<ServiceAccountSection
1010+
serviceAccountId={mcpServerData.mcpServer.tags[CLOUD_MANAGED_TAG_KEYS.SERVICE_ACCOUNT_ID]}
1011+
/>
1012+
</CardContent>
1013+
</Card>
1014+
)}
10171015
</div>
10181016

10191017
{/* Expanded YAML Editor Dialog */}

frontend/src/components/pages/mcp-servers/details/remote-mcp-connection-tab.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import { MCPIcon } from 'components/redpanda-ui/components/icons';
2121
import { Label } from 'components/redpanda-ui/components/label';
2222
import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from 'components/redpanda-ui/components/sheet';
2323
import { Link, Text } from 'components/redpanda-ui/components/typography';
24-
import { isFeatureFlagEnabled, isServerless } from 'config';
2524
import { AlertCircle, Code, Link as LinkIcon } from 'lucide-react';
2625
import { useState } from 'react';
2726
import { useGetMCPCodeSnippetQuery, useGetMCPServerQuery } from 'react-query/api/remote-mcp';
@@ -73,9 +72,7 @@ export const RemoteMCPConnectionTab = () => {
7372
</CardTitle>
7473
</CardHeader>
7574
<CardContent className="px-4 pb-4">
76-
{(!isServerless() || isFeatureFlagEnabled('enableRemoteMcpConnectClientInConsoleServerless')) && (
77-
<RemoteMCPConnectClientGuide mcpServer={mcpServerData.mcpServer} />
78-
)}
75+
<RemoteMCPConnectClientGuide mcpServer={mcpServerData.mcpServer} />
7976
</CardContent>
8077
</Card>
8178

0 commit comments

Comments
 (0)