Control Panel Specifications
Archive (Delete)
Soft-delete flow. 30-day HTTP 410, 90-day restore window. Pending-lead blocker. Hard delete restricted to Super Admin DB script.
Complete
There is no hard delete in the Admin CP. The destructive action is "Archive" — a soft-delete that hides the file publicly, preserves the legal lead record, and starts a 30-day HTTP 410 window. The Admin can Restore within 90 days. Hard delete is reserved for a Super Admin DB script after 365 days. The Form preview shows the confirmation modal QC will test.
Archive action — full spec
- Purpose — Soft-delete the file: hide from public, stop new lead capture, preserve existing leads. NOT a real delete — the row stays in the database.
- DB type — UPDATE on FounderFile: SET Status='archived', ArchivedAt=GETUTCDATE(), ArchivedBy=@adminId. No DELETE statement issued. Related rows (Lang, Topics, LearningPoints, DownloadLeads, AuditLog) untouched.
- Validation — Archive button must be DISABLED when: (a) `DownloadLead WHERE FounderFileId=@id AND DeliveredAt IS NULL` returns ≥ 1 row, (b) `Status = under-review`. QC tests: try to archive a file with pending deliveries → button disabled, hover tooltip explains why; try to archive a file in under-review → button disabled.
Public-side response window
- Purpose — Tell crawlers + bookmarks that the URL has been intentionally removed (not just temporarily down). HTTP 410 Gone is the correct signal — it asks search engines to de-index faster than 404.
- DB type — No new table. The public-side gateway reads `FounderFile.Status` + `ArchivedAt`. Within 30 days of ArchivedAt → HTTP 410. After 30 days → HTTP 404.
- Validation — QC tests: curl the public URL 1 hour after archive → expect `HTTP/1.1 410 Gone` + a friendly explanatory page; curl 31 days after archive → expect `HTTP/1.1 404 Not Found`.
Restore action (within 90 days)
- Purpose — Recover a mistakenly-archived file. Returns it to `draft` so the editor can re-submit through the normal Review flow.
- DB type — UPDATE on FounderFile: SET Status='draft', ArchivedAt=NULL, ArchivedBy=NULL. Insert a `FounderFileAuditLog` row with eventType='restored'.
- Validation — Restore button is HIDDEN (not just disabled) when `DATEDIFF(day, ArchivedAt, GETUTCDATE()) > 90`. QC tests: archive a file, restore within 1 day → button visible + action succeeds; archive a file, wait 91 days (use fixed-clock test mode), reopen → button absent.
Side effects on archive
- Event `founder-file.archived` emitted → broken-link scanner re-runs across the platform and surfaces the count in the Admin dashboard.
- Sponsor (if linked) receives email: "File X has been archived. Lead routing for this file has stopped."
- CDN cache for the public URL is purged instantly so the 410 response shows immediately, not after TTL expiry.
- Sitemap is regenerated WITHOUT this file. RSS feed entry removed.
Form preview — Archive confirmation modal
The Archive button opens this confirmation modal. The Admin must check both consent boxes before the "Archive file" button enables.
