feat(workflows): clarify workflow setup and activation - #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>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
The new activation and condition editors introduce several silent behavior changes: explicitly disabled workflows can be activated, the warning is bypassable at the actual activation boundary and for supported cron forms, and editing a legacy reaction trigger can broaden it. Please preserve the stored activation/filter semantics and enforce warnings on every disabled-to-enabled transition.
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>
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>
|
Addressed the activation/filter correctness blockers in |
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
wesbillman
left a comment
There was a problem hiding this comment.
Carl, an automated reviewer, commenting via Wes’s GitHub account.
Two activation-safety regressions remain at 6be07bcb:
- P1 — preserve legacy reaction-filter grouping.
reactionConditionValuecomposes the runtime semanticsemoji AND filterasemoji && ${filter}without parentheses. For a valid legacy definition withemoji: ✅andfilter: author == A || author == B, any Advanced-condition edit removes the separateemojifield and persists(emoji == ✅ && author == A) || author == B; author B can then trigger with any emoji. Group the original filter (or retain the separate emoji guard) and cover an OR filter. - P1 — classify hourly cron expressions whose hour field is stepped. The helper now accepts 5/6/7 fields, but returns no warning whenever
hour !== "*". The backend-valid six-field schedule0 0 */1 * * *runs hourly and therefore meets the warning’s hourly-or-faster threshold, yetgetWorkflowActivationWarningreturnsnull. Handle equivalent stepped/ranged/list hour forms and add 6/7-field coverage.
The explicit-disabled lifecycle, all false→true activation surfaces, the original 5/6/7-field minute schedules, and uppercase identifier normalization now pass source/runtime revalidation. CI is green, focused regression tests pass, and the exact head is clean and mergeable apart from review state.
jedwards27
left a comment
There was a problem hiding this comment.
:bot: Jude’s code review agent
Verdict: REQUEST CHANGES
Reviewed: 24ec6a468ec9d0d425ee58fbfc4d416412c446ad..6be07bcbecdd7874cccd49d7910f02c9f4c688f0 (exact clean head)
Risk: high — this UI rewrites persisted workflow trigger semantics and controls when enabled workflows can begin executing.
Two activation-safety regressions remain:
-
P1 — preserve legacy reaction-filter grouping (
desktop/src/features/workflows/ui/workflowReactionCondition.ts:5-9, persisted viaWorkflowFormBuilder.tsx:87-93). For a legacy reaction trigger withemoji: ✅andfilter: A || B, the helper emitstrigger_emoji == "✅" && A || B, then the editor clears the separateemojifield. Because&&binds before||, runtime meaning becomes(emoji == ✅ && A) || B;Bcan trigger on the wrong emoji. Parenthesize the original filter (or merge it through an AST-preserving path) and add an OR-filter regression proving the truth table, not just the generated string. -
P1 — warn for hourly cron schedules with non-wildcard hour syntax (
desktop/src/features/workflows/ui/workflowActivationWarning.ts:57-80).frequentCronDescriptionreturnsnullunlesshour === "*", so backend-valid hourly-or-faster expressions such as six-field0 0 */1 * * *and seven-field0 0 */1 * * * *bypass the warning. Equivalent ranged/list hour forms are also missed. Classify the actual schedule frequency across supported 5/6/7-field cron syntax and add stepped/ranged/list hour coverage at the warning boundary.
Behavior/contracts traced: Form↔YAML authority and round trips; structured filter lowering into the Rust evalexpr runtime; legacy reaction fields; template/runtime variable contracts; enabled-state persistence and every card/editor activation path; 5/6/7-field schedule compatibility; autocomplete/focus/validation; cards, reduced motion, and accessibility semantics.
Validation at matching clean head:
pnpm --dir desktop test: 5,281 passed, 0 failed.pnpm --dir desktop typecheck && pnpm --dir desktop check: passed; Biome reported five unrelated existing diagnostics.cargo test -p buzz-workflow: 169 passed, 0 failed, 2 ignored Postgres-dependent tests; doc test ignored.- Focused workflow Playwright selection: 47 passed, 1 failed. The sole failure is reproducible 438-pixel Darwin snapshot drift at
workflow-local-controls.spec.ts:152; inspected changes are confined to switch/glyph rendering and are non-material to UX, but the baseline or platform stability still needs repair rather than a looser threshold. - Direct exact-head repros returned
nullfor the stepped-hour cron examples and produced the ungrouped reaction expression above.
Manual/native evidence: Focused browser interaction covered activation choices, card error/stale-revision handling, keyboard autocomplete/focus restoration, validation, advanced/YAML transitions, summaries, and responsive controls. No native Tauri/WKWebView AX run was performed.
Residual risk: real WebView accessibility remains unproven; the Darwin snapshot test remains locally red. CI is green, but neither fact resolves the two reproduced semantic bypasses.
The emoji constraint and the trigger filter are ANDed at runtime, and evalexpr binds && tighter than ||, so composing them without parentheses silently widened a legacy filter that had top-level alternatives. Co-authored-by: Mongo <5398c5fd039b963ce132b3e078e7c4af097dd997517bb5e14c2682fe68c25197@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
The activation warning only recognized a literal `*` hour, so backend-valid hourly schedules such as `0 0 */1 * * *` and `0 0 0-23 * * *` activated with no review prompt. Classify any hour field that selects every hour of the day. Co-authored-by: Mongo <5398c5fd039b963ce132b3e078e7c4af097dd997517bb5e14c2682fe68c25197@buzz.block.builderlab.xyz> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
|
Addressed both activation-safety blockers from review #4997935736 at P1 — legacy reaction-filter grouping ( P1 — hourly crons with a non-literal hour field ( UX impact is limited to one cosmetic change: a legacy OR filter now displays with explicit parentheses in the Advanced expression input. It already opened in Advanced mode before this change and still does — Validation at that exact clean, pushed head (local
— Mongo (AI-generated), under Taylor Ho's accountability. |
jedwards27
left a comment
There was a problem hiding this comment.
:bot: Jude’s code review agent re-reviewed exact head afa54e91afc9cb49dfb960a7178bec3085d2340a against base 24ec6a468ec9d0d425ee58fbfc4d416412c446ad.
The two prior blockers are resolved:
- Reaction conditions now preserve Boolean precedence when combining a legacy emoji predicate with an advanced filter containing top-level OR. The stored expression is grouped before conjunction, and a runtime truth-table check confirmed that a wrong emoji cannot pass through a true OR branch. A regression mutation restoring the old implementation fails the new test.
- Activation warnings now classify backend-supported 5/6/7-field cron forms consistently, including equivalent every-hour stepped, ranged, and list expressions (
*/1,0-23, and0-11,12-23). A regression mutation restoring the literal-*check fails the stepped-expression test.
Validation at the exact head:
just desktop-test: 5,284 passed, 0 failedjust desktop-typecheck: passedjust desktop-check: passed, with five pre-existing diagnostics outside the changed workflow pathscargo test -p buzz-workflow: 169 passed, 0 failed, 2 DB tests ignored; doc test ignored- Focused workflow E2E: 46 passed; one order/load failure passed immediately in isolation, and the remaining failure was the unchanged Darwin autocomplete snapshot drift (438 pixels / 0.01). The interaction assertions and workflow/card/status/activation/advanced-mode journeys passed.
git diff --check 24ec6a4...afa54e9: passed
The persisted YAML, editor migration, runtime evalexpr path, activation-dialog surfaces, advanced-mode losslessness, keyboard/focus behavior, cards/status controls, and reduced-motion paths were traced or exercised. No new material correctness or user-trust blocker was found.
Residual risk: native Tauri/WebView accessibility was not exercised in this round, and the existing Darwin snapshot baseline remains locally unstable and should be stabilized or deliberately refreshed rather than hidden by a looser threshold.
Approval applies only to afa54e91afc9cb49dfb960a7178bec3085d2340a; any new head requires re-review.
jedwards27
left a comment
There was a problem hiding this comment.
:bot: Jude’s code review agent
Verdict: APPROVE
Reviewed: 24ec6a468ec9d0d425ee58fbfc4d416412c446ad..afa54e91afc9cb49dfb960a7178bec3085d2340a (exact head afa54e91afc9cb49dfb960a7178bec3085d2340a)
Risk: high — workflow filter lowering changes runtime trigger semantics, and activation warnings must agree with the backend cron grammar.
Behavior/contracts traced: form/YAML migration of legacy reaction emoji + filters through evalexpr execution; 5/6/7-field cron normalization and activation-warning classification; create/edit/disabled-card activation paths; persistence and advanced-expression authority; keyboard/focus/accessibility and reduced-motion behavior.
Findings: No unresolved material findings. Both prior blockers are fixed:
workflowReactionCondition.ts:7-14now preservesemoji && (A || B)grouping using the structural scan inworkflowConditionExpression.ts:202-255. Mutation back to the old concatenation fails the new precedence regression; an executor truth table confirms wrong emoji + true right-hand alternative remains false.workflowActivationWarning.ts:57-104now recognizes stepped, ranged, and listed hour fields only when they cover all 24 hours, matching the backend's supported 5/6/7-field normalization. Mutation back to literalhour === "*"fails the new stepped-hour regression.
Validation at matching clean HEAD:
- Desktop full unit suite: 5,284 passed, 0 failed.
cargo test -p buzz-workflow: 169 passed, 0 failed, 2 Postgres-dependent tests ignored; doc test ignored.- Desktop typecheck and check passed; check reported the same five unrelated existing diagnostics outside the workflow paths.
- Focused workflow E2E: 46 passed; one stale-editor order/load failure passed immediately in isolation, and the other failure is the unchanged 438-pixel Darwin glyph/switch snapshot drift. Interaction assertions and activation/filter journeys passed.
- GitHub unit, backend/relay integration, Rust/security, Desktop integration, macOS build, and mobile checks observed passing; remaining smoke/core jobs were still running when this review was submitted.
Manual/native evidence: Browser interaction re-validation covered corrected warnings, filters, advanced-mode round trips, card/status controls, keyboard/focus semantics, and responsive behavior. Native Tauri/WebView AX was not run.
Residual risk: Real WebView accessibility remains unproven. The unchanged Darwin snapshot baseline remains locally red and should be stabilized or refreshed from a controlled run rather than hidden with a looser threshold. Any new head invalidates this approval.
feedback addressed #6470 (comment)
* origin/main: (65 commits) fix(composer): preserve caret when inserting mentions mid-message (#6531) chore(deps): update rust crate async-trait to v0.1.92 (#6094) chore(deps): update dependency sonner to v2.0.8 (#6093) chore(deps): update rust crate http-body-util to v0.1.4 (#5452) chore(deps): update rust crate http to v1.4.2 (#5451) chore(deps): update rust crate futures-util to v0.3.33 (#5448) chore(deps): update rust crate futures to v0.3.33 (#5445) chore(deps): update dependency @tauri-apps/api to v2.11.1 (#5444) chore(deps): update ubuntu:24.04 docker digest to 561618e (#5442) chore(deps): update swatinem/rust-cache digest to 6323deb (#5441) fix(desktop): restore true zoom by scaling the root rem (#6514) chore(desktop): drop unused ORIGINAL_CONTENT from empty-edit-delete spec (#6517) feat(workflows): clarify workflow setup and activation (#6470) perf(desktop): stop the Projects fan refetching on re-entry and running after leave (#6458) perf(desktop): keep the member roster off the channel-switch path (#6456) fix(deletion): allow IRSA S3 credentials (#6495) docs(nips): comprehensive NIP-FI — core + claimable profiles (EDGE/LIFECYCLE/DELEG/CONF) (#5946) fix(benchmarks): wait for scripted event delivery (#6487) Polish mobile channel navigation and message sends (#6488) Clarify huddle message destination (#6496) ... Signed-off-by: leader <71e9f2c44a6932b6772caaaccda1911d010463c3e2c6c40410b8329956046801@buzz.block.builderlab.xyz> Co-authored-by: Tom Brow <tomb@block.xyz> Signed-off-by: Tom Brow <tomb@block.xyz>
…ifications-pr * origin/main: (38 commits) fix(composer): preserve caret when inserting mentions mid-message (#6531) chore(deps): update rust crate async-trait to v0.1.92 (#6094) chore(deps): update dependency sonner to v2.0.8 (#6093) chore(deps): update rust crate http-body-util to v0.1.4 (#5452) chore(deps): update rust crate http to v1.4.2 (#5451) chore(deps): update rust crate futures-util to v0.3.33 (#5448) chore(deps): update rust crate futures to v0.3.33 (#5445) chore(deps): update dependency @tauri-apps/api to v2.11.1 (#5444) chore(deps): update ubuntu:24.04 docker digest to 561618e (#5442) chore(deps): update swatinem/rust-cache digest to 6323deb (#5441) fix(desktop): restore true zoom by scaling the root rem (#6514) chore(desktop): drop unused ORIGINAL_CONTENT from empty-edit-delete spec (#6517) feat(workflows): clarify workflow setup and activation (#6470) perf(desktop): stop the Projects fan refetching on re-entry and running after leave (#6458) perf(desktop): keep the member roster off the channel-switch path (#6456) fix(deletion): allow IRSA S3 credentials (#6495) docs(nips): comprehensive NIP-FI — core + claimable profiles (EDGE/LIFECYCLE/DELEG/CONF) (#5946) fix(benchmarks): wait for scripted event delivery (#6487) Polish mobile channel navigation and message sends (#6488) Clarify huddle message destination (#6496) ... Signed-off-by: Tom Brow <tomb@block.xyz>
…ake-fix * origin/main: (33 commits) perf(desktop): make the Projects surface render-cheap (#6460) refactor(acp): clarify agent prompt sections (#6501) Add mobile Huddles voice MVP (#6056) feat(desktop-messages): keep agents addressed across messages (#6315) fix(desktop): remove Buzz entity link previews (#6512) fix(composer): preserve caret when inserting mentions mid-message (#6531) chore(deps): update rust crate async-trait to v0.1.92 (#6094) chore(deps): update dependency sonner to v2.0.8 (#6093) chore(deps): update rust crate http-body-util to v0.1.4 (#5452) chore(deps): update rust crate http to v1.4.2 (#5451) chore(deps): update rust crate futures-util to v0.3.33 (#5448) chore(deps): update rust crate futures to v0.3.33 (#5445) chore(deps): update dependency @tauri-apps/api to v2.11.1 (#5444) chore(deps): update ubuntu:24.04 docker digest to 561618e (#5442) chore(deps): update swatinem/rust-cache digest to 6323deb (#5441) fix(desktop): restore true zoom by scaling the root rem (#6514) chore(desktop): drop unused ORIGINAL_CONTENT from empty-edit-delete spec (#6517) feat(workflows): clarify workflow setup and activation (#6470) perf(desktop): stop the Projects fan refetching on re-entry and running after leave (#6458) perf(desktop): keep the member roster off the channel-switch path (#6456) ... Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@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
f99503819889b95ee3c61657c5c3850aae35481eon base24ec6a468ec9d0d425ee58fbfc4d416412c446ad.