Skip to content

Fix item asset rendering across origins - #28

Merged
shobhit-seg merged 1 commit into
mainfrom
agent/fix-item-asset-rendering
Jul 17, 2026
Merged

shobhit-seg merged 1 commit into
mainfrom
agent/fix-item-asset-rendering

Conversation

@swapnadeepmohapatra

Copy link
Copy Markdown
Contributor

Summary

  • resolve relative /item-assets/* URLs against the configured API origin before rendering
  • apply URL resolution to existing editor content, remote refreshes, and newly uploaded images
  • convert API asset URLs back to relative paths before saving so stored HTML remains portable

Root cause

The API returns portable relative asset URLs, but the production frontend and API use separate origins. Without a host rewrite, browsers requested those paths from the frontend origin and received a missing or non-image response.

Impact

Imported and uploaded images now render from VITE_API_ORIGIN without requiring an Amplify rewrite rule.

Validation

  • pnpm --filter @notdrive/web typecheck
  • pnpm --filter @notdrive/web test (no test files present)
  • pnpm --filter @notdrive/web build
  • Biome check for changed files

@swapnadeepmohapatra
swapnadeepmohapatra marked this pull request as ready for review July 15, 2026 12:35
@shobhit-seg
shobhit-seg added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit 834803d Jul 17, 2026
1 check passed
@shobhit-seg
shobhit-seg deleted the agent/fix-item-asset-rendering branch July 17, 2026 07:10
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.

2 participants