From 5d6ac154766b4625e7bb3a38e4244a2b528e4e28 Mon Sep 17 00:00:00 2001 From: Taylor Ho Date: Thu, 13 Aug 2026 23:45:01 -0700 Subject: [PATCH] Simplify workflow equality labels Signed-off-by: Taylor Ho --- .../workflows/ui/WorkflowConditionBuilder.tsx | 2 +- .../ui/workflowTriggerDescription.test.mjs | 16 ++++++++++++++++ .../workflows/ui/workflowTriggerDescription.ts | 4 ++-- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/desktop/src/features/workflows/ui/WorkflowConditionBuilder.tsx b/desktop/src/features/workflows/ui/WorkflowConditionBuilder.tsx index 92c1e4f6a..690cc7d1a 100644 --- a/desktop/src/features/workflows/ui/WorkflowConditionBuilder.tsx +++ b/desktop/src/features/workflows/ui/WorkflowConditionBuilder.tsx @@ -29,7 +29,7 @@ const OPERATOR_LABELS: Record = { not_contains: "does not contain", starts_with: "starts with", ends_with: "ends with", - equals: "is exactly", + equals: "is", not_equals: "is not", is_not_empty: "is not empty", is_empty: "is empty", diff --git a/desktop/src/features/workflows/ui/workflowTriggerDescription.test.mjs b/desktop/src/features/workflows/ui/workflowTriggerDescription.test.mjs index 7bbcd1849..93924a7de 100644 --- a/desktop/src/features/workflows/ui/workflowTriggerDescription.test.mjs +++ b/desktop/src/features/workflows/ui/workflowTriggerDescription.test.mjs @@ -23,6 +23,22 @@ test("describes selected trigger conditions on the workflow canvas", () => { "Message posted containing “deploy”", ); + assert.equal( + workflowTriggerDescription({ + on: "message_posted", + filter: 'trigger_text == "deploy"', + }), + "Message posted is “deploy”", + ); + + assert.equal( + workflowTriggerDescription({ + on: "message_posted", + filter: 'trigger_text != "deploy"', + }), + "Message posted is not “deploy”", + ); + assert.equal( workflowTriggerDescription({ on: "message_posted", diff --git a/desktop/src/features/workflows/ui/workflowTriggerDescription.ts b/desktop/src/features/workflows/ui/workflowTriggerDescription.ts index 7f932119c..2e4af84d5 100644 --- a/desktop/src/features/workflows/ui/workflowTriggerDescription.ts +++ b/desktop/src/features/workflows/ui/workflowTriggerDescription.ts @@ -45,9 +45,9 @@ function textConditionDescription( case "ends_with": return `${eventPhrase} ending with ${value}`; case "equals": - return `${eventPhrase} matching ${value}`; + return `${eventPhrase} is ${value}`; case "not_equals": - return `${eventPhrase} not matching ${value}`; + return `${eventPhrase} is not ${value}`; case "is_not_empty": return eventPhrase === "Message posted" ? "Text message posted"