wacrm/src
Arnas Donauskas ca3aa29c3a
fix(automations): persist default match_type for Keyword Match triggers
Creating a keyword_match automation with Match type left on the default
"Contains" failed activation with `match type must be "exact" or
"contains"` (path trigger.match_type). The dropdown showed "Contains"
via a display-only fallback, but the value was never written to the
config, so the saved payload omitted match_type entirely.

Both engines already treat a missing match_type as "contains"
(automations/engine.ts, flows/engine.ts), so the activation validator
was stricter than runtime. Two coordinated fixes:

- validate.ts: accept a missing match_type (defaults to "contains");
  only an explicit, unrecognised value is rejected. Aligns the
  validator with the engines and any non-UI client.
- automation-builder.tsx: seed match_type: "contains" on mount of
  KeywordMatchConfig so the displayed default is actually persisted,
  keeping the saved record explicit and self-describing.

Adds a regression test that a keyword_match config with no match_type
passes activation validation.

Fixes #271

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 10:20:38 +03:00
..
app feat(inbox): collapsible contact sidebar on desktop 2026-06-19 14:06:02 +03:00
components fix(automations): persist default match_type for Keyword Match triggers 2026-06-22 10:20:38 +03:00
hooks feat(inbox): graduate chat media send to GA (remove beta flag) 2026-06-18 11:38:54 +03:00
lib fix(automations): persist default match_type for Keyword Match triggers 2026-06-22 10:20:38 +03:00
types refactor(inbox): record voice notes client-side, drop server ffmpeg 2026-06-18 11:27:12 +03:00
middleware.ts Revert "feat(i18n): re-attempt next-intl with hardened artifact tracing" 2026-05-31 21:05:34 +03:00