Skip to content

Orphaned Assets Fix#4119

Open
yugalkaushik wants to merge 6 commits into
processing:developfrom
yugalkaushik:orphaned-assets
Open

Orphaned Assets Fix#4119
yugalkaushik wants to merge 6 commits into
processing:developfrom
yugalkaushik:orphaned-assets

Conversation

@yugalkaushik
Copy link
Copy Markdown
Contributor

@yugalkaushik yugalkaushik commented May 17, 2026

Issue:

Completes #4107

This change adds a pending-upload workflow for user assets so files are not permanently stored until a project is successfully saved. It also adds rollback for failed clones and a scheduled cleanup path for abandoned pending uploads. Uploaded assets now go to a pending S3 prefix first, are committed into the final user/project location on save, and are removed later if they stay pending too long. The cleanup threshold is 7 days.

Demo:

preview-orphanedassets.mp4

Changes:

  • Uploads are signed into pending/{userId}/... using the authenticated user id.
  • Project creation and project updates both commit any pending assets after a successful save.
  • Pending uploads are kept for 7 days before they become eligible for cleanup.
  • Abandoned uploads under pending/ are cleaned by an S3 lifecycle rule (prefix pending/, expire after 7 days).

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

@khanniie
Copy link
Copy Markdown
Member

Hi Yugal! Thanks so much for the PR! Apologies for the delay, will take a look this upcoming week.

@khanniie khanniie self-requested a review May 24, 2026 15:47
@yugalkaushik
Copy link
Copy Markdown
Contributor Author

@khanniie Reminder for review 👩🏼‍💻

@khanniie
Copy link
Copy Markdown
Member

khanniie commented Jun 2, 2026

actually if @raclim is back maybe she would be a better reviewer for this one? I don't have much context on the backend side of the editor to be honest

@yugalkaushik
Copy link
Copy Markdown
Contributor Author

@raclim Hi, I have updated the logic to use a better approach, please review the PR.

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