feat(workflows): make trigger and step setup explicit - #6470
Conversation
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
|
AI-assisted fix under Taylor Ho’s accountability. Addressed both adversarial-review blockers at
Validation at exact head
A broader 36-test local smoke invocation had 31 passes and 5 pre-existing expectation/snapshot failures unrelated to these two paths; both changed regression tests passed in that invocation and again in isolated runs. |
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
|
AI-assisted follow-up under Taylor Ho’s accountability. Resolved the stale editor-validity finding at Regression coverage exercises invalid Form ID → YAML correction → enabled submit → Form reparse with the stale value absent. Validation at exact clean head
|
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz>
Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz> Signed-off-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz>
Category: new-feature
User Impact: Workflow authors can build filtered, runtime-aware automations, understand them at a glance, and get a clear warning before turning on workflows likely to run often.
Problem: Workflow setup exposed raw configuration without enough help composing message templates, filtering triggers, or understanding saved behavior; activation could also make a broadly triggered workflow live without explaining its likely frequency.
Solution: Batch 3 adds local, deterministic template variables, trigger filters, and semantic summaries, then refines cards and activation around configured behavior and a risk-aware warning boundary. Scheduling remains the already-shipped implementation, advanced expressions remain lossless, and network-backed identity/message enrichment stays in Batch 4.
send_message.text.Changes
File changes
desktop/src/features/workflows/ui/WorkflowActionsMenu.tsx
Separates direct card status controls from secondary actions while retaining modal status actions.
desktop/src/features/workflows/ui/WorkflowCard.tsx
Adds semantic behavior, channel-first hierarchy, configured reaction/action visuals, real subsequent-step stacks, status controls, and reduced-motion-aware trigger feedback.
desktop/src/features/workflows/ui/WorkflowDialog.tsx
Warns before activating broadly triggered workflows while allowing narrowly scoped workflows to proceed directly.
desktop/src/features/workflows/ui/WorkflowFormBuilder.tsx
Connects structured trigger filters and template-aware step inputs while preserving schedules, trigger transitions, and selected YAML authority.
desktop/src/features/workflows/ui/WorkflowStepCard.tsx
Replaces generic labels with deterministic configured-step descriptions.
desktop/src/features/workflows/ui/WorkflowTemplateTextarea.tsx
Adds caret-aware variable suggestions with keyboard navigation and focus restoration.
desktop/src/features/workflows/ui/WorkflowTriggerConditions.tsx
Adds structured local filters, validated author/message IDs, and a lossless advanced-expression fallback.
desktop/src/features/workflows/ui/workflowActivationWarning.ts and workflowActivationWarning.test.mjs
Classify broad message and frequent schedule triggers for contextual activation warnings.
desktop/src/features/workflows/ui/workflowConditionExpression.ts and workflowConditionExpression.test.mjs
Model and cover parsing, serialization, validation, and advanced-expression preservation.
desktop/src/features/workflows/ui/workflowDefinition.ts and workflowDefinition.test.mjs
Preserve trigger/step configuration and derive deterministic card metadata across YAML round trips.
desktop/src/features/workflows/ui/workflowStepDescription.ts and workflowStepDescription.test.mjs
Generate and cover local step summaries.
desktop/src/features/workflows/ui/workflowTemplateVariables.ts and workflowTemplateVariables.test.mjs
Define and cover trigger-specific, order-bounded variables and caret insertion.
desktop/src/features/workflows/ui/workflowTriggerDescription.ts and workflowTriggerDescription.test.mjs
Generate and cover semantic trigger summaries without network lookups.
desktop/tests/e2e/workflow-local-controls.spec.ts and snapshot
Cover filters, IDs, advanced expressions, autocomplete, activation choices, summaries, and YAML authority.
desktop/tests/e2e/workflow-reaction-picker.spec.ts
Covers configured reaction emoji in workflow nodes and summaries.
desktop/tests/e2e/workflows.spec.ts
Covers risk-aware activation warnings, direct safe creation, duplication, and card status controls.
Reproduction steps
{{trig; verify keyboard-selectable variables insert at the caret.Validation
Validated at exact clean head
cc26a53c466aa1621a842766153fc6ae94aa27aaon base24ec6a468ec9d0d425ee58fbfc4d416412c446ad.