Repository navigation
Description
Description
Neither endpoint that populates Content Drive can be told to leave a set of folders out of its response. Adding that would let a folder with a long-running operation against it — a bulk delete, today — be hidden server-side, with rows and pagination staying consistent, instead of being filtered in the browser where they cannot.
What is missing today
| Endpoint | Backs | Parameters today | Exclusion? |
|---|---|---|---|
POST /api/v1/drive/search |
The Content Drive listing (DotContentDriveService.search → AbstractDriveRequestForm) |
assetPath, includeSystemHost, browseScope, language, contentTypes, baseTypes, workflow, mimeTypes, filters, offset/maxResults, sortBy, live, archived, status, showFolders, showLinks, cursors |
None |
GET /api/v1/folder/search |
The sidebar tree (DotFolderService.searchFolders → FolderResource, ~line 579) |
name, path, recursive, siteId, orderby, direction, page, per_page, includePermissions |
None |
The drive search takes a JSON body, so a list of paths costs nothing at the wire level. The folder search is a GET, so excluded paths have to ride as repeated or comma-joined query params — worth sizing, since the bulk-delete ceiling is 50 paths in a single run.
Why this belongs on the server, not in the client
- The drive listing paginates by cursor and carries no total count. Filtering it client-side is nearly free — the worst artifact is a page rendering 18 rows instead of 20.
- The sidebar tree is the opposite. Each level returns
totalEntries, andapplyLoadMoreToHierarchyuses it to decide whether to append a "Load more" node. Drop nodes in the client and that count lies: a level can offer "Load more" with nothing behind it, or silently look short with no way for the user to reach the rest.
Only the server can keep the rows and the counts telling the same story, which is the whole reason to raise this rather than filter in the store.
Motivating use case
Bulk folder delete (#37063). Today a folder with a delete in flight is marked busy but still listed — an approved decision (D-008 in specs/37063-bulk-folder-delete-frontend/spec.md). A proposal under discussion is to hide such folders from other users and after a reload, restoring them if the delete fails.
That presentation change reverses D-008 and FR-014/US2 and needs its own spec approval. This ticket is only the endpoint capability that would let it be built honestly; it does not commit anyone to the hiding behaviour.
Acceptance Criteria
- To be refined — quick draft, details to be added before scheduling.
-
POST /api/v1/drive/searchaccepts an optional list of folder paths to exclude from its response. -
GET /api/v1/folder/searchaccepts the same, in a form that survives a 50-path run without exceeding URL limits. - Exclusion is applied after permission filtering, so it can never widen what a user can see.
- Pagination reflects the exclusion —
totalEntriesand the cursor/hasMoreflags describe the rows actually returned.
Additional Context
Suggested shape: an optional excludePaths taking site-qualified folder paths (//site/folder/), on both endpoints.
Trap to record before implementing: getFolderHierarchyByPath pins the folder the user is currently inside to the top of its level, via resolveHierarchyAncestor, so the tree can show them where they are. An exclusion that removes that node leaves the tree with no path to the user's own location. Whatever shape this takes has to either leave that node alone or be paired with the rule that moves a user out of a folder that is going away.
Filed from a code review of the #37063 frontend work; every endpoint detail above was read from the current code rather than from documentation.
Metadata
Metadata
Assignees
Type
Projects
- StatusShow more project fieldsNew
Activity