Observation-class, measured while implementing objectui#6752. No behaviour is wrong; this is one question with several spellings.
The fact, measured on b76ca6764
"Is this value a real config bag (an object, not an array, not null)?" is asked in packages/react in five places, in four different spellings:
SchemaRenderer.tsx — the properties evaluation guard;
SchemaRenderer.tsx — propsWithoutCanonicalKeys, inline;
SchemaRenderer.tsx — the winningVisibilityKey caller block, inline;
utils/propsBagDiagnostic.ts — a private isConfigBag helper (objectui#6708);
utils/unevaluatedExpression.ts — the early return in scanBag (objectui#4795).
objectui#6752 unified 1 and 2 behind a single isConfigBag in SchemaRenderer.tsx, because it had to touch both. Sites 3, 4 and 5 were left alone deliberately: they live in other cards' modules, and merging them is a refactor across cards rather than that one's to make. The new helper's docblock says so rather than leaving it implied.
Why it is worth a line
This repo has repeatedly paid for one question having several spellings — hasDeclaredPredicate exists because "is a gate DECLARED?" had three (objectui#3842 / objectui#3849 / objectui#3850), and the SchemaRenderer comments name a "fourth dialect of one question" as the thing to avoid. The five sites agree today. The cost is that they can drift apart silently: each is a boolean expression whose disagreement produces no error, only a different answer on one channel.
Arms, if anyone takes it
- export one predicate (a small shared util in
packages/react/src) and have all five read it, with a pin that a new spelling fails;
- or decide the duplication is acceptable at this size and record why, so the next reader does not re-open it.
No behaviour change either way. Not urgent.
Related: objectui#6752 (where sites 1 and 2 were merged), objectui#6708, objectui#4795.
Observation-class, measured while implementing objectui#6752. No behaviour is wrong; this is one question with several spellings.
The fact, measured on
b76ca6764"Is this value a real config bag (an object, not an array, not null)?" is asked in
packages/reactin five places, in four different spellings:SchemaRenderer.tsx— thepropertiesevaluation guard;SchemaRenderer.tsx—propsWithoutCanonicalKeys, inline;SchemaRenderer.tsx— thewinningVisibilityKeycaller block, inline;utils/propsBagDiagnostic.ts— a privateisConfigBaghelper (objectui#6708);utils/unevaluatedExpression.ts— the early return inscanBag(objectui#4795).objectui#6752 unified 1 and 2 behind a single
isConfigBaginSchemaRenderer.tsx, because it had to touch both. Sites 3, 4 and 5 were left alone deliberately: they live in other cards' modules, and merging them is a refactor across cards rather than that one's to make. The new helper's docblock says so rather than leaving it implied.Why it is worth a line
This repo has repeatedly paid for one question having several spellings —
hasDeclaredPredicateexists because "is a gate DECLARED?" had three (objectui#3842 / objectui#3849 / objectui#3850), and theSchemaRenderercomments name a "fourth dialect of one question" as the thing to avoid. The five sites agree today. The cost is that they can drift apart silently: each is a boolean expression whose disagreement produces no error, only a different answer on one channel.Arms, if anyone takes it
packages/react/src) and have all five read it, with a pin that a new spelling fails;No behaviour change either way. Not urgent.
Related: objectui#6752 (where sites 1 and 2 were merged), objectui#6708, objectui#4795.