From f7074a814c403b36b14bc639fab8012fa2fda04f Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 23 Aug 2026 04:52:32 +0000 Subject: [PATCH] docs(plugin-form): write the requiredWhen example in the row-predicate canon (#5738) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Phase 0 of the objectui#5330 row-predicate deprecation: stop TEACHING a spelling the Phase-1 warning (PR #5737) now flags. `packages/plugin-form/README.md` illustrated a field-level conditional rule as `requiredWhen: 'status == "scheduled"'` — the bare shorthand. The same README's own table two hundred lines up says these are "CEL predicates over the live record, evaluated by `@objectstack/formula` — the same engine and dialect the server enforces", and on that engine `buildScope({ record })` mounts exactly `['record']`: the bare root faults there with `Unknown variable: status`. `requiredWhen` is one of the two rules enforced client AND server, so this was not merely non-canonical — it was the one arm the server refuses outright, handed to authors as the example. Confirmed with the shipped oracle rather than a regex: the exported `detectNonCanonicalRowSpelling` reports `bare-shorthand → record.status` on the old text and reports nothing on the new, so this cannot disagree with the warning authors are seeing in the console. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01E7snar5mwF7qoXJazqKhys --- packages/plugin-form/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-form/README.md b/packages/plugin-form/README.md index 5d79d267a..0f29b28ab 100644 --- a/packages/plugin-form/README.md +++ b/packages/plugin-form/README.md @@ -306,7 +306,7 @@ at insert regardless of state, so the producer's guarantee covers the conditional claim exactly as it covers the unconditional one: ```ts -remind_at: Field.datetime({ requiredWhen: 'status == "scheduled"', defaultValue: 'NOW()' }), +remind_at: Field.datetime({ requiredWhen: 'record.status == "scheduled"', defaultValue: 'NOW()' }), ``` | Mode | Declared | Left empty | Effect |