1909 Commits

Author SHA1 Message Date
Abhinav Raut 04c4dbab62 Merge pull request #479 from abhinavxd/speed-up-goreleaser
speed up releases with parallel goreleaser builds and fix windows bin name
v2.7.1
2026-08-12 02:59:42 +05:30
Abhinav Raut 73f00c33e4 Merge pull request #486 from abhinavxd/hide-ai-reply-btn-create-conversation
hide the ai generate reply button in the create conversation form
2026-08-12 01:53:12 +05:30
Abhinav Raut 2a6bc3f837 hide the ai generate reply button in the create conversation form 2026-08-12 01:45:43 +05:30
Abhinav Raut 69a6dbca81 Merge pull request #485 from abhinavxd/fix-attachment-filename-sanitization
preserve unicode in attachment filenames and escape MIME headers properly
2026-08-12 01:34:37 +05:30
Abhinav Raut e853cd39b4 preserve unicode in attachment filenames and escape MIME headers
properly

Fixes #483
2026-08-12 01:28:11 +05:30
Abhinav Raut 0cd9f972cf Merge pull request #484 from abhinavxd/dependabot/npm_and_yarn/frontend/postcss-8.5.23
build(deps-dev): bump postcss from 8.5.18 to 8.5.23 in /frontend
2026-08-12 00:34:02 +05:30
dependabot[bot] 4a7d6f50ba build(deps-dev): bump postcss from 8.5.18 to 8.5.23 in /frontend
Bumps [postcss](https://github.com/postcss/postcss) from 8.5.18 to 8.5.23.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.5.18...8.5.23)

---
updated-dependencies:
- dependency-name: postcss
  dependency-version: 8.5.23
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-11 18:46:52 +00:00
Abhinav Raut 9b6079688d Merge pull request #481 from abhinavxd/fix-create-conversation-external-user-id
fix create conversation API ignoring external_user_id for existing contacts
2026-08-12 00:15:34 +05:30
Abhinav Raut fad797263f add edge case tests for contact resolution 2026-08-11 16:42:06 +05:30
Abhinav Raut e4f628cd21 bump CI Go toolchain to 1.25.0 to match go.mod 2026-08-11 15:39:40 +05:30
Abhinav Raut adf6aa4270 fall back to email lookup on unknown external ID and let the form opt out of contact sync
Two contact resolution fixes in create conversation:

Under the reuse policy, an unknown external_user_id went straight to
insert. If the email belonged to an existing contact, that inserted a
duplicate contact sharing the email, since the unique email index only
covers rows without an ext_id. The ext_id lookup now falls back to the
email match before inserting. Regression test added.

The new conversation form sends name fields as a snapshot from contact
search, so a contacts:write agent submitting the form could overwrite a
contact that was renamed after the search. The form now sends
reuse_contact: true and the backend downgrades to the reuse policy when
it is set. API callers like an external CRM omit the flag and keep the
full sync/upsert behavior. The flag can only downgrade, never escalate.

Also from review: hoist the repeated password generation block into
newContactPassword, drop testutil.NewLogger and the duplicate
newTestI18n in transcript_test.go in favor of testutil.NewI18n, and
clean up stale comments.
2026-08-11 15:33:32 +05:30
Abhinav Raut b622fc3658 extract shared Postgres test harness into internal/testutil with a make test-db target 2026-08-11 14:40:48 +05:30
Abhinav Raut 1ffcee31b7 unify contact resolution into ResolveContact with an explicit policy and add integration tests 2026-08-11 13:34:44 +05:30
Abhinav Raut 246dd5ba00 scope external ID contact lookup to contacts only 2026-08-11 13:04:12 +05:30
Abhinav Raut f2b3bcd9b6 log enforce errors and skip password generation for existing contacts in create conversation 2026-08-11 13:00:05 +05:30
Abhinav Raut 00ec7ff934 send first message to the matched contact's stored email and pass external_user_id from the new conversation form 2026-08-11 12:21:08 +05:30
Abhinav Raut f986981b44 make no-permission contact resolution race-safe in create conversation API 2026-08-11 12:08:23 +05:30
Abhinav Raut 1112d5d0a8 tighten comment in create conversation contact handling 2026-08-11 11:56:13 +05:30
Abhinav Raut bb4fecca67 allow contact updates in create conversation API for callers with contacts:write 2026-08-11 11:53:01 +05:30
Abhinav Raut a097ca8536 fix create conversation API ignoring external_user_id for existing contacts 2026-08-11 11:36:11 +05:30
Abhinav Raut 4f9fbb9ee3 speed up releases with parallel goreleaser builds and fix windows .exe.exe binary name 2026-08-08 13:10:06 +05:30
Abhinav Raut 948ffd8cda Merge pull request #478 from abhinavxd/fix-ai-agent-otp-flow
fix AI agent OTP verification flow
v2.7.0
2026-08-08 12:46:38 +05:30
Abhinav Raut b3c162381a fix AI agent OTP verification flow
The verification tools and OTP prompt block loaded for every unverified
customer, so an assistant with no account-acting tools still asked people
for an email code it had no use for. The worker now checks the assistant's
tools first and skips both unless one is flagged requires_verification. A
lookup error fails open and keeps the flow.

The send tool's result did not say which address it mailed, so the model
filled one in from chat history. After a sibling conversation rebound the
contact's email, it named the old address while the mail went to the new
one. The result now names the address and mentions the spam folder.

The prompt did not say to check every code the customer sends, so after one
rejection the model declared the next code wrong without calling the tool
and handed off to a human.
2026-08-08 12:40:04 +05:30
Abhinav Raut b228e7bb07 Merge pull request #477 from abhinavxd/fix-automation-action-combobox-type
fix agent avatars showing in non-agent automation action dropdowns
2026-08-08 11:07:23 +05:30
Abhinav Raut 071190832b fix agent avatars showing in non-agent automation action dropdowns 2026-08-08 11:04:31 +05:30
Abhinav Raut d435af7d61 Merge pull request #441 from chahat-101/network-status-banner
show connection status banner to agents
2026-08-07 23:58:12 +05:30
Abhinav Raut 2552c8ef53 restyle connection banner as floating pill and fix focus reconnect 2026-08-07 23:57:25 +05:30
Abhinav Raut 64e74300cf Merge pull request #469 from abhinavxd/new-automations
New automations
2026-08-07 23:36:52 +05:30
Abhinav Raut 4710177ca0 skip disabled agents and blank emails in notify action 2026-08-07 22:52:21 +05:30
Abhinav Raut cb96d9f087 pass all previous values when claiming an unassigned conversation 2026-08-07 22:41:19 +05:30
Abhinav Raut 057d798fd7 add missing evaluator operator and field tests 2026-08-07 22:06:23 +05:30
Abhinav Raut ca7aad6a0a snapshot previous values before reopening conversation on incoming message 2026-08-07 21:37:41 +05:30
Abhinav Raut 49f287f843 add tests for automation loop guards 2026-08-07 21:33:24 +05:30
chahat-101 b5f414471c Use warning design tokens for connection banner 2026-08-07 21:17:15 +05:30
chahat-101 d180bfbedc Merge remote-tracking branch 'upstream/main' into network-status-banner 2026-08-07 20:57:38 +05:30
Abhinav Raut e67aa28baf suppress only automation's own events, not concurrent agent updates
Automation update events now carry the actor. A suppressed conversation drops only system-user events (the engine's own in-flight actions), so an agent updating the conversation during that window is evaluated instead of silently dropped. Autoassigner events still trigger automations since they arrive outside the suppress window.
2026-08-07 20:42:06 +05:30
Abhinav Raut 9f55a73674 Merge pull request #476 from abhinavxd/macro-usage-count
count macro usage for content-only macros
2026-08-07 20:21:33 +05:30
Abhinav Raut cc3f428008 count macro usage for content-only macros
Macros with no actions never hit the apply endpoint, so their usage count
stayed at zero. The frontend now calls apply whenever a macro was picked, and
drafts store the macro id so a macro survives switching conversations.
2026-08-07 19:53:46 +05:30
Abhinav Raut 51a7b95e17 Merge pull request #474 from abhinavxd/ai-request-timeout
raise request timeout to 120s for LLM-backed AI endpoints
2026-08-06 15:43:17 +05:30
Abhinav Raut c6961da6aa raise request timeout to 120s for LLM-backed AI endpoints 2026-08-06 15:38:27 +05:30
Abhinav Raut ae0b6ee9f2 rework notify action with subject, message and picked recipients
The notify action only created a fixed in-app notification and recipients
were typed as a raw team:<id> / user:<id> DSL where typos silently notified
nobody. Now:

- recipients are picked by name (assignee, assigned team, any team or agent)
- admin writes the subject and message; both show in the bell notification
  and go out as an email (message plus conversation link, wrapped in the
  default outgoing email template, so nothing is hardcoded in English)
- the action serializes as typed fields {subject, message, recipients}
  instead of a positional value array

Also: previous_* condition fields are hidden for time triggers and populated
on message events (previous = current) so those rules can actually match,
action row widths now follow the RuleBox pattern (fixed type select, value
widgets fill the row), and three new i18n keys merged into existing globals.
2026-08-06 02:38:38 +05:30
Abhinav Raut 89b40f9dac add compact webhooks endpoint and fix previous_* automation values 2026-08-06 00:17:13 +05:30
Abhinav Raut c4270f48d3 reject non-positive webhook IDs for targeted delivery
strconv.Atoi accepts "0" and negative values, and the delivery worker treats a
non-positive WebhookID as a fan out to every subscriber of the event. So a
malformed target value sent the conversation payload to unintended webhooks.
Reject it in the action and drop it in TriggerWebhook as well.
2026-08-05 22:55:09 +05:30
Abhinav Raut aa0deedd48 fix automation rule feedback loops and scope the starts with operator
An automation rule that listens on an event and then writes the same field
re-fires its own event, so the rule matches again and loops forever. Status
already returned early on a no-op write, but priority and user assignment did
not, so those two could spin a worker doing a DB write per lap. Add the same
unchanged-value guard to both.

Suppression while the engine applies actions was a plain flag in a sync.Map,
so with more than one worker on the same conversation the first one to finish
deleted the key while the other was still applying actions. Make it a refcount
so each worker releases only its own claim.

The starts with operator is only implemented by the automation evaluator, not
the SQL filter builder, so give automation text fields their own operator list
instead of adding it to the shared one.

Also switch the notify action to its own recipients field type, fix the snooze
duration hint since the backend only takes Go duration units, trim and
lowercase notify recipient entries, and treat a missing previous value as no
match rather than an empty string.
2026-08-05 18:01:20 +05:30
Abhinav Raut fa591deb7a add i18n keys for new automation actions 2026-08-05 16:16:03 +05:30
Abhinav Raut 2aa4a1a86e Merge branch 'main' into new-automations
# Conflicts:
#	i18n/da-DK.json
#	i18n/de-DE.json
#	i18n/es-ES.json
#	i18n/fa-IR.json
#	i18n/fr-FR.json
#	i18n/it-IT.json
#	i18n/ja-JP.json
#	i18n/mr-IN.json
#	i18n/pt-BR.json
#	internal/conversation/conversation.go
2026-08-05 16:14:06 +05:30
Abhinav Raut 178136cda5 add notify, snooze and trigger webhook automation actions 2026-08-05 16:12:55 +05:30
Abhinav Raut a482f0753f Update ROADMAP.md 2026-08-05 12:28:30 +05:30
Abhinav Raut 13168b006e Update ROADMAP.md 2026-08-05 12:28:23 +05:30
Abhinav Raut 67f885d21a Merge pull request #467 from abhinavxd/pr433-imap-junk-parts
PR-433
2026-08-05 12:25:07 +05:30