Add functionality to delete diagnostic reports
Status Fixed / completed
Maintainer reply None cached
Activity 1 comment · opened Jul 5, 2025 · closed Jul 5, 2025
Feature Request
Description
Add the ability to delete diagnostic reports from the system. Currently, there is no way to remove reports once they are created.
Requirements
- Backend API Endpoint
- Add DELETE endpoint at
/api/v1/diagnostic-reports/{report_id} - Should delete the report and all associated scraped data
- Should check user permissions (admin only or owner of the prospect)
- Should handle cascade deletion of related entities
- Frontend UI
- Add delete button on diagnostic report detail page
- Add confirmation dialog before deletion
- Show appropriate success/error messages
- Redirect to reports list after successful deletion
- Database Considerations
- Ensure proper cleanup of relationships in Neo4j
- Delete associated ScrapedData nodes
- Update prospect status if needed
- Consider soft delete vs hard delete
Implementation Notes
- Consider adding a "trash" feature for soft deletes
- May want to add bulk delete functionality for multiple reports
- Should log deletion events for audit trail
- Consider data retention policies
Related Files
- Backend:
/backend/app/api/v1/endpoints/diagnostic_reports.py - Frontend:
/frontend/src/routes/(app)/diagnostic-reports/[id]/+page.svelte - Repository:
/backend/app/repositories/diagnostic_report.py
Priority
Medium - Nice to have for data management and cleanup
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗