-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
1
-
False
-
-
False
-
Not Selected
-
-
-
Overview:
The addBaseImage function in the frontend service has an incorrect type annotation and response handling. The POST response is typed as BaseImageReference directly, but the backend returns CreateBaseImageReferenceResponse which wraps the BaseImageReference in a nested field.
Technical Details:
Backend proto defines:
message CreateBaseImageReferenceResponse {
BaseImageReference base_image_reference = 1;
}
Frontend currently expects response.data to be the BaseImageReference directly, but actual JSON response is:
{ "baseImageReference": { "id": "...", "baseImageRepoPath": "...", ... } }
Acceptance Criteria:
- Update addBaseImage function to correctly unwrap nested response
- Fix TypeScript type annotation to match actual API response shape
- Verify add base image flow still works correctly after fix
Files to Update:
ui/apps/platform/src/services/BaseImagesService.ts:30-37 - Fix response handling
Notes:
Currently "works" because the onSuccess callback doesn't use the returned data, but the type is incorrect and could cause bugs in future refactors.