Skip to content

feat: Prometheus-X Catalogue#17

Draft
KevinRohlf wants to merge 3 commits intomainfrom
feat/prometheus-x-catalogue
Draft

feat: Prometheus-X Catalogue#17
KevinRohlf wants to merge 3 commits intomainfrom
feat/prometheus-x-catalogue

Conversation

@KevinRohlf
Copy link
Contributor

Proposed Changes

@KevinRohlf KevinRohlf added the Status: Do Not Merge Not yet ready to be merged label Dec 11, 2025
@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
portal-sense Ready Ready Preview Comment Dec 12, 2025 6:34pm

ResolvedServiceOffering
} from 'src/@types/VisionsTrust'

const VISIONS_TRUST_API_BASE = 'https://api.visionstrust.com/v1'
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: This can be put into app.config.js like all other endpoint configs.

search
})

const response = await fetch(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: we use axios in this repo.

export async function resolveServiceOfferings(
offerings: VisionsTrustServiceOffering[]
): Promise<ResolvedServiceOffering[]> {
const providerCache = new Map<string, VisionsTrustProvider>()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: It's unfortunate that the provider id needs to be resolved to the name via extra calls. To reduce the refetching save the map higher up in the component or in a global state to prevent refetching during page changes.

/**
* Resolve service offerings with provider details
*/
export async function resolveServiceOfferings(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: The name should reflect that this function is resolving the provider id and not the service offering. e.g. resolveProviderIdToName

export async function fetchServiceOfferings(
params: FetchServiceOfferingsParams = {}
): Promise<ServiceOfferingsResponse> {
const { page = 1, limit = 50, search = '' } = params
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: put 50 into a constant

return {
offerings: resolvedOfferings,
totalCount: response.count,
totalPages: Math.ceil(response.count / (params.limit || 50))
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

todo: reuse 50 from the constant, see above

import Loader from '@shared/atoms/Loader'
import styles from '@shared/AssetList/index.module.css'

const ITEMS_PER_PAGE = 25
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: why is it 25 here and 50 in the other functions? Reuse the constant.

export interface FetchServiceOfferingsParams {
page?: number
limit?: number
search?: string
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thought: It seems search is never used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status: Do Not Merge Not yet ready to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants