File tree Expand file tree Collapse file tree
clients/ui/frontend/src/app/pages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ const McpCatalog: React.FC = () => {
3030 const filtersApplied = hasMcpFiltersApplied ( filters , searchQuery ) ;
3131 const isAllServersView = selectedSourceLabel === undefined && ! filtersApplied ;
3232
33- const { isSingleCategory, hasNoCategories } = useEffectiveCategories (
33+ const { effectiveActiveCategories , isSingleCategory, hasNoCategories } = useEffectiveCategories (
3434 catalogSources ,
3535 catalogLabels ,
3636 emptyCategoryLabels ,
@@ -92,6 +92,9 @@ const McpCatalog: React.FC = () => {
9292 < McpCatalogGalleryView
9393 handleFilterReset = { handleResetAllFilters }
9494 isSingleCategory = { isSingleCategory }
95+ singleCategoryLabel = {
96+ isSingleCategory ? effectiveActiveCategories [ 0 ] : undefined
97+ }
9598 />
9699 ) }
97100 </ PageSection >
Original file line number Diff line number Diff line change @@ -32,11 +32,13 @@ const PAGE_SIZE = 10;
3232type McpCatalogGalleryViewProps = {
3333 handleFilterReset : ( ) => void ;
3434 isSingleCategory ?: boolean ;
35+ singleCategoryLabel ?: string ;
3536} ;
3637
3738const McpCatalogGalleryView : React . FC < McpCatalogGalleryViewProps > = ( {
3839 handleFilterReset,
3940 isSingleCategory = false ,
41+ singleCategoryLabel,
4042} ) => {
4143 const {
4244 mcpApiState,
@@ -98,16 +100,17 @@ const McpCatalogGalleryView: React.FC<McpCatalogGalleryViewProps> = ({
98100 ) ;
99101 }
100102
103+ const effectiveCategoryLabel = singleCategoryLabel || selectedSourceLabel || '' ;
101104 const categoryTitle = isSingleCategory
102105 ? getLabelDisplayName (
103- selectedSourceLabel || '' ,
106+ effectiveCategoryLabel ,
104107 catalogLabels ,
105108 OTHER_MCP_SERVERS_DISPLAY_NAME ,
106109 'servers' ,
107110 )
108111 : undefined ;
109112 const categoryDescription = isSingleCategory
110- ? getLabelDescription ( selectedSourceLabel || '' , catalogLabels )
113+ ? getLabelDescription ( effectiveCategoryLabel , catalogLabels )
111114 : undefined ;
112115
113116 return (
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const ModelCatalog: React.FC = () => {
2626 } = React . useContext ( ModelCatalogContext ) ;
2727 const filtersApplied = useHasVisibleFiltersApplied ( ) ;
2828
29- const { isSingleCategory, hasNoCategories } = useEffectiveCategories (
29+ const { effectiveActiveCategories , isSingleCategory, hasNoCategories } = useEffectiveCategories (
3030 catalogSources ,
3131 catalogLabels ,
3232 emptyCategoryLabels ,
@@ -88,7 +88,9 @@ const ModelCatalog: React.FC = () => {
8888 searchTerm = { searchTerm }
8989 handleFilterReset = { handleFilterReset }
9090 isSingleCategory = { isSingleCategory }
91- singleCategoryLabel = { isSingleCategory ? activeCategories [ 0 ] : undefined }
91+ singleCategoryLabel = {
92+ isSingleCategory ? effectiveActiveCategories [ 0 ] : undefined
93+ }
9294 />
9395 ) }
9496 </ PageSection >
You can’t perform that action at this time.
0 commit comments