Skip to content

[FEATURE] Add Multi-Select Functionality to Document Manager #1086

@JoeMakuta

Description

@JoeMakuta

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

  • SurfSense Cloud (hosted version)
  • Self-hosted version
  • Both

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.tsremoveItems(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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions