fix(action): honor the spec disabled predicate on every action-rendering surface (#1885 follow-through) - #2863
Merged
Conversation
…ing surface (#1885 follow-through) Spec Action field is `disabled` (boolean | CEL, disabled when TRUE); the schema has no `enabled` key. #1885 wired action:button only. Browser dogfooding found five more surfaces where an authored `disabled` silently did nothing: - components: action:group leaves (inline + dropdown), action:icon, action:menu read the legacy non-spec `enabled` only. `disabled` is now primary (same evaluation scope as `visible`), `enabled` stays as a deprecated fallback. - app-shell: DeclaredActionsBar read neither; gains `disabled` (no legacy fallback -- declared actions are spec-shaped). - plugin-detail: record:quick_actions HAD a disabled implementation but its `typeof === 'string'` split dropped the {dialect:'cel', source} envelope the server compiles authored CEL into (#2661), so it never fired on real metadata. Now feeds toPredicateInput's result to useCondition whole. Pinned by new DropdownActionItem tests (4 cases); browser-verified against the showcase showcase_archive_task specimen: greyed on an in-progress task, clickable on a done one. Co-Authored-By: Claude Fable 5 <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.
Surfaced by the framework #1878 security-props recheck (the disposition doc's last OBJECTUI item), then widened by browser dogfooding. Companion showcase specimen: objectstack-ai/objectstack#3643.
Problem
The spec Action field is
disabled(boolean | CEL — disabled when TRUE); the schema has noenabledkey. #1885 (PR #1743) wired it inaction:buttononly. An AI authoringdisabled: 'record.status == "closed"'per spec got a fully clickable button on five other surfaces:action:groupinline leafenabledonlyaction:groupdropdown itemenabledonlyaction:iconenabledonlyaction:menuitemenabledonlyDeclaredActionsBardisabled={loading})record:quick_actionsdisabledimpl, but itstypeof === 'string'split dropped the{dialect:'cel', source}envelope the server compiles authored CEL into (#2661), so it never fired on real metadata — found live in the browser (disabled: falseon a record that should grey)Fix
All surfaces now follow the #1885 idiom: feed
toPredicateInput(action.disabled)touseConditionwhole (envelopes route to the canonical formula engine),disabledprimary, legacyenabledkept as a deprecated fallback where it previously worked (DeclaredActionsBargainsdisabledonly — declared actions are spec-shaped and never carried the non-spec key).Verification
DropdownActionItemtests: disabled-when-TRUE / false-stays-clickable / disabled-wins-over-enabled / boolean literal (8/8 in file).showcase_archive_taskspecimen (disabled: 'record.done != true', arriving as a CEL envelope): greyed on an in-progress task, clickable on a done one, withvisiblehiding Mark Done on the same screen (hide-vs-grey contrast).🤖 Generated with Claude Code