Skip to content

Commit cfb2df0

Browse files
committed
docs(spec): liveness note and changeset name the record-form stamp the picker resolves on
Co-authored-by: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ADHkmTKRu1t68jcJGgRYi3
1 parent 37512a4 commit cfb2df0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎.changeset/34197-lookup-record-reference.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ Metadata-protocol: none
1212
A `lookupFilters` entry may compare a candidate column with a value of the record being edited, written `{ $record: 'quote_date' }` or, one lookup hop away, `{ $record: 'account.cb_market' }`, and may add `orEmpty: true` so a candidate whose column is null also matches. The schema has accepted both since the previous release; the lookup picker now honours them.
1313

1414
- **The value.** Before the candidate query leaves the browser, the picker puts the value the reference names in its place: the quick-select popover, the table picker and the search-first people picker all send it. A one-hop path reads the lookup's target row once per id, its hop fields alone, unless the record already holds that row expanded. The query waits for that read and goes out once, with the value in it.
15-
- **An empty value.** While the referenced value is empty (null, unset, an empty string, or an unset hop lookup), the entry is left out, the rule an unset `dependsOn` parent follows. A picker given no record leaves every `{ $record }` entry out. A reference that was never resolved is never sent.
15+
- **An empty value.** While the referenced value is empty (null, unset, an empty string, or an unset hop lookup), the entry is left out, the rule an unset `dependsOn` parent follows. A reference that was never resolved is never sent.
1616
- **Re-query.** Changing a referenced field re-queries the open picker once, with the new value. Changing any other field of the record does not.
1717
- **orEmpty.** An entry with `orEmpty: true` is sent as an `$or` of its comparison and a null match on the same column. Several such entries each keep their own alternative.
18-
- **Record forms.** `ObjectForm` and authored form sections name, on such a lookup, the object each hop's lookup points at (`withRecordHopObjects`, exported from `@object-ui/fields`), so the picker can read the hop for the id the form holds.
18+
- **Record forms opt in.** `ObjectForm` and authored form sections stamp such a lookup as drawn for a single record being edited, naming the object each hop's lookup points at (`withRecordBeingEdited`, exported from `@object-ui/fields`). The picker resolves `{ $record }` only on that stamp. Any other host, such as a bulk action dialog that hands the widget its sibling parameters, leaves every `{ $record }` entry out.
1919
- **Spec.** The `value`, `orEmpty` and `lookupFilters` describes on `FieldSchema` lose their `[PLANNED — not enforced]` markers and say what the picker does. The no-record example now names a bulk action over selected rows in place of a filter panel, which reads no `lookupFilters`.
2020

2121
Literal entries and `dependsOn` query exactly as before.

‎packages/spec/liveness/field.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@
382382
"lookupFilters": {
383383
"status": "live",
384384
"verifiedAt": "2026-10-16",
385-
"note": "objectui LookupField + RecordPickerDialog — base scoping filters honoured by BOTH popover and dialog; structured supported form of referenceFilters. The picker reads it camelCase-only at objectui @daeb77fc84: packages/fields/src/widgets/LookupField.tsx#lookupFilters. Outside the picker, two readers keep a snake leg behind the declared key: objectui @daeb77fc84: packages/fields/src/resolveActionParams.ts#resolveActionParam reads `lookupFilters ?? lookup_filters` when it builds a lookup action param, and objectui @daeb77fc84: packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx#readLookupFilters reads `lookupFilters ?? lookup_filters` from a stored document. `{ $record: \"path\" }` values and `orEmpty` (#34009, declared 2026-11-15) are read since #34197: ui/packages/fields/src/widgets/lookupRecordReference.ts#resolveLookupFilters puts the value of the record being edited (the host's `dependentValues`; a one-hop path reads the lookup's target row, which a record form names through `withRecordHopObjects` in the same file) in place of each reference and leaves out an entry whose value is empty, before ui/packages/fields/src/widgets/LookupField.tsx#queryLookupFilters feeds the popover, the table picker and PeoplePicker; ui/packages/fields/src/widgets/RecordPickerDialog.tsx#lookupFiltersToRecord sends `orEmpty: true` as an `$or` with a `$null` match on the same column and leaves out any reference that was never resolved. An unresolved `$record` reaching the server is refused there (INVALID_FILTER), never answered."
385+
"note": "objectui LookupField + RecordPickerDialog — base scoping filters honoured by BOTH popover and dialog; structured supported form of referenceFilters. The picker reads it camelCase-only at objectui @daeb77fc84: packages/fields/src/widgets/LookupField.tsx#lookupFilters. Outside the picker, two readers keep a snake leg behind the declared key: objectui @daeb77fc84: packages/fields/src/resolveActionParams.ts#resolveActionParam reads `lookupFilters ?? lookup_filters` when it builds a lookup action param, and objectui @daeb77fc84: packages/app-shell/src/views/metadata-admin/inspectors/ObjectFieldInspector.tsx#readLookupFilters reads `lookupFilters ?? lookup_filters` from a stored document. `{ $record: \"path\" }` values and `orEmpty` (#34009, declared 2026-11-15) are read since #34197: ui/packages/fields/src/widgets/lookupRecordReference.ts#resolveLookupFilters puts the value of the record being edited in place of each reference, only on a field a record form stamped through `withRecordBeingEdited` in the same file (the host's `dependentValues`; a one-hop path reads the lookup's target row the stamp names; any other host leaves every reference out) and leaves out an entry whose value is empty, before ui/packages/fields/src/widgets/LookupField.tsx#queryLookupFilters feeds the popover, the table picker and PeoplePicker; ui/packages/fields/src/widgets/RecordPickerDialog.tsx#lookupFiltersToRecord sends `orEmpty: true` as an `$or` with a `$null` match on the same column and leaves out any reference that was never resolved. An unresolved `$record` reaching the server is refused there (INVALID_FILTER), never answered."
386386
},
387387
"dependsOn": {
388388
"status": "live",

0 commit comments

Comments
 (0)