Add confirmation dialog for delete all workspace data#6
Conversation
Gate the settings danger-zone action behind an alert dialog and wire it to a new deleteAllWorkspaceData mutation. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryAdds a confirmation
Confidence Score: 5/5Safe to merge — the pagination logic is correct across all cursor branches, error handling is in place, and the helpers correctly handle loops and soft-deletes. The core delete-all flow works correctly: same-timestamp ties are broken by src/convex/sessions.ts — the initial and "before" cursor branches in Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User (Browser)
participant S as Settings Page
participant C as Convex Client
participant M as deleteAllWorkspaceData
U->>S: Click "Delete all data"
S->>S: openDeleteDialog() — reset error, open dialog
U->>S: Click "Delete all data" in dialog
S->>S: "deleting = true"
loop while hasMore
S->>C: "mutation(deleteAllWorkspaceData, { cursor })"
C->>M: fetchDeleteAllBatch(userId, cursor)
M-->>C: batch of ≤5 sessions
M->>M: softDeleteSession × N
M-->>C: "{ deletedCount, hasMore, cursor? }"
C-->>S: result
alt hasMore
S->>S: "cursor = result.cursor"
else done
S->>S: break
end
end
alt Success
S->>S: "deleteDialogOpen = false"
S->>U: goto("/dashboard")
else Error
S->>S: "deleteError = message"
S->>U: show error in dialog
end
S->>S: "deleting = false"
Reviews (16): Last reviewed commit: "address greptile review feedback (greplo..." | Re-trigger Greptile |
Paginate deleteAllWorkspaceData with batched cursor reads and surface mutation errors in the settings dialog. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@greptile review |
Use composite session cursors for batched deletes and remove analysis jobs when soft-deleting sessions. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@greptile review |
Delete jobs and reports in batches until exhausted and ignore already-deleted sessions when advancing cursors. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@greptile review |
Filter undeleted analysis reports when batching soft-delete cleanup for a session. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@greptile review |
Continue delete-all pagination to older timestamps after an "after" cursor exhausts its tie group. Co-authored-by: Cursor <cursoragent@cursor.com>
|
@greptile review |
|
@greptile review |
Co-authored-by: Cursor <cursoragent@cursor.com>
|
@greptile review |
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
deleteAllWorkspaceDataConvex mutation that soft-deletes all sessions, reports, and trace files for the signed-in user.Test plan
vp checkpasses.Made with Cursor