Repository navigation
fix(core, app-shell): the delete toast says the record went to the recycle bin; position Add holder leaves out holders - #39694
Conversation
…cycle bin; the position picker leaves out holders Part of the setup admin polish card, PR 3 (item 11 route C and the same-family position holders picker). Claude-Session: https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i Co-authored-by: Claude <noreply@anthropic.com>
…and the position picker that leaves out holders Claude-Session: https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i Co-authored-by: Claude <noreply@anthropic.com>
…r picker Claude-Session: https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i Co-authored-by: Claude <noreply@anthropic.com>
…xported surface stays the same Claude-Session: https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i Co-authored-by: Claude <noreply@anthropic.com>
…tup-admin-polish-3
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i Final head for review · 2026-12-04T14:01Z · zone ot-ai ·
|
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibxZ1DSpavkJARmHCQF 席位核对L1-c · PR #39694 · Verdict: ACCEPT. The zone lands this PR. It is Face. Checks: 45 success, 15 skipped, 0 failed or pending. Relation is
Item 11, route C, as settled in 7410294142.
Same-family carry-out from #39645.
This closes the finding that the settled reading named at |
|
repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i Landing · 2026-12-04T14:03Z · zone ot-ai · head
|
Requested by Tesla · project thread
Part of #39439 (PR 3 of the card: item 11 by route C, plus the same-family position holder picker. Items 1 and 5 stay with PR 2; the rest are decided or split on the card.)
repo:objectstack@os-tesla · os-tesla · session_01L9qibzbZZbDRcKrdCMMS2i
Clause-②: no
Metadata-protocol: none
维护者速读
What changes
Item 11, route C (settled record 7410394994; decision-thread reading 7410294142). The confirm question is not changed. After a one-record delete, the success toast now says the record went to the recycle bin when the delete's answer carries a recycle-bin entry id, for every caller:
deletedNamed/deleteSuccess, byte for byte (CONTROL)movedToRecycleBinNamed/movedToRecycleBin, no actionrecordDelete.run(the one core both the console list and theobject-viewrenderer call) and the record page's own delete call now passonRecycleBinEntryon EVERY one-record delete, not only when Undo can be offered. Authority: ruling 6629858351 (the toast is where a person learns of the bin), ADR-0148 D4, and the spec docblock onrecycleBinEntryId(absent means nothing was kept). No restore-until date: the answer carries none.ObjectStackAdapter.deletesendsclient.data.delete(resource, id, ifMatch ? { ifMatch } : undefined)whateveroptsholds;onRecycleBinEntryis only called after a successful answer that carries a non-emptyrecycleBinEntryId. So the HTTP request is byte-identical with or without the callback. The otherDataSource.deleteimplementations in the tree (ValueDataSource, the runner's mock, the types example) take two parameters and ignore a third argument.recordDelete.runstill callsdelete(objectName, id)per row and keeps its summary toast (pinned as a CONTROL).recordDelete.ts, souseObjectActions.tsis not edited.DetailView.tsx/ObjectView.tsxare not edited.recycledText, so the exported surface of@object-ui/coreis unchanged. Two keys are appended at the end ofobjectActionsin all eleven packs; the call sites carry theenvalue as their inline default (the call-site key gate checks they agree), so a host with no translations (the provider-lessObjectView) still reads English rather than a key.Position holders (same family as item 7 of #39645, now on main). Setup, position page, Add holder: the picker leaves out people who already hold the position (the same set
addHoldersalready skips), its title says holders are not listed, and when every member of the organization already holds it the picker stays shut and says so. Where no membership is judged, the filter is$ninover the holders; with no holder it staysundefined.Tests
New pins are top-level
describeblocks named for objectstack#39439 inside each component's existing harness file (root AGENTS.md: a new pin for a component with a shared harness file goes into that file):recordDelete.test.ts: no-restore caller asked for the entry and told about the bin with no Undo; restore caller same sentence plus Undo; nameless record; CONTROL no entry id keeps today's toast for both callers; CONTROL batch unchanged; provider-less English default.useObjectActions.deleteDialog-11695.test.tsx(real chain, shippedenandzh-Hanspacks): the two sentences differ; no-grant caller reads the new sentence with no Undo; grant holder reads it with Undo; CONTROL no entry keeps today's toast.RecordDetailView.deleteConfirmDialog-11001.test.tsx: the record page asks for the entry and reads the new sentence; CONTROL no entry keeps today's toast.PositionHoldersSection.confirmAndMembers-13337.test.tsx: holders left out with the new title; all-members-hold keeps the picker shut with the sentence; CONTROL no holder and no membership leaves the picker unfiltered.Existing pins that encoded the old behaviour, updated mechanically: one-record
deletecalls now carry{ onRecycleBinEntry }(core,useObjectActions, the record page, andplugin-view'sObjectView.gridDelete-10383andObjectView.refreshInPlace-10035); the two #30239 Undo pins expect the new sentence; the #13337 picker pins expect the holderu_1left out.Test runs (final head c4b1b11)
Ablation (one per changed behaviour, via scripts/ablation-replace.mjs; tests resolve the src through the vitest alias, so no build leg)
Acceptance notes
RecordDetailView.tsxrather than callingrecordDelete.run; this PR only changes its request and keeps its toast on the sharedsuccessToast.Verification
Read first, by risk:
ui/packages/core/src/actions/recordDelete.ts:successToast(the no-entry branch must stay byte-for-byte) andrun(the one-record delete now always passes the callback).ui/packages/app-shell/src/views/RecordDetailView.tsx: the header Delete'sdataSource.deletecall.ui/packages/app-shell/src/views/metadata-admin/PositionHoldersSection.tsx:openPicker.Two-minute check:
pnpm --dir ui exec vitest run packages/core/src/actions/__tests__/recordDelete.test.tsshows the(objectstack#39439)describe passing; in a running console, delete one business record as a user without the restore grant and the toast readsOBJECT "NAME" moved to the recycle bin(zh-Hans:OBJECT“NAME”已移入回收站).Local gates (dispatch-gates --commands, reconciled with --ran at c4b1b11)
Session: https://claude.ai/code/session_01L9qibzbZZbDRcKrdCMMS2i
🤖 Generated with Claude Code