Repository navigation
Conversation
- delete archived project threads before removing the project - block project removal while active threads remain - refresh sidebar removal checks across grouped projects
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 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 |
- Keep archived and active snapshot threads aligned with their generated thread IDs - Wait for the delete dispatch request before asserting in the timeline parity test
ApprovabilityVerdict: Needs human review This PR changes project deletion behavior to allow deleting projects that have only archived threads (which are auto-deleted in a cascade). While well-tested and the logic is clear, this modifies core deletion semantics and introduces cascading delete behavior that warrants human verification of the intended workflow. You can customize Macroscope's approvability policy. Learn more. |
…al' into t3code/deleted-dir-project-removal
This fixes an error where removing a project could fail with “Delete all threads in this project before removing it,” even when the only remaining threads were archived. This happened because archived threads were still being treated as blockers for project deletion.
What changed:
Testing:
Note
Fix project deletion being blocked by archived threads
project.deletecommand now emitsthread.deletedevents for each archived thread before emittingproject.deleted, allowing deletion when only archived threads remain.requireProjectDeletionArchivedThreadsinvariant in commandInvariants.ts blocks deletion if any active (non-archived) threads exist, returning an error.SidebarProjectItemno longer disables the 'Remove project' menu item statically; instead it fetches a fresh shell snapshot on demand, checks for active threads, and shows a warning toast if any exist.Macroscope summarized ace2723.
Note
Medium Risk
Changes event emission for
project.deleteto a multi-event sequence and adds a new invariant that can reject deletions, which may impact projections/clients that assumed singleproject.deletedbehavior.Overview
Fixes
project.deletesemantics so archived threads no longer block project removal.On the server, a new invariant
requireProjectDeletionArchivedThreadsrejects project deletion if any active (non-archived) threads exist, anddecider.tsnow emitsthread.deletedevents for each remaining (archived) thread before emittingproject.deleted.On the web, the sidebar “Remove project” flow refreshes the project’s shell snapshot before deciding whether deletion is allowed, blocks only on active threads (updated warning copy), and adds browser/UI tests covering archived-only vs active-thread deletion behavior; additional tests were added for
buildSidebarProjectSnapshotsgrouping behavior.Reviewed by Cursor Bugbot for commit ace2723. Bugbot is set up for automated code reviews on this repo. Configure here.