Repository navigation
Description
Screenplay 4.81 lets a screen offer one action whose command depends on the selected item (Cratis/Screenplay#432):
action "Close"
when status == Open execute CloseTicket
when status == Pending execute CancelTicket
otherwise hidden
The first alternative whose condition holds decides; a condition on a missing or null field does not match; when none holds, the otherwise fallback runs (execute <Command>) or the action is hidden (otherwise hidden, also the default); with no item selected the action is hidden even when a fallback exists. Screenplay notes that running the selection needs renderer support.
Scene cannot express this today, so Stage refuses such screens (STAGE-SCENE-ACTION-001, Cratis/Stage#209):
CoreActionin Scene 4.2.0 (Source/JavaScript/react/core/ScreenplayCoreComponents.tsx) raises onecratis.scene.commandwith a single command and no selected item; no guarded-action component is registered incoreComponents.ts.InteractionBindingin Scene.Model 4.7.0 has an optional guard for an action sequence, not ordered first-match command selection or visibility;ExecuteCommandActioncarries only a command.
Needed in Scene: a core:guarded-action element (model and wire schema, React component, registry and package entry) with ordered alternatives of structured conditions plus command and input bindings, a selected-item binding from the screen or table, first-match evaluation where null or missing fields never match (also for inequality), an execute or hidden fallback with hidden as default, hiding when nothing is selected, and post-success navigation for the chosen command. Conformance specs in .NET and TypeScript.
Once it exists, Stage maps the syntax onto it and wires a command route and form for every alternative and the fallback.
Status
State: Done — Shipped in Scene v4.83.0 (PR #272, merge e0f199d).
Branch: studio-856-auto-merge (#272)
Scope: core:guarded-action (ordered first-match alternatives, selected item, hidden/execute fallback) plus first-match interaction branches; unblocks Stage#209. Planning first.
Plan: Add a core:guarded-action element using the property shape Stage already emits: an item binding, ordered alternatives (each a condition, a command and its arguments), a hidden or execute fallback, and post-success navigation. Add optional first-match alternatives/otherwise to InteractionBinding. C# and TypeScript evaluators share one fixture corpus; null and missing fields follow Screenplay 0029, and guards that cannot be evaluated fail closed. Additive minor release.
Delivered: Nothing yet.
Remaining: To be confirmed.
Follow-ups: None.
Activity
woksin commentedon Oct 9, 2026
Screenplay 4.99 (decision 0048) extends guarded actions to interactions:
on click,on double clickandon selecttake orderedwhenbranches, each selecting a whole action list, plusotherwise. No match means nothing runs.InteractionBindingneeds the same first-match alternatives ascore:guarded-action. Could the new element accept the shape Stage currently carries incore:actionproperties (alternatives,otherwise)?Until the Scene runtime evaluates them, Stage refuses guarded actions and guarded interactions at render and run time (
STAGE-SCENE-ACTION-001,STAGE-SCENE-INTERACTION-001; Cratis/Stage#267) instead of showing an always-visible button that sends no command (Cratis/Stage#209). Full support in Stage waits on this issue.github-actions commentedon Oct 26, 2026
Closed by release v4.83.0.