[v4 beta] Include descendants in hierarchy delete confirmation counts
Maintainers usually reply within 1 day
@dharshni1518 is already working on this.
Since Oct 22, 2026.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- node.js, react, typescript
Research direction
Start with packages/ui/src/providers/DocumentSelection/index.tsx and packages/ui/src/elements/DeleteMany/index.tsx to trace how selected IDs reach the confirmation, then read packages/payload/src/hierarchy/hooks/collectionBeforeDelete.ts for cascade behavior. Check the single-document confirmation path and how Trash changes deletion behavior. Done means single and bulk confirmations report the unique total and descendant count using the server-side deletion rules, including when selected documents overlap.
Written by the indexing model from the issue text.
Description
Permanently deleting a hierarchy parent can also delete its children and deeper descendants. The Admin confirmation currently describes only the selected document, or the selected-document count for bulk deletion.
For example, selecting one parent with 12 descendants should warn that 13 documents will be permanently deleted. Showing only the parent or a count of 1 hides the full effect.
Cascade deletion is useful; its complete impact should be visible before confirmation.
Expected behavior
Show the total number of unique documents affected, including descendants at every depth:
Permanently delete 13 pages? This includes 1 selected page and 12 descendants.
This should:
- Cover single-document and bulk deletion from collection and hierarchy views.
- Count each document once when both a parent and its descendant are selected.
- Distinguish permanent deletion from moving documents to Trash.
- Distinguish deleted documents from related documents whose hierarchy reference is only cleared.
- Calculate the count server-side using the same selection and cascade rules as deletion.
Suggested reproduction
Use a collection with hierarchy: { parentFieldName: 'parent' }, a required text title field, and trash: false.
- Create
Parent → Child → Grandchild. - Open
Parentand choose Delete. Inspect the confirmation without confirming. - Repeat by selecting only
Parentin the hierarchy list and choosing Delete. - The confirmation should explain that 3 documents, including 2 descendants, will be deleted.
Source evidence
Inspected 4.0.0-beta.3; the same selection-count and cascade logic remains on main as of October 20, 2026.
- Single-document confirmations receive the selected document’s title without a descendant count.
DocumentSelectionsets the count toids.length, whichDeleteManydisplays.- The hierarchy deletion hook recursively deletes children afterward.
This report is based on source inspection. These steps have not yet been run in a local beta application.
- Dominant language
- TypeScript
- Stars
- 45.5k
- Forks
- 4.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 309
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from payloadcms/payload
-
Grid view: show the file placeholder when a thumbnail image fails to loadPossibly taken @lazerg claimed this today. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
payloadcms/payload#19181 ·
Maintainers usually reply within 1 day
-
WhereBuilder throws "Cannot read properties of undefined (reading 'value')" when the list URL filters on a field that is not filterablePossibly taken A pull request linked to this issue is open or already merged. OpenBug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
payloadcms/payload#19002 · 1 comment ·
Maintainers usually reply within 1 day
-
Regression: `findByID` with `disableErrors: true` throws `NotFound` for null/empty ids since 3.91.0Possibly taken @Krrishkumar125 claimed this 7 days ago. Openarea: core Bug invalid-reproduction status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
payloadcms/payload#18935 · 2 comments ·
Maintainers usually reply within 1 day
-
bug: Local API call with req resets req.fallbackLocale to defaultLocalePossibly taken A pull request linked to this issue is open or already merged. Openarea: core Bug created-by: Contributor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
payloadcms/payload#18768 ·
Maintainers usually reply within 1 day
-
[plugin-multi-tenant] Infinite redirect loop with custom tenantFieldName and isGlobal collectionsPossibly taken A pull request linked to this issue is open or already merged. OpenBug plugin: multi-tenant status: needs-triage v3
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
payloadcms/payload#18690 ·
Maintainers usually reply within 1 day
All issues in payloadcms/payload
Similar issues
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrorsPossibly taken @as992949791 claimed this today. Opengood first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
reticlehq/reticle#2033 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:quality p3-medium ready-for-agent type:docs
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
fderuiter/deruiter.dev#3589 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
marmelab/react-admin#11431 ·
Maintainers usually reply within 1 day