# Quick-action definition and lookup authority

Scope: L1 action definition assembly and visibility for creation prefills and
related-list filters. L0 owns resolved object/field permissions. L1 interprets
the action and projects those decisions; it does not recompute effective FLS.

## One definition before authorization

The object action component (`metadata.effective.object-action.v1`) owns shared
quick-action behavior. A layout places a reference with `name`, `label`, and
`type: QuickAction`. L1 resolves that reference from the same pinned Catalog view
used for object quickActions, before selecting permission resources. The returned
layout contains the resolved execution type, target and complete configuration.
Missing definitions and conflicting repeated behavior fail closed. A reference
cannot become inline navigation because its definition disappeared.

`resolvePageLayouts` is the shared assembly boundary for describe/layouts,
record UI and record defaults. Both headerActions and quickActions pass through
it. The official Opportunity layout now references AddProducts and no longer
copies a partial target/lookup/visibility definition. Existing installed layouts
that repeat a subset of a same-name non-Standard definition resolve through the
same boundary; every repeated configuration value must agree. No merge of
competing behavior and no process-local action registry is introduced.

Layout-owned inline actions without a shared definition retain their existing
contract. This is distinct from the explicit QuickAction reference, which must
resolve. Layout labels/icons and top-level placement visibility remain placement
facts. A conflicting execution type or target is not a presentation override.

Standard layout placements belong to the host/invocable Standard Action
namespace. They do not consume same-name UI action definitions: Quote's Standard
Accept placement and its UpdateStatus UI action are an existing example. An
explicit QuickAction reference to a Standard definition is rejected; use the
Standard placement and its execution owner's discovery/permissions instead.

The admin and Studio layout editors read the stored authoring document through
`useEditableLayout`, not the expanded record-layout projection. Their shared
codec preserves `kind: QuickAction`; unrelated edits use PRESERVE, and action
label edits or layout creation keep the reference and empty behavior config.
Both L0 storage conversion directions copy Kind/Type directly. The frontend
type declaration includes the stored reference, and the authoring round-trip
test loads the official placement and covers both header and quick surfaces.

## Operation follows behavior

`NavigateToRelatedList` alone does not imply creation. The official AddProducts
payload declares `productPicker.batchCreate`; its parent lookup is a creation
input. `quickActionCreatesTarget` resolves this requirement once, and both object
and lookup-field gates use it. New-record navigation and configured picker
creation require target Create plus a readable, intrinsically createable and
effectively createable lookup. Picker, batch, navigation and parent lookup targets
must agree. Conflicting targets are invalid for new-record navigation as well.

Ordinary related-list filters require Read, independently of names such as
EditProducts. The current frontend handler only navigates with that filter; it
does not edit records. The old EditProducts-specific object Edit gate is removed.
Standard Edit/Delete/Clone use the corresponding operation in one gate. The old
name-only prefilter incorrectly affected non-Standard actions named Edit/Delete/
Clone, and Standard Delete accidentally required both Delete and Edit.

## Why the earlier commits failed

- `16b58f21` changed every lookup write check from Edit to Create without first
  separating creation inputs from read-only filters.
- `63e76305` separated new-record navigation but treated every related-list
  action as read-only, missing the declared AddProducts batch creation.
- `2319e9c9` restored that one action by name, coupling permissions to a label-like
  identifier rather than its behavior.
- `89d3a46f` correctly consulted the creation payload, but only exercised the
  canonical quickActions input. The layout still supplied a partial independent
  copy, so that entrypoint lost the target Create gate.

The shared cause was incomplete producer-to-consumer coverage, compounded by
pre-existing duplicate action definitions. The fixes introduced real regressions;
the older architecture explains them but does not excuse them. The current tests
load both official source documents and run the shared Runtime layout assembly,
permission selection and authorization. They check complete returned configuration
against quickActions, allow and deny cases, both layout surfaces, installed legacy
placements, missing definitions, conflicts, renaming and Standard namespace
separation. The metadata contract test prevents a partial copy being reintroduced.

## Audit boundary and remaining owners

The current-tree audit covered the official UI action definitions, official and
assembled delivery layout placements, both L1 read paths, frontend action handlers,
and Standard Action placement/execution. The other CanCreate changes in this PR
are already in explicit creation contexts (Describe, ObjectInfo, New layouts,
record defaults and related-list creation); they do not share this mixed lookup
operation classification.

Two pre-existing issues remain separate from this delivery's claim:

- The NavigateToRelatedList frontend handler does not implement the declared
  productPicker/batchCreate behavior. Its owner is the L1 frontend action handler
  and picker/mapping integration. This PR preserves declared creation authority;
  it does not claim successful AddProducts database insertion or browser creation.
- Generic configuration/text reference extraction still tokenizes arbitrary
  strings and can confuse literals or same-named fields on different objects.
  Its owner spans L1 layout/action reference extraction and the expression grammar.
  Correcting it requires typed references with object scope and parsing expression
  syntax, plus literal/qualified-field tests. This PR does not claim that parser
  is corrected or that every possible action input's permissions are complete.

These are recorded limitations, not evidence that the current layout/quickActions
cutover has been verified end to end in a browser. Browser acceptance is paused
while the action regression is repaired and reviewed.
