api_return_image_as_full_url#227
Conversation
Confidence Score: 3/5The plan edit path is safe, but the series edit path has a functional gap where the save button can be silently disabled for existing series with images if image_key is absent. The preview side of the series flow was updated to use image_url, but the form-value side (resolveSeriesImageKey) still ignores image_url and explicitly rejects full-URL strings. Given the PR is responding to a backend migration toward full URLs, image_key may no longer always be present. src/components/routes/create-series/api/seriesApi.ts — specifically resolveSeriesImageKey, which needs to fall back to image_url when image_key is absent. Reviews (1): Last reviewed commit: "api_return_image_as_full_url" | Re-trigger Greptile |
| const resolvedImageUrl = resolveDashboardItemImageUrl({ | ||
| image_url: seriesData.image_url, | ||
| image_key: seriesData.image_key, | ||
| image: seriesData.image, | ||
| }); | ||
| setImagePreview(resolvedImageUrl || null); |
There was a problem hiding this comment.
Preview visible but save button disabled if
image_key is absent
resolveDashboardItemImageUrl now resolves image_url (the new full-URL field) for the preview, but the form's image_url value is still populated by resolveSeriesImageKey, which explicitly ignores any full-URL value in image and never reads image_url at all. If the backend stops returning image_key (which is the stated direction of this migration), resolveSeriesImageKey returns "", the form's imageUrl is empty, and submitEnabled becomes false — so the user sees the correct image preview but cannot save any changes without re-uploading the image.
No description provided.