Fix orphaned file uploads in deduplication and fix frontend test environment#779
Conversation
- Clean up orphaned uploaded images if spatial deduplication links a report to an existing one. - Add missing `jest-environment-jsdom` to `frontend` so frontend tests pass.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
✅ Deploy Preview for fixmybharat canceled.
|
🙏 Thank you for your contribution, @RohanExploit!PR Details:
Quality Checklist:
Review Process:
Note: The maintainers will monitor code quality and ensure the overall project flow isn't broken. |
There was a problem hiding this comment.
Pull request overview
Adds cleanup of orphaned uploaded image files when an issue report is flagged as a duplicate by the spatial deduplication system, and (per description) installs the missing jest-environment-jsdom dev dependency to restore the frontend test environment.
Changes:
- Delete the temp uploaded image when the new report is linked to an existing issue via deduplication.
- Add missing
jest-environment-jsdomdependency in the frontend.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesImage Cleanup on Duplicate Detection
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This PR addresses an issue where uploaded images would be left orphaned on disk if an issue report was flagged as a duplicate by the spatial deduplication system. It safely deletes these temp files.
It also fixes a missing dependency
jest-environment-jsdominfrontendthat was causing frontend tests to fail.PR created automatically by Jules for task 8947891066862357910 started by @RohanExploit
Summary by cubic
Prevents orphaned image uploads when deduplication links a report to an existing issue, and restores frontend test stability by adding
jest-environment-jsdom.jest-environment-jsdominfrontendto fix failing tests.Written for commit f69842f. Summary will update on new commits. Review in cubic
Summary by CodeRabbit