FE: Ability for people to see agents/flows at the pinned or latest version, where appropriate
Problem
Users who are version-pinned to specific catalog items (via #578589 (closed)) will not view the details of the item version they're actually using. The catalog item details page only shows the latest version, which may differ from their pinned version after updates are published.
This creates a disconnect between what users see and what they're actually consuming, making it difficult to understand the capabilities and configuration of their active version.
Proposal
Enable users to view catalog item details for their specific pinned version, not just the latest version.
Out of scope for this iteration: Upgrading version pins (planned for future iteration per this comment).
Technical proposal
Use the new AiCatalogItemConsumer.pinnedItemVersion field that is being added in #580381 to return the specific version of an item based on the version pin of the item consumer.
This returns the specific version data to display in the UI.
Note, once #578589 (closed) is complete, pinnedVersionPrefix will contain the specific version (e.g., 1.2.0).
Example of using the field:
Through Query.aiCatalogItem (we use the existing configurationForProject field to return back the item consumer for the given project - note #580381 will add a new configurationForGroup field for group-level use):
{
aiCatalogItem(id: "gid://gitlab/Ai::Catalog::Item/1") {
id
name
description
configurationForProject(projectId: "gid://gitlab/Project/123") {
id
pinnedVersionPrefix
pinnedItemVersion {
id
humanVersionName
}
}
}
}
Through Query.aiCatalogConfiguredItems:
query {
aiCatalogConfiguredItems(projectId: "gid://gitlab/Project/1000000"){
nodes {
id
pinnedVersionPrefix
pinnedItemVersion {
id
humanVersionName
}
}
}
}