Build ECHO Next.js photo upload demo app - #3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ef5651d5d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const objectUrl = URL.createObjectURL(file); | ||
| setImageSrc(objectUrl); |
There was a problem hiding this comment.
Revoke blob URLs after updating the preview
Calling URL.createObjectURL(file) for each upload without ever revoking prior URLs leaks browser memory; repeated uploads (especially large images) will keep old blobs alive for the lifetime of the tab. This can degrade performance in normal use of the demo flow where users try multiple photos, so the previous URL should be revoked when replacing the image and on component unmount.
Useful? React with 👍 / 👎.
Motivation
Description
package.jsonwithnext,react, andreact-domdependencies anddev/build/startscripts so the app is intended to run withnpm run dev.app/layout.jswith site metadata and global stylesheet import that sets the app title to "ECHO – Find Your Doppelganger".app/page.jsas a client component implementing the upload button, image preview, fake result text "You are 82% aligned with a historical twin", and a sample match (name + short story).app/globals.csswith simple, clean styles for the card layout, upload buttons, preview image, and match card.Testing
npm installto install dependencies, but it failed due to an npm registry policy error (403 Forbidden), so runtime verification (npm run dev) could not be completed.git status.Codex Task