Repository navigation
fix(core): a list bulk Delete with refused records says why, not only "0 deleted, 4 failed" - #37809
Merged
Merged
Conversation
The bulk branch of recordDelete.run settled every delete, counted the rejections and toasted "N deleted, M failed", dropping each refusal's reason, which the one-record toast shows as its description. The summary keeps its counts; its description now lists the reasons: one line per distinct reason in the order handed in, led by the names of the records it refused (up to three, then +N), at most three reasons and then "And N more". An external datasource's refusal reads as the read-only sentence, as the one-record toast reads it. A refusal with no message adds no line, so a batch with no reason keeps the bare count. Two keys join every locale pack (no counted noun, so no plural family); the name/reason join is allowlisted as a format string. Claude-Session: https://claude.ai/code/session_01L6bhgUuauSMJu1nVSQRQri Co-authored-by: Claude <noreply@anthropic.com>
This was referenced Nov 27, 2026
Contributor
Author
|
repo:objectstack#2 · os-sales · session_01L6bhgV6i8jfWwSXjpWJrjA 席位核对 — ACCEPT · head e62ffc5 · card #37758 · area s2-ux · 2026-11-27T04:42ZL1 checklist
Tier: S. Landing: ready + auto-merge by this stroke. |
This was referenced Nov 27, 2026
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 #37758
A list bulk Delete whose records were refused said only 「成功 0 条,失败 4 条」 ("0 deleted, 4 failed"). The server gives every refused record a readable, localized reason (a restrict delete says which child records still reference it), and the one-record Delete shows it; the batch summary dropped it.
What changes
@object-ui/core(actions/recordDelete.ts). The bulk branch ofrunkeeps each rejected result's reason. The summary toast keeps its count title (objectActions.bulkDeletePartial) and gains a description:+N;The one-record toast is unchanged.
@object-ui/i18n. Two keys in all 11 packs:objectActions.bulkDeleteRefusedNamed({{names}}: {{reason}}, with each pack's own colon) andobjectActions.bulkDeleteMoreReasons. The name/reason join is allowlisted inuntranslated-identity-4376as a format string, asdetail.fieldChangeLabelis.@object-ui/plugin-view. The two keys joinObjectView'sobjectActions.*fallback table.Decisions made here
plural-categories-11432). The option ismore, notcount, so i18next does not go looking for one.\n, aswriteWarningToastandstudioSaveBardo. Each reason the server sends ends in its own punctuation.plugin-detailRelatedList.tsx,bulkDeleteOutcome) has the same count-only shape, and a view-declaredoperation: 'delete'bulk action (the card's "also seen") was not measured. Both are for the seat to file or fold.Verification
core/src/actions/__tests__/recordDelete.test.ts: 6 new or changed cases, red onmainand green here (6 red withrecordDelete.tsreverted): an all-refused batch for one reason (names,+1), a mixed batch (two reasons, order kept, the deleted record not named), nameless records (reason alone), five reasons (three listed, "And 2 more"), an external-datasource refusal (read-only sentence), and the existing partial-failure case now with its description. Controls: refusals with no message keep the bare count with no description; the one-record refusal toast is unchanged.plugin-viewObjectView.gridDelete-10383: the registered object-view bulk Delete's partial-failure pin now also asserts the refusal reason rides in the description.vitestovercore/src/actions, allplugin-viewtests,app-shelluseObjectActions*and all ofi18n(1,867 passed, including key parity, plural categories and the untranslated-identity gate): green.tsc -p tsconfig.test.jsonforcore: clean.eslinton the changed files: 0 errors.overlap-check: exit 0 (feat(spec,service-knowledge)!: knowledge_source is a governed metadata type with its loader, its registry and two authoring guards #37676 and refactor(spec)!: rename the Studio helper defineForm to defineMetadataForm and its modules to *.metadata-form.ts #37366 share the locale packs and merge cleanly).maincac93cc (the bulk branch reads no rejectedreason), and the red tests above.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