Skip to content

Commit 3832d3b

Browse files
mturleyclaude
andauthored
fix(ui): show artifact URI instead of transfer job destination URI in version details (#2554)
* fix(ui): show artifact URI instead of transfer job destination URI in version details The StorageLocationSection was displaying the URI from the transfer job's destination field, which stores bare OCI image references without the oci:// scheme prefix. The registered model artifact has the correct URI with the prefix. Use the artifact URI for display instead. Assisted-by: Claude Code (claude-opus-4-6) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu> * test(ui): update storage location URI assertion to expect oci:// prefix Assisted-by: Claude Code (claude-opus-4-6) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu> --------- Signed-off-by: Mike Turley <mike.turley@alum.cs.umass.edu> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cea277a commit 3832d3b

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

clients/ui/frontend/src/__tests__/cypress/cypress/tests/mocked/modelRegistry/modelVersionDetails.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ describe('Model version details', () => {
620620

621621
modelVersionDetails
622622
.findStorageLocationUri()
623-
.should('contain.text', 'quay.io/my-org/my-model:v1.0.0');
623+
.should('contain.text', 'oci://quay.io/my-org/my-model:v1.0.0');
624624
});
625625

626626
it('should show expandable source details with origin location', () => {

clients/ui/frontend/src/app/pages/modelRegistry/screens/ModelVersionDetails/ModelVersionDetailsView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ const ModelVersionDetailsView: React.FC<ModelVersionDetailsViewProps> = ({
170170
)}
171171
{isTransferJobSource && modelArtifact ? (
172172
<StorageLocationSection
173+
artifactUri={modelArtifact.uri}
173174
fallbackNamespace={transferJobParams.jobNamespace}
174175
transferJob={transferJob}
175176
transferJobLoaded={transferJobLoaded}

clients/ui/frontend/src/app/pages/modelRegistry/screens/ModelVersionDetails/StorageLocationSection.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ import {
2727
getModelUriLabel,
2828
getModelUriPopoverContent,
2929
getSourceLabel,
30-
getDestinationUri,
3130
getSourcePath,
3231
} from '~/app/utils';
3332

3433
type StorageLocationSectionProps = {
34+
artifactUri?: string;
3535
fallbackNamespace: string;
3636
transferJob: ModelTransferJob | null;
3737
transferJobLoaded: boolean;
@@ -117,6 +117,7 @@ const StorageLocationTitle: React.FC = () => (
117117
);
118118

119119
const StorageLocationSection: React.FC<StorageLocationSectionProps> = ({
120+
artifactUri,
120121
fallbackNamespace,
121122
transferJob,
122123
transferJobLoaded,
@@ -185,7 +186,6 @@ const StorageLocationSection: React.FC<StorageLocationSectionProps> = ({
185186
const destType = transferJob.destination.type;
186187
const sourceType = transferJob.source.type;
187188
const namespace = transferJob.namespace || '';
188-
const destinationUri = getDestinationUri(transferJob);
189189
const sourcePath = getSourcePath(transferJob);
190190
const sourceLabel = getSourceLabel(sourceType);
191191

@@ -209,13 +209,15 @@ const StorageLocationSection: React.FC<StorageLocationSectionProps> = ({
209209
<DashboardDescriptionListGroup
210210
title={getModelUriLabel(destType)}
211211
popover={getModelUriPopoverContent(destType)}
212-
isEmpty={!destinationUri}
212+
isEmpty={!artifactUri}
213213
contentWhenEmpty="No URI"
214214
>
215-
<InlineTruncatedClipboardCopy
216-
testId="storage-location-uri"
217-
textToCopy={destinationUri}
218-
/>
215+
{artifactUri && (
216+
<InlineTruncatedClipboardCopy
217+
testId="storage-location-uri"
218+
textToCopy={artifactUri}
219+
/>
220+
)}
219221
</DashboardDescriptionListGroup>
220222
</DescriptionList>
221223
</StackItem>

0 commit comments

Comments
 (0)