Repository navigation
fix(plugin-detail): a related list's bulk delete with refused rows says why, not only how many - #37836
Merged
Conversation
…ys why The related list's bulk delete outcome kept only the two counts. Each refused row's reason (the ids a batch delete names, an error that refuses the whole batch, each rejected row delete) is now listed under the count, grouped by reason and led by the rows' names, by the list page's rule, which core exports as bulkDeleteRefusalLines. A batch that names no reason keeps the bare count. A view-declared operation: 'delete' bulk action was measured: its result panel already names each refused record and its reason; a pin holds that. Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri Co-authored-by: Claude <noreply@anthropic.com>
Contributor
Author
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head 35a5e9f · card #37816 · area s2-ux · 2026-11-27T06:40ZL1 checklist
Tier: S. Landing: ready + auto-merge by this stroke. |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sales · project thread
Fixes #37816
PR #37809 made the list page's bulk Delete say why records were refused. The related list on a record page has its own bulk delete, and its outcome line still gave only "2 deleted, 1 failed". The user could not tell which rows were refused or why.
Premise, measured
main,handleConfirmBulkDeleteinRelatedList.tsxkept{ succeeded, failed }only. When the batch call answered with named errors, they were dropped. A batch call that threw only went toconsole.error. A rejected row delete counted as one failure and nothing more.RelatedList.tab-35892.test.tsxpinned2 deleted, 1 failedfor a batch answer that namesq3with the reasonrefused.operation: 'delete'): does not hold. AbulkActionDefs[]entry withoperation: 'delete'does not go throughrecordDelete. It runs inBulkActionDialog, throughuseBulkExecutorandexecuteBulkBatch. That dialog's result panel already lists every refused record by its title, with its own reason (userMessage ?? error). This holds on the batch path (the ids the data source names, objectui#13442) and on the row-by-row fallback. A new pin on the realObjectGridmeasures both paths; it passes onmainunchanged. No fix is needed there.What changes
@object-ui/core:refusalSummaryis exported asbulkDeleteRefusalLines(deps, refused). It returns the lines: one per distinct reason, led by up to three row names and then+N, at most three reasons and then "And N more". An external-datasource refusal reads as the read-only sentence.refusalSummarynow joins these lines, so the list page's toast is byte-identical.errmay be the reason's text itself, because a batch call names each failed id's error as a string.@object-ui/plugin-detail(RelatedList):data-related-bulk-delete-reasons), inside the samerole="status"region. The count keeps its own<p>. A long reason wraps ([overflow-wrap:anywhere]).Decisions made here
mainthat path showed "0 deleted, N failed" with nothing else. Its error is the one answer the user has. The rows are named because the whole batch was refused.Verification
RelatedList.tab-35892.test.tsxgains three cases, and the existing partial-failure case reads the count's<p>:Quote 2, Quote 4: <restrict>andQuote 3: Record is locked, in input order.Quote 1, Quote 2: Service unavailableunder0 deleted, 2 failed.2 deleted, 1 failed, with no reason list.plugin-grid/src/__tests__/declaredBulkDeleteReasons-37816.test.tsx(2) is the item 2 measurement: batch path with named errors, and row by row.vitestover@object-ui/plugin-detail,@object-ui/i18n,core/src/actions, app-shell'sdefaults-maps-mirror-en-pack, and the new grid pin: 591 files, 6,679 passed. The corerecordDeletetests are unchanged and green.tsc -p tsconfig.test.jsonfor core, plugin-detail and plugin-grid: clean.eslinton the changed files: 0 errors.overlap-check: exit 0.Clause-②: no
Metadata-protocol: none
Skills-docs: none
Human Minimum
packages/specholds no runtime logic. (No spec change.)eslinton the changed files passes (the fullpnpm lintruns in CI).main, one pull request.Generated by Claude Code
🤖 Generated with Claude Code
https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri