@@ -122,9 +122,6 @@ const PolicyList: FC<PolicyListProps> = ({
122122 ] ) ;
123123 const canAddPolicy = ! isChoreoConnectEnabled && ! isPolicyHubGateway ;
124124
125- const isAIAPI = apiSubType === 'AIAPI' ;
126- const isRestAPI = apiType === 'HTTP' && ! isAIAPI ;
127-
128125 const getPolicyCategory = ( policy : Policy ) => {
129126 const category = policy . category || policy . categories ?. [ 0 ] ;
130127 return category || 'Uncategorized' ;
@@ -147,22 +144,7 @@ const PolicyList: FC<PolicyListProps> = ({
147144 const normalizedSelection = prev . filter ( ( category ) =>
148145 availableCategories . includes ( category ) ,
149146 ) ;
150- let nextSelection = normalizedSelection ;
151-
152- // If current selections become invalid, apply API-type defaults when available.
153- if ( nextSelection . length === 0 ) {
154- const defaults = isAIAPI
155- ? [ 'AI' , 'Guardrails' ]
156- : isRestAPI
157- ? [ 'Transformation' , 'Security' ]
158- : [ ] ;
159- const matchingDefaults = defaults . filter ( ( category ) =>
160- availableCategories . includes ( category ) ,
161- ) ;
162- if ( matchingDefaults . length > 0 ) {
163- nextSelection = matchingDefaults ;
164- }
165- }
147+ const nextSelection = normalizedSelection ;
166148
167149 if (
168150 nextSelection . length !== prev . length ||
@@ -174,7 +156,7 @@ const PolicyList: FC<PolicyListProps> = ({
174156 }
175157 return prev ;
176158 } ) ;
177- } , [ availableCategories , isAIAPI , isRestAPI ] ) ;
159+ } , [ availableCategories ] ) ;
178160
179161 const handleAddPolicy = ( ) => {
180162 setDialogOpen ( true ) ;
0 commit comments