Commit Graph
5946 Commits
Author SHA1 Message Date
Shivam MishraandGitHub c440df9b18 Merge branch 'feat/rollup/2-report-data-source' into feat/rollup/3-rollup-read-path 2026-03-16 19:19:24 +05:30
Shivam MishraandGitHub 68da47753e Merge branch 'feat/rollup/1-model-write-path' into feat/rollup/2-report-data-source 2026-03-16 19:19:14 +05:30
Shivam Mishra d054a60a65 fix: spec flag name 2026-03-16 19:18:49 +05:30
Shivam Mishra 8b7def05dc fix: feature flag 2026-03-16 19:16:51 +05:30
Shivam MishraandGitHub f126230f73 Merge branch 'feat/rollup/2-report-data-source' into feat/rollup/3-rollup-read-path 2026-03-16 19:14:03 +05:30
Shivam MishraandGitHub e42b0be530 Merge branch 'feat/rollup/1-model-write-path' into feat/rollup/2-report-data-source 2026-03-16 19:13:55 +05:30
Shivam Mishra 33b3a56d4c fix: feature flag 2026-03-16 19:06:56 +05:30
Shivam Mishra 6693a4d6f7 fix: rollup 2026-03-16 19:05:45 +05:30
Shivam Mishra 69a44ccf4d refactor: wrap rollup action in a rescue block 2026-03-16 18:53:38 +05:30
Muhsin KelothandGitHub 95727bc608 Merge branch 'develop' into feat/rollup/1-model-write-path 2026-03-16 12:28:41 +04:00
a5c50354fc feat: trigger assignment on resolve (#13780)
## Description

When an agent resolves or snoozes a conversation, their capacity frees
up — but under Assignment V2, no new conversation was assigned until the
next event triggered the assignment job. This meant agents could sit
idle despite having queued conversations waiting. This change triggers
the AssignmentJob immediately on resolve/snooze so freed capacity is
utilized right away.

## Type of change

- [ ] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

- Enable auto assignment v2 on an inbox
- Create a conversation (gets auto-assigned to an available agent)
- Resolve the conversation
- Verify that another unassigned conversation in the inbox gets assigned
to the freed-up agent

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: tds-1 <tds-1@users.noreply.github.com>
2026-03-16 13:13:37 +05:30
a452ce9e84 feat(whatsapp): add webhook registration and status endpoints (#13551)
## Description

Adds webhook configuration management for WhatsApp Cloud API channels,
allowing administrators to check webhook status and register webhooks
directly from Chatwoot without accessing Meta Business Manager.

## Type of change

- [ ] New feature (non-breaking change which adds functionality)


## Screenshots

<img width="1130" height="676" alt="Screenshot 2026-03-05 at 7 04 18 PM"
src="https://github.com/user-attachments/assets/f5dcd9dd-8827-42c5-a52b-1024012703c2"
/>
<img width="1101" height="651" alt="Screenshot 2026-03-05 at 7 04 29 PM"
src="https://github.com/user-attachments/assets/e0bd59f9-2a90-4f24-87c0-b79f21e721ee"
/>



## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2026-03-16 12:48:16 +05:30
Shivam Mishra 2fab77d7c7 refactor: split large examples in backfill service spec 2026-03-16 12:45:26 +05:30
Shivam Mishra 7ad8011a1b style: fix ABC size 2026-03-16 12:39:52 +05:30
Shivam Mishra c83546e67a style: split specs 2026-03-16 12:37:47 +05:30
Shivam Mishra 1154f9ccb4 chore: remove prompt enable outside resuce 2026-03-16 12:31:45 +05:30
Shivam Mishra e7d5924ca1 feat: make the rollup backfill atomic 2026-03-16 12:26:38 +05:30
Shivam Mishra 89e53e24db fix: timezone offset parsing 2026-03-16 12:04:29 +05:30
Shivam MishraandGitHub 47ecd349cc Merge branch 'develop' into feat/rollup/1-model-write-path 2026-03-16 11:35:49 +05:30
Tanmay Deep SharmaandGitHub 28bf9fa5f9 fix: upgrade markdown-it to 14.1.1 to remediate CVE-2026-2327 (#13782)
## Linear tickets
-
https://linear.app/chatwoot/issue/CW-6607/vanta-remediate-medium-vulnerabilities-identified-in-packages-are
-
https://linear.app/chatwoot/issue/CW-6612/vanta-remediate-medium-vulnerabilities-identified-in-packages-are

## Description

Upgrades markdown-it from 13.0.2 to 14.1.1 to remediate CVE-2026-2327

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

- Sanity testing of golden flows via UI

## Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream
modules
2026-03-16 11:11:19 +05:30
Shivam MishraandGitHub 73a90f2841 feat: update bunny video support in HC (#13815)
Bunny Video has added a new URL player.mediadelivery.net, this PR adds
support for the new URL
2026-03-16 11:04:27 +05:30
Aakash BakhleandGitHub a90ffe6264 feat: Add force legacy auto-resolve flag (#13804)
# Pull Request Template

## Description

Add account setting and store_accessor for
`captain_force_legacy_auto_resolve`.
Enterprise job now skips LLM evaluation when this flag is true and falls
back to legacy time-based resolution. Add spec to cover the fallback.


## Type of change

We recently rolled out Captain deciding if a conversation is resolved or
not. While it is an improvement for majority of customers, some still
prefer the old way of auto-resolving based on inactivity. This PR adds a
check.

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration.

legacy_auto_resolve = true

<img width="1282" height="848" alt="CleanShot 2026-03-13 at 19 55 55@2x"
src="https://github.com/user-attachments/assets/dfdcc5d5-6d21-462b-87a6-a5e1b1290a8b"
/>


legacy_auto_resolve = false
<img width="1268" height="864" alt="CleanShot 2026-03-13 at 20 00 50@2x"
src="https://github.com/user-attachments/assets/f4719ec6-922a-4c3b-bc45-7b29eaced565"
/>



## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2026-03-13 15:04:58 -07:00
Shivam Mishra b8543c09fb refactor: unify backfill service to per-dimension query pattern
Replace the two-path aggregation (group-then-fan-out for standard events,
per-dimension for distinct-count) with a single per-dimension loop for both.
This removes the bug-prone fan-out logic and the conceptual split.

Strengthen specs to cover all three dimensions (account, agent, inbox),
assert total rollup row counts, and add distinct-count deduplication test.
2026-03-13 15:17:46 +05:30
Alexander UdovichenkoandGitHub 412b72db7c fix: Delete double hmac check (#12464)
## Description

When hmac identity check is enabled according to
[this](https://www.chatwoot.com/hc/user-guide/articles/1677587479-how-to-enable-identity-validation-in-chatwoot)
I found out, that it checked twice.

If `should_verify_hmac? -> true` then hmac checked in `before_action`
and we don't need to do it again later.

This perfomance related and PR fixes this.
2026-03-13 02:30:17 -07:00
Shivam MishraandGitHub e37e9fd814 Merge branch 'feat/rollup/2-report-data-source' into feat/rollup/3-rollup-read-path 2026-03-13 13:55:24 +05:30
Shivam MishraandGitHub e6161d2878 Merge branch 'feat/rollup/1-model-write-path' into feat/rollup/2-report-data-source 2026-03-13 13:55:18 +05:30
Shivam Mishra 4e2924538f fix: distinct counts in backfill 2026-03-13 13:48:45 +05:30
Shivam MishraandGitHub e71bda7112 Merge branch 'develop' into feat/rollup/1-model-write-path 2026-03-13 13:18:06 +05:30
Shivam Mishra 31e3e9c1ff chore: add comment 2026-03-13 13:17:49 +05:30
Aakash BakhleandGitHub 8aa49f69d2 fix: prefer system API key for completion service (#13799)
# Pull Request Template

## Description

Add an api_key override so internal conversation completions prefers
using the system API key and do not consume customer OpenAI credits.
## Type of change

Please delete options that are not relevant.

- [x] Bug fix (non-breaking change which fixes an issue)

## How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration.

specs and locally

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented on my code, particularly in hard-to-understand
areas
- [ ] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2026-03-13 13:10:10 +05:30
Shivam Mishra 10f1c23742 refactor: use the new registry 2026-03-13 12:46:12 +05:30
Shivam MishraandGitHub 3fd14942f1 Merge branch 'feat/rollup/2-report-data-source' into feat/rollup/3-rollup-read-path 2026-03-13 12:45:20 +05:30
Shivam Mishra 7661104262 refactor: better defaults for metric 2026-03-13 12:44:46 +05:30
Shivam Mishra 38b5402623 refactor: use report metric registry 2026-03-13 12:37:23 +05:30
Shivam MishraandGitHub 3dd29080b5 Merge branch 'feat/rollup/1-model-write-path' into feat/rollup/2-report-data-source 2026-03-13 12:36:23 +05:30
Shivam Mishra e56b4b2539 refactor: metric registry 2026-03-13 12:35:09 +05:30
Shivam MishraandGitHub 5ede10c6df Merge branch 'feat/rollup/1-model-write-path' into feat/rollup/2-report-data-source 2026-03-13 12:29:30 +05:30
Shivam Mishra 8a4c1ec07e chore: add comments 2026-03-13 12:24:21 +05:30
Shivam MishraandGitHub 550b408656 fix: restrict existing user sign-in to account members (#13793)
SAML sign-in now only links an existing user when that user already
belongs to the account that initiated SSO. New users can still be
created for SAML-enabled accounts, and invited members can continue to
sign in through their IdP, but SAML will no longer auto-attach an
unrelated existing user record during login.

**What changed**
- Added an account-membership check before SAML reuses an existing user
by email.
- Kept first-time SAML user creation unchanged for valid new users.
- Added builder and request specs covering the allowed and rejected
login paths.
2026-03-13 12:22:25 +05:30
Shivam Mishra ac7a02067e chore: flatten name 2026-03-13 12:15:55 +05:30
Shivam Mishra 2e591afaf6 fix: use IANA 2026-03-13 11:51:28 +05:30
Shivam Mishra 32e923dba0 feat: add rollup data source and route eligible reports through it 2026-03-13 11:02:12 +05:30
Shivam Mishra b824f8ba47 refactor: pass timezone param through report controllers 2026-03-13 10:59:43 +05:30
Shivam Mishra 57d40c373d refactor: route summary builders through DataSource 2026-03-13 10:59:25 +05:30
Shivam Mishra 3c5cd46d2e refactor: replace count and average timeseries builders with unified ReportBuilder 2026-03-13 10:58:57 +05:30
Shivam Mishra d34da0cbf8 feat: extract raw report queries into DataSource abstraction 2026-03-13 10:58:40 +05:30
Shivam Mishra 32b1e16e74 refactor: add timezone_name_from_params to TimezoneHelper 2026-03-13 10:55:32 +05:30
Shivam Mishra 7e14153784 feat: add rake tasks for rollup backfill and timezone setup 2026-03-13 10:55:19 +05:30
Shivam Mishra 914e70568f feat: add backfill service for historical rollup data 2026-03-13 10:55:10 +05:30
Shivam Mishra 13860b9163 feat: write rollups from reporting event listener 2026-03-13 10:54:43 +05:30