Repository navigation
fix(core): evaluate bare CEL predicates in evaluateCondition - #1788
Merged
Merged
Conversation
`evaluateCondition` delegated to `evaluate`, which only processes `${...}`
templates and returns any other string verbatim — so a bare predicate like
`record.status == "converted"` (what objectstack build emits for
disabled/visible/condition) coerced to `true`, making every bare-expression
predicate silently always-truthy.
Symptom: a param-collecting api action on the record header (CRM "Reassign
Lead") was treated as permanently disabled, so ActionRunner.execute bailed
before opening the param dialog. The page:header renderer was unaffected
because it uses evaluateExpression directly.
- evaluateCondition: treat a non-`${}` condition as a single expression via
evaluateExpression; keep the template path; preserve empty/undefined and
unparseable -> visible/enabled fallbacks.
- ActionRunner: evaluate the `disabled` gate (boolean/string/envelope) instead
of treating any object as truthy.
- plugin-grid RowActionMenu: unify the row-action predicate scope so `record.*`
and bare-field predicates resolve identically on every surface.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
✅ Console Performance Budget
📦 Bundle Size Report
Size Limits
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ExpressionEvaluator.evaluateConditiondelegated toevaluate, which onlyprocesses
\${...}templates and returns any other string verbatim. A barepredicate like
record.status == "converted"(the shapeobjectstack buildemits for
disabled/visible/condition) was therefore coerced to anon-empty string →
Boolean(...)→ alwaystrue. Every bare-expressionpredicate routed through
evaluateConditionwas silently always-truthy.Most visible symptom: a param-collecting
apiaction invoked from the recordheader (CRM "Reassign Lead") was treated as permanently
disabled, soActionRunner.executebailed before opening the param dialog. Thepage:headerrenderer was unaffected because it evaluates via
evaluateExpressiondirectly —which is exactly why this only reproduced on the header path.
Fix
evaluateConditionnow treats a non-\${}condition as a singleexpression (via
evaluateExpression), keeps the\${...}template path, andpreserves the
empty/undefined ⇒ visible/enabledandunparseable ⇒ visible/enabledfallbacks.ActionRunnerevaluates thedisabledgate (boolean / string /{dialect, source}envelope) instead of treating any object as truthy.plugin-gridRowActionMenuunifies the row-action predicate scope sorecord.*and bare-field predicates resolve identically on every surface.Verification
@object-ui/core+@object-ui/reactsuites green (3963 passed; thepreviously-asserted
useCondition(undefined) ⇒ truestill holds).dialog opens → custom "Lead reassigned." toast → Undo → "Change
undone."
Pairs with framework PR extending the CRM demo action to
record_header.🤖 Generated with Claude Code