wacrm/src
Arnas Donauskas efd72b131e
fix(automations): pick tags, agents & templates by name in the builder
The automation builder exposed several developer-facing fields that
made automations hard to configure from the UI (issue #216):

- Keyword Match parsed/trimmed on every keystroke, so typing a
  comma-separated, multi-word list like "SEO, search engine
  optimization" was impossible — the comma and trailing space were
  stripped immediately.
- Tag Added / Add Tag / Remove Tag asked for a raw tag_id.
- Assign Conversation → Specific agent asked for a raw agent_id.
- Send Template asked for a manually typed template name + language.

Changes:
- Keyword input keeps a local draft and only parses into the keywords
  array on blur / Enter, then re-displays the cleaned form.
- New tag / agent / template pickers select existing resources by name
  while still storing ids / names internally, so the stored config
  shape (and the engine/validation) is unchanged. Resources load once
  at the builder root and are shared via context.
- Tags & approved templates load from Supabase (RLS-scoped, matching
  the broadcast picker); members load from /api/account/members.
- Every picker falls back to its original raw input when its list is
  empty (fresh account / older deployment), so automations stay
  authorable. Saved-but-missing ids are preserved when editing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-08 13:21:44 +03:00
..
app fix(account-sharing): stamp account_id on flow and pipeline inserts (#210) 2026-06-05 16:06:47 +03:00
components fix(automations): pick tags, agents & templates by name in the builder 2026-06-08 13:21:44 +03:00
hooks fix(account-sharing): stamp account_id on account-scoped inserts (#205) 2026-06-05 10:20:54 +03:00
lib fix(automations): enforce tenant isolation on caller-supplied contactId 2026-06-01 23:36:37 +03:00
types feat(webhook,engines): account-scoped routing 2026-05-31 18:45:48 +03:00
middleware.ts Revert "feat(i18n): re-attempt next-intl with hardened artifact tracing" 2026-05-31 21:05:34 +03:00