Feature Description
Add multi-select capability to the Document Manager so users can select multiple documents at once —
using Shift+Click for range selection or individual checkboxes — and perform bulk actions (delete,
move to folder) on all selected documents simultaneously. Selected documents are clearly highlighted
with visual feedback and a contextual bulk action toolbar appears above the list.
Target Deployment
Problem Statement
Currently, every document action (delete, move) must be performed one document at a time. In search
spaces with tens or hundreds of documents this is extremely tedious. Cleaning up a large batch of
stale web captures, or reorganising documents into folders, requires repetitive manual interaction
with each document's dropdown menu — with no way to act on a group at once.
Proposed Solution
Overview
Introduce a dedicated selection mode in the Document Manager that is independent of the existing
chat-mention checkbox (mentionedDocIds). When one or more documents are selected a bulk action
toolbar appears at the top of the list exposing delete and move-to-folder actions.
1. Files to Modify
State (atoms)
surfsense_web/atoms/documents/ui.atoms.ts — add new atoms for multi-select state
Hooks
surfsense_web/hooks/use-documents.ts — removeItems(ids) already exists; expose it to the
bulk delete callback
Document Manager table view
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx
— primary change surface; already has bulkDeleteDocuments, mentionedDocIds row highlighting,
and a bulkDeleteBar; extend to support an independent selection set with Shift+Click
Sidebar tree view
surfsense_web/components/documents/FolderTreeView.tsx — thread selectedDocIds/onToggleSelect
props analogously to the existing mentionedDocIds/onToggleChatMention flow
surfsense_web/components/documents/DocumentNode.tsx — render a second visual state (selection
highlight / check) independent of the isMentioned chat prop
Backend (new endpoint)
surfsense_backend/app/routes/documents_routes.py — add DELETE /api/v1/documents/bulk
Feature Description
Add multi-select capability to the Document Manager so users can select multiple documents at once —
using Shift+Click for range selection or individual checkboxes — and perform bulk actions (delete,
move to folder) on all selected documents simultaneously. Selected documents are clearly highlighted
with visual feedback and a contextual bulk action toolbar appears above the list.
Target Deployment
Problem Statement
Currently, every document action (delete, move) must be performed one document at a time. In search
spaces with tens or hundreds of documents this is extremely tedious. Cleaning up a large batch of
stale web captures, or reorganising documents into folders, requires repetitive manual interaction
with each document's dropdown menu — with no way to act on a group at once.
Proposed Solution
Overview
Introduce a dedicated selection mode in the Document Manager that is independent of the existing
chat-mention checkbox (
mentionedDocIds). When one or more documents are selected a bulk actiontoolbar appears at the top of the list exposing delete and move-to-folder actions.
1. Files to Modify
State (atoms)
surfsense_web/atoms/documents/ui.atoms.ts— add new atoms for multi-select stateHooks
surfsense_web/hooks/use-documents.ts—removeItems(ids)already exists; expose it to thebulk delete callback
Document Manager table view
surfsense_web/app/dashboard/[search_space_id]/documents/(manage)/components/DocumentsTableShell.tsx— primary change surface; already has
bulkDeleteDocuments,mentionedDocIdsrow highlighting,and a
bulkDeleteBar; extend to support an independent selection set with Shift+ClickSidebar tree view
surfsense_web/components/documents/FolderTreeView.tsx— threadselectedDocIds/onToggleSelectprops analogously to the existing
mentionedDocIds/onToggleChatMentionflowsurfsense_web/components/documents/DocumentNode.tsx— render a second visual state (selectionhighlight / check) independent of the
isMentionedchat propBackend (new endpoint)
surfsense_backend/app/routes/documents_routes.py— addDELETE /api/v1/documents/bulk