feat(chat): soft-delete sidebar chats with restore from Recently Deleted#5830
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Active reads and mutations now require Recently Deleted gains a Chats tab and Retention jobs hard-delete expired soft-deleted chats (and fold them into Reviewed by Cursor Bugbot for commit 742ad5b. Configure here. |
Greptile SummaryThis PR adds soft deletion and restoration for sidebar chats. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (10): Last reviewed commit: "fix(cleanup): recheck workflow archive c..." | Re-trigger Greptile |
…rchived-list invalidation
|
@cursor review |
|
@cursor review |
|
@cursor review |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit a9d1cde. Configure here.
…d-deleting mothership chats
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 971d6a2. Configure here.
|
@cursor review |
…edAt in chat drain
|
@cursor review |
1 similar comment
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 742ad5b. Configure here.
Summary
copilot_chats.deleted_atinstead of dropping the row, so chats show up in Settings → Recently Deleted and can be restored (Marcus's archive request)POST /api/mothership/chats/[chatId]/restoreroute + contract, owner-scoped like delete; list endpoint gainsscope=active|archivedownedLiveChatWherepredicate), fork, legacy copilot chat lists, chat resources routes, copilot VFS tasks listingcleanup-soft-deletesvia the existingprepareChatCleanupteardown, matching every other Recently Deleted resource0264: nullabledeleted_at+ partial index(user_id, workspace_id) WHERE deleted_at IS NOT NULL, built CONCURRENTLY; expand-only, backward-compatible with the deployed appType of Change
Testing
Unit tests updated/added for the soft-delete DELETE, scope-filtered list, and lifecycle exclusion; migration applied and verified against a local Postgres; full affected suites green (496 tests)
Checklist