Repository navigation
Description
Overview
A play opens in the generic node viewer, which shows its title and none of its rules. ADR-090 gives play its own viewer: the play's rules as a read-only workflow (trigger → conditions → actions) with their authored descriptions, the play's state, its on/off switch, and an Edit button that opens a chat bound to the play.
Proposed Solution
A registered PlayNodeViewer for play, laid out as ADR-090 §2 specifies:
- Header: title,
description, state, the switch, and Edit. - Body: one lane per rule, in order.
- Data: read reactively from
SharedNodeStore, with no local copy and no model calls.
The switch writes enabled through the typed play update, and shows the ADR-060 §8 warning for seeded plays with an invariant rule.
The derived isSeeded field is added to the PlayNode wire type, because the warning needs it. Today _seed is stripped from the wire (nodespace-types/src/convert.rs asserts it).
Edit calls the bound-chat creation from #3520. Until that lands, it is hidden.
Documentation
- ADR-090 §2: what the viewer shows, what is editable, data flow,
isSeeded - Playbook System — Viewing and Editing a Play and Play Node (the wire shape,
isSeeded) - ADR-060 §8: the seeded-play warning, in concrete terms
- ADR-087: the switch is
enabled, neverlifecycle_status - ADR-049 and Frontend Architecture — Page-Level Viewer Data Pattern: read the store, no copies, no state-syncing effects
- Component Architecture:
*NodeViewernaming and plugin registration - Node Types — play: wire fields, including
isSeeded - Updates: none expected
Architecture Impact
Implements ADR-090 §2. No decision change.
Acceptance Criteria
-
PlayNodecarriesisSeeded(derived from_seed, read-only, never accepted byPlayNodeUpdate);bun run gen:typesoutput committed;node-types:checkpasses -
PlayNodeVieweris registered forplayin the plugin registry and opens for any play node - Header shows title,
description, and state:- on: enabled, not suspended;
- off:
enabled = false; - suspended:
suspendedAtset; showssuspendedMessageand the time
- The switch writes
enabledthrough the typed play update (updatePlayNode), neverlifecycleStatusor genericproperties; switching on a suspended play sendsenabled: true(the backend clears the suspension) - Switching off a play with
isSeededand aninvariantrule shows the ADR-060 §8 warning naming the rule's effect, and Cancel writes nothing - One lane per rule, in order:
- the trigger described from
on/select/property_keyorcron/select; - each condition's and each action's
description, with thefor_eachcollection named; - an
invariantmarker on invariant rules; - raw CEL and params shown on demand
- the trigger described from
- Nothing in the body is editable
- A
node:updatedfor the play (from the CLI, a chat, a sync, or an engine suspension) redraws the view with no reload (test drives an out-of-band update) - The viewer keeps no local
$statecopy of the play and writes no reactive state from$effect(ADR-049) - Tests: each state, the switch write payload, the seeded warning and cancel, trigger descriptions for each trigger kind, live redraw
-
bun run quality:fixclean;bun run test:changedpasses
Technical Specifications
Reference Files
- Wire conversion:
packages/nodespace-types/src/convert.rs(play_node_to_value; the_seedstripping assertion near the wire-contract tests) - Seeded detection:
packages/core/src/playbook/seeded.rs(is_seeded_play) - Typed update client:
packages/desktop-app/src/lib/services/shared-node-store.svelte.ts(TYPED_UPDATERS.play),backend-adapter.ts(updatePlayNode) - Viewer patterns:
packages/desktop-app/src/lib/components/viewers/query-node-viewer.svelte,task-node-viewer.svelte; registration inpackages/desktop-app/src/lib/plugins/core-plugins.ts - Generated types:
packages/desktop-app/src/lib/types/generated/play-node.ts,rule-definition.ts,trigger.ts,action.ts
Dependencies
- Require a description on every play rule, condition and action, and reject stale ones #3517 (the rule shape with descriptions)
Related Issues
- Add a 'Plays' navigation section: list plays with their state and open them (Labs Playbooks-gated) #3270 (the nav section opens plays here)
- Let a native chat pin a skill and a node, and open a play's Edit chat bound to it #3520 (Edit's bound chat)
Activity
malibio commentedon Oct 4, 2026
Baseline — Frontend: 312 test files, 5635 tests passed
Add PlayNodeViewer: a play's rules read-only, with its switch (closes #…