Skip to content

feat: bulk delete documents in nova app#777

Merged
graphite-app[bot] merged 1 commit intomainfrom
03-10-feat_bulk_delete_documents_in_nova_app
Mar 10, 2026
Merged

feat: bulk delete documents in nova app#777
graphite-app[bot] merged 1 commit intomainfrom
03-10-feat_bulk_delete_documents_in_nova_app

Conversation

@MaheshtheDev
Copy link
Member

@MaheshtheDev MaheshtheDev commented Mar 10, 2026

image.png

@MaheshtheDev MaheshtheDev marked this pull request as ready for review March 10, 2026 05:36
@graphite-app graphite-app bot requested a review from Dhravya March 10, 2026 05:36
@cloudflare-workers-and-pages
Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
supermemory-app 022fab2 Mar 10 2026, 05:36 AM

Copy link
Member Author


How to use the Graphite Merge Queue

Add the label Main to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 10, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
supermemory-app 84d0fb8 Mar 10 2026, 03:34 PM

Copy link
Member

@Prasanna721 Prasanna721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you fix the build issues?

Copy link
Member

Prasanna721 commented Mar 10, 2026

can select & delete button can be at the right of dismiss?

Copy link
Member Author

can select & delete button can be at the right of dismiss?

​what do you mean @Prasanna721 i didn't get it

@claude
Copy link

claude bot commented Mar 10, 2026

Claude finished @MaheshtheDev's task in 1m 9s —— View job


Tasks

  • Analyze PR changes for bugs and security issues
  • Verify if the Sentry-flagged bug has been addressed
  • Check for any other issues in the bulk delete implementation
  • Provide final review summary

Overview: Adds bulk delete functionality for documents with selection mode UI, optimistic updates, and confirmation dialog.

Issues found: None — the Sentry-flagged bug has been fixed in the current code.

The previous review identified a bug where bulkDeleteMutation.onSuccess was calling onClose?.(), which would reset the quick note draft. Looking at the current code at apps/web/hooks/use-document-mutations.ts:546-552:

onSuccess: (_data, variables) => {
    analytics.documentsBulkDeleted({ count: variables.documentIds.length })
    toast.success(
        `${variables.documentIds.length} document${variables.documentIds.length === 1 ? "" : "s"} deleted`,
    )
    queryClient.invalidateQueries({ queryKey: ["documents-with-memories"] })
},

The onClose?.() call is correctly not present in bulkDeleteMutation, unlike the single deleteMutation which still calls it (appropriate for that use case). The fix has already been applied.

Score: 9/10

Well-implemented feature with proper:

  • Server-side validation (max 100 IDs)
  • Optimistic updates with rollback on error
  • Confirmation dialog before destructive action
  • Proper selection state management
  • Analytics tracking

Copy link

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview: Adds bulk delete functionality for documents in the nova app with selection mode UI.

Issues found:

  1. Bug (confirmed from Sentry): bulkDeleteMutation.onSuccess calls onClose?.() which resets the quick note draft unintentionally. Users with unsaved text in the quick note input will lose their draft when performing bulk delete. See inline comment for the fix.

Regarding build issues: The TypeScript errors in the type-check output are pre-existing in @supermemory/tools (test files) and unrelated to this PR's changes. The Cloudflare deployment failure appears to be infrastructure-related rather than a code issue in this PR.

Score: 8/10

Good implementation overall - the selection mode UI, optimistic updates, and confirmation dialog are well done. Just needs the one bug fix before merging.

Copy link
Member

can select & delete button can be at the right of dismiss?

​what do you mean @Prasanna721 i didn't get it

instead if pushing the layout down and showing the select all and delete button...

we can just use the space right of dismiss button to select all and delete​, we can use the real estate?

Copy link
Member

@Prasanna721 Prasanna721 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one question

everything else looks good

@graphite-app
Copy link

graphite-app bot commented Mar 10, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the 03-10-feat_bulk_delete_documents_in_nova_app branch from 03c92d4 to 84d0fb8 Compare March 10, 2026 15:29
@graphite-app graphite-app bot merged commit 84d0fb8 into main Mar 10, 2026
5 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants