Skip to content

Commit 68f8bbb

Browse files
committed
chore(changeset): declare the inline-lines hand lock as a widening
The new plugin-form export and the optional editFormLockedByState argument widen published surface: Clause-② yes (widening), patch, protocol none. Claude-Session: https://claude.ai/code/session_017xRBcSPkRxFWubkD5XfiDh Co-authored-by: Claude <noreply@anthropic.com>
1 parent 212babc commit 68f8bbb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎.changeset/38249-inline-lines-hand-lock-edit-state.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44

55
fix(app-shell): the record page greys Edit on a hand-locked document whose inline lines are locked too
66

7-
Clause-②: no
7+
Clause-②: yes (widening)
88
Metadata-protocol: none
99

1010
The record page's Edit was always live on an object whose field groups place an inline child collection, because the edit form still edited its lines. Now that a parent's whole-record hand lock (`uiReadonlyWhen`) locks those lines as well, Edit goes off with the state-lock reason when the lock holds over the record, every header field the form draws is read-only, and no field of any placed child object owns a hand lock that could open a line cell. Without a child object's definition, or when a child field declares a `uiReadonlyWhen` of its own, Edit stays live as before.
11+
12+
Additive: the exported `editFormLockedByState` takes an optional fourth argument, `childObjectDef` (a child object name to its served definition); callers that omit it behave as before.

‎.changeset/38249-inline-lines-hand-lock-form.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
fix(plugin-form): a parent's whole-record hand lock locks its inline master-detail lines in the edit form
66

7-
Clause-②: no
7+
Clause-②: yes (widening)
88
Metadata-protocol: none
99

1010
The master-detail edit form now reads the parent object's `uiReadonlyWhen` (the whole-record hand lock) over its lines too. While it holds over the parent record, a person adds, duplicates, removes or reorders no line, the per-row editor is not offered, and every line cell is locked unless its child field declares a hand lock of its own (`uiReadonly: true` or a `uiReadonlyWhen`), which then judges that cell instead — the same override the object level already reads. So a child field whose own `uiReadonlyWhen` is the constant `false` keeps that one cell editable on a confirmed order; `uiReadonly: false` is not such a declaration. A create is not judged. A fully configured entry (typed columns and the relationship field, so no child schema is read) has every line cell locked while the parent lock holds. REST, import, action and flow writes are unchanged: nothing on the server reads either key.

0 commit comments

Comments
 (0)