Repository navigation
fix(plugin-detail): related list with actions: [] no longer draws the built-in New - #26277
Conversation
… built-in New An authored `actions: []` on `record:related_list` is the author's choice of no actions on that list, the generic create form included. It holds per list, independent of the child object's userActions.create. Absent or non-empty `actions` keep New as before; row affordances unchanged. Claude-Session: https://claude.ai/code/session_01V5ckU1cUgQX9SC8V9TG3dh Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V5ckU1cUgQX9SC8V9TG3dh Co-authored-by: Claude <noreply@anthropic.com>
Contract reviewServed-tier: ① Derived judgments
② Contract declarations
③ Evidence
Implemented-by: card thread VERDICT: PASS Landing is held for the plugin-detail line: #26060 (in the merge queue), then #26055. After those, this branch merges |
…-pp8ksi # Conflicts: # scripts/sdui-manifest.sources/plugin-detail.json
Claude-Session: https://claude.ai/code/session_01V5ckU1cUgQX9SC8V9TG3dh Co-authored-by: Claude <noreply@anthropic.com>
… not a bare TS literal Claude-Session: https://claude.ai/code/session_01V5ckU1cUgQX9SC8V9TG3dh Co-authored-by: Claude <noreply@anthropic.com>
席位核对 · ACCEPT · seat
|
#26277 re-recorded scripts/sdui-manifest.sources/plugin-detail.json while the manifest's bytes stayed the same: one modify/delete conflict against this PR's deletion of the records, resolved by deleting it. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A6SEitNngAMugGbuJHWsDS
Requested by Steve · project thread
Fixes #26182
Clause-②: no
Metadata-protocol: semantic
What
record:related_listwith an authoredactions: []no longer draws the built-in New. The empty list is the author's choice of no actions on that list, and the generic create form is now part of "no actions". It holds per list, whatever the child object'suserActions.createsays.ui/packages/plugin-detail/src/renderers/record-related-list.tsx: a newcreateWithheldByAuthor(an authored array of length 0) withholdsonNewfromRelatedList. Absentactions, or a non-empty list, passes the host'sonCreateexactly as before.[]arm. The old text said the built-ins "stay the host's either way".RelatedListsection) documents the authoring move.Why the meaning changes (Metadata-protocol: semantic)
Before,
actions: []hid the list's authored and default actions while New stayed. A pinned case inRecordRelatedListRenderer.authoredActions-11163.test.tsxsaid so ("while New stays, because it is not an action id"). That pin was the implementer's reading, not the ruling: the ENFORCE ruling on #20665 (comment 5902374623) says "the authored list is what renders when it is present" and names the Salesforce shape, where New is one of the list's own buttons. The card's triage grade reads[]the same way: "An explicit empty list means no actions; absent keeps the defaults."The value
[]was already accepted, so no key is added or removed and the spec is untouched. What changes is what the value means, so this declaressemantic, and the changeset grades@object-ui/plugin-detailminor. The claim on the card carriedMetadata-protocol: none; the seat agreed to thesemanticdeclaration and will amend the claim.Producers measured at
3d50a43b: no in-repo page, example, platform page or synthesiser (buildDefaultPageSchema) authorsactions: []on arecord:related_list, so no shipped page loses New.Tests
At head
58a07ee6(the code commit is16f675b7;e7398539re-records the sdui source digest;58a07ee6mergesorigin/main):RecordRelatedListRenderer.authoredActions-11163.test.tsx: 15/15 passed. The old[]case is inverted (New absent though the host offers create). A new block pins the rule: CONTROL with noactionsdraws New and runs the host's create; a non-empty list keeps New;[]on one list leaves a sibling list of the same object with New.scripts/ablation-replace.mjs,onNew={createWithheldByAuthor ? undefined : handlers?.onCreate}back toonNew={handlers?.onCreate}): the two[]cases went red, 2 failed / 13 passed. Restore verified: blob equals HEAD,git diff HEADempty. The test imports the package source, so no build leg was needed.pnpm --dir ui exec vitest run --maxWorkers=2 packages/plugin-detail/: 304 files passed, 1 skipped; 2828 tests passed, 18 skipped. Exit 0.pnpm --filter @object-ui/plugin-detail type-check: exit 0.node scripts/gen-sdui-manifest-node.mjs: 1 of 27 package records re-recorded (plugin-detail);sdui.manifest.jsonunchanged.node scripts/check-sdui-manifest.mjsexit 0 after the main merge.node scripts/pm/dispatch-gates.mjs --commands: 47 derived families, all run, each exit 0;--ranreconciled 47/47 with exit codes recorded, 0 NOT-MEASURED.pnpm --dir ui run check:new-line-citations: 0 new citations.pnpm exec turbo run build --filter=@object-ui/console --concurrency=2: 71/71 tasks, exit 0.Acceptance notes
[]withholds New. A list that authors['renew']still draws New beside its authored action. That keeps every existing page that names actions unchanged, but a page cannot yet say "these actions and no New". This is noted, not filed.add(link existing) button are not governed byactions. The card asks only about New.describe()onRecordRelatedListProps.actions("Action IDs available for related records") is not changed here. The dispatch keeps this card ui-only, and the text is not wrong, only silent on New.origin/mainand re-records before landing.Generated by Claude Code