Skip to content

api_return_image_as_full_url#227

Merged
Lungsangg merged 1 commit into
devfrom
img-preview-not-working-bug
Jun 10, 2026
Merged

api_return_image_as_full_url#227
Lungsangg merged 1 commit into
devfrom
img-preview-not-working-bug

Conversation

@Lungsangg

Copy link
Copy Markdown
Member

No description provided.

@Lungsangg Lungsangg merged commit 6228063 into dev Jun 10, 2026
2 of 3 checks passed
@Lungsangg Lungsangg deleted the img-preview-not-working-bug branch June 10, 2026 11:40
@Lungsangg Lungsangg requested a review from tenkus47 June 10, 2026 11:40
@greptile-apps

greptile-apps Bot commented Jun 10, 2026

Copy link
Copy Markdown

Confidence Score: 3/5

The 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

Comment on lines +80 to +85
const resolvedImageUrl = resolveDashboardItemImageUrl({
image_url: seriesData.image_url,
image_key: seriesData.image_key,
image: seriesData.image,
});
setImagePreview(resolvedImageUrl || null);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant