Commit Graph

2602 Commits

Author SHA1 Message Date
Sivin Varghese
d0611cb7f2 feat: Improve CSAT responses (#11485)
# Pull Request Template

## Description

This PR introduces basic customization options for the CSAT survey:

* **Display Type**: Option to use star ratings instead of emojis.
* **Message Text**: Customize the survey message (up to 200 characters).
* **Survey Rules**: Send surveys based on labels — trigger when a
conversation has or doesn't have a specific label.

Fixes
https://linear.app/chatwoot/document/improve-csat-responses-a61cf30e054e

## Type of change

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

## How Has This Been Tested?

### Loom videos

**Website Channel (Widget)**

https://www.loom.com/share/7f47836cde7940ae9d17b7997d060a18?sid=aad2ad0a-140a-4a09-8829-e01fa2e102c5

**Email Channel (Survey link)**

https://www.loom.com/share/e92f4c4c0f73417ba300a25885e093ce?sid=4bb006f0-1c2a-4352-a232-8bf684e3d757

## 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
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
2025-05-16 14:18:52 +05:30
Sivin Varghese
6b767dbe94 fix: Duplicate attachments when navigating back to a conversation (#11472)
# Pull Request Template

## Description

Fixes
[CW-4330](https://linear.app/chatwoot/issue/CW-4330/bug-attachments-in-gallery-view-gets-duplicated-when-you-navigate-back)

**Cause**
When navigating back to a previously viewed conversation, attachments
were being duplicated in the Gallery View. This occurred because the
`SET_ALL_ATTACHMENTS` mutation was appending new attachments to existing
ones `(attachments.push(...data))` instead of replacing them. Each time
a user returned to a conversation, the attachment list would grow,
showing duplicate images.

**Solution**
Updated the `SET_ALL_ATTACHMENTS` mutation to replace the entire
attachments array instead of appending to it. This change ensures
attachments are cleared before adding new ones when returning to a
previously viewed conversation, preventing duplicates.

## Type of change

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

## How Has This Been Tested?

### Loom video

https://www.loom.com/share/b2472c07e95843f6879724b19ef89311?sid=eed42238-b4bc-4dbe-8ede-a25a13b4610d

## Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-05-14 15:40:11 -07:00
Sivin Varghese
696611ae63 feat: Add Teleport component to fix RTL/LTR utility classes (#11455)
# Pull Request Template

## Description

This PR introduces a `CustomTeleport` component that wraps Vue's
Teleport to preserve directionality context (ltr / rtl) when teleporting
content outside the app’s root container.

### Problem
Currently, the app sets the text direction (`[dir="ltr"]` or
`[dir="rtl"]`) on a container `div` inside `<body>`, not on `<body>`
itself. When content is teleported directly into `body`, it no longer
inherits the correct direction context. As a result, direction-aware
utility classes like `ltr:pl-2`, `rtl:ml-1`, etc., break because CSS
selectors like `[dir="ltr"] .ltr\:pl-2` no longer match. Identified this
issue when working on this
[PR](https://github.com/chatwoot/chatwoot/pull/11382)

### Solution
The `CustomTeleport` component automatically applies the correct `[dir]`
attribute (`ltr` or `rtl`) on the teleported content's wrapper based on
the current `isRTL` setting from the store. This ensures that
direction-specific Tailwind utility classes continue to work as
expected, even when the content is rendered outside the app root.

## Type of change

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


## 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
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Pranav <pranavrajs@gmail.com>
2025-05-12 11:49:23 -07:00
Sivin Varghese
1b45eb70c9 feat: Add scroll lock on chat list context menu (#11467)
# Pull Request Template

## Description

This PR uses `useScrollLock` from `VueUse` to lock scrolling on the chat
list panel when the context menu is open.

## Type of change

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

## How Has This Been Tested?

### Loom video

https://www.loom.com/share/68a25af2c1b149f8bd06bdbaafb4d82d?sid=0984fde6-ade2-405a-afc9-6d8f99480874


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-05-12 11:14:11 -07:00
Chatwoot Bot
142bae5fa4 chore: Update translations (#11458) 2025-05-10 19:21:34 -07:00
Pranav
61c5d751fc chore: Make the table of contents in help center sticky (#11448) 2025-05-09 08:44:44 +05:30
Shivam Mishra
4d684da288 fix: Update the copy for excluding the unattended conversations (#11450) 2025-05-08 20:08:12 -07:00
Shivam Mishra
6766b706c1 feat: Add support for typing events in webhooks (#11423)
Added support for typing events in webhooks. Two new events are now
available: `conversation_typing_on` and `conversation_typing_off`.


<img width="746" alt="Screenshot 2025-05-08 at 4 50 24 PM"
src="https://github.com/user-attachments/assets/62da7b38-de0f-42c5-84f4-066e653da331"
/>

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Pranav <pranavrajs@gmail.com>
2025-05-08 17:28:35 -07:00
Chatwoot Bot
823c3df27f chore: Update translations (#11432) 2025-05-08 15:45:53 -07:00
Sivin Varghese
94c58051f1 fix: Broken outline in account settings page (#11439) 2025-05-08 21:37:29 +05:30
Shivam Mishra
c87b2109a9 feat: allow auto resolve waiting option (#11436) 2025-05-08 12:52:17 +05:30
Shivam Mishra
1b23310e4b fix(ux): don't disable input for auto resolve (#11428) 2025-05-07 21:17:24 +05:30
Shivam Mishra
b533980880 feat: Add support for minutes in auto resolve feature (#11269)
### Summary

- Converts conversation auto-resolution duration from days to minutes
for more
granular control
- Updates validation to allow values from 10 minutes (minimum) to 999
days (maximum)
- Implements smart messaging to show appropriate time units in activity
messages

###  Changes

- Created migration to convert existing durations from days to minutes
(x1440)
- Updated conversation resolver to use minutes instead of days
- Added dynamic translation key selection based on duration value
- Updated related specs and documentation
- Added support for displaying durations in days, hours, or minutes
based on value

###  Test plan

- Verify account validation accepts new minute-based ranges
- Confirm existing account settings are correctly migrated
- Test auto-resolution works properly with minute values
- Ensure proper time unit display in activity messages

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-05-07 00:36:15 -07:00
Chatwoot Bot
e08436dde5 chore: Update translations (#11425) 2025-05-07 00:34:06 -07:00
Shivam Mishra
ea3ef9064b feat: handle rails turbo morphing (#11422)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-05-07 10:22:08 +05:30
Chatwoot Bot
c8daa6c1fe chore: Update translations (#11413)
Co-authored-by: Pranav <pranav@chatwoot.com>
2025-05-06 13:34:27 -07:00
Sivin Varghese
945fa5fd16 chore: Update message bubble orientation (#11348)
# Pull Request Template

## Description

This PR includes,

### Changes

1. **Message Orientation**:  
- Updated the bubble orientation of Bot, Agent, and Private Note
messages to align from **left** to **right**.

2. **Activity Message bubble Styling**:  
- Adjusted **padding** and **border-radius** for activity message
bubbles for better alignment and appearance.

| **Before**  | **After** |
| ------------- | ------------- |
| <img width="559" alt="image"
src="https://github.com/user-attachments/assets/18258ae0-0d8e-4447-a005-9b6643b71f81"
/> | <img width="559" alt="image"
src="https://github.com/user-attachments/assets/425785d8-17f9-4629-8301-f19f23aef201"
/> |




---


Fixes
[CW-4263](https://linear.app/chatwoot/issue/CW-4263/v410-messages-history-incoming-and-outgoing-renders-in-one-line),
https://github.com/chatwoot/chatwoot/issues/11340

## Type of change

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

## How Has This Been Tested?

### Loom video

https://www.loom.com/share/117bbb1dda98451883c9bb17f7cf016b?sid=05eae4d4-af11-4a41-a1d6-dc4e7e2cb281


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2025-05-06 13:21:52 +05:30
Sivin Varghese
6ced918549 feat: Update conversation basic filter (#11415)
# Pull Request Template

## Description

This PR updates the basic filter UI for conversations.

## Type of change

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

## How Has This Been Tested?

### Loom video

https://www.loom.com/share/df69a023a39c4dfca2c12b1ee42a0b2e?sid=977e802e-2865-46f1-ae8e-f89ab5eabc2a


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-05-06 12:44:23 +05:30
Pranav
cbdbf7900e fix: Update the character count for instructions (#11419)
- Increase the Captain instruction size to 20k instead of 2k
- Fix a display issue in the Captain playground and i18n issue in
Captain form.
2025-05-05 19:41:38 -07:00
Sivin Varghese
6b42305f59 fix: Show agent bot name and avatar correctly in messages (#11394)
This PR fixes an issue where messages from the agent bot were incorrectly displayed as "BOT" with a missing avatar. It now correctly shows the agent bot’s name and avatar URL in the message list.
2025-05-05 16:26:30 -07:00
Pranav
bfed849d6a fix: Fix missing translations in copilot (#11411)
This PR does the following:

- Missing translations to the i18n file.
- Test the change with Malayalam (ml) translation. 
- Fixes overflow by setting the width to 100%

_Note_: The prompt text is also set for translation. This is
intentional, there is no change in the behaviour.

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-05-04 18:06:24 -07:00
Chatwoot Bot
55316ea0a0 chore: Update translations (#11404) 2025-05-01 16:10:29 -07:00
Shivam Mishra
3630277d00 fix: Update flag from countries.js (#11401) 2025-05-01 09:03:36 -07:00
Chatwoot Bot
251abd02b0 chore: Update translations (#11400) 2025-04-30 15:34:11 -07:00
Pranav
fb6409508b feat: Allow customizing the responses, flows in Captain (#11385)
- Ability to provide custom instructions to captain

<img width="1107" alt="Screenshot 2025-04-28 at 6 11 43 PM"
src="https://github.com/user-attachments/assets/f94cbccc-b4d8-48fd-b6b9-55524129bc50"
/>
2025-04-29 15:42:15 -07:00
Shivam Mishra
59bae616cf feat: add UI for contact notes (#11358)
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-04-29 16:08:20 +05:30
Shivam Mishra
1a2e6dc4ee feat: integrate LeadSquared CRM (#11284) 2025-04-29 09:14:00 +05:30
Sivin Varghese
ef6949e32d fix: Hover issue with Linear issue popup (#11376) 2025-04-25 10:14:23 +05:30
Sivin Varghese
9194984091 fix: Alignment issue with logo in standard type bubble (#11364) 2025-04-24 21:57:52 +05:30
David Kubeš
ecc95478b9 feat: widget opened and closed events (#11240)
Fixes #9272

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-04-24 17:01:39 +05:30
Sivin Varghese
73f768e0bf fix: Handle slug validation errors in Help Center (#11368)
# Pull Request Template

## Description

This PR fixes an issue with slug validation in the Help Center portal
settings. Previously, users were able to create or update slugs with
invalid characters such as spaces, slashes, and special symbols, which
cause help center to crash.

With this update, slug creation and updates are now properly validated.
Only slugs that match the allowed pattern will be accepted. No spaces,
underscores, slashes, or special characters are allowed.

Examples: **user**, **user-guide**

---

Fixes
https://linear.app/chatwoot/issue/CW-4273/add-validation-for-help-centre-slugs

## Type of change

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

## How Has This Been Tested?

### Loom video

https://www.loom.com/share/a2ca5e2104984f28b29539293ffed33a?sid=e5064cb8-6220-4c43-99da-242c25d32027


## 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-04-24 16:58:05 +05:30
Muhsin Keloth
76bec9a3ff fix: Add missing 'hc' path segment after custom domain in article URLs (#11353) 2025-04-22 21:53:50 +05:30
Muhsin Keloth
e3bacd27d8 feat: Add custom domain to article URL if custom domain exists for the portal (#11349)
Portals can have custom domains. When inserting or previewing articles,
we consider the frontend URL. This PR fixes article URL generation to
properly include the portal's custom domain.
2025-04-22 20:54:09 +05:30
Sivin Varghese
9c711bab74 fix: Inconsistent widget bubble focus outline shape (#11345)
# Pull Request Template

## Description

This PR resolves the issue where the focus outline for the standard
bubble type appears as a square in Safari, while it appears circular in
Chrome.

Fixes
[CW-4252](https://linear.app/chatwoot/issue/CW-4252/v41-circle-around-campaign-pop-up-warped),
https://github.com/chatwoot/chatwoot/issues/11327

**Cause**
In Chrome, the focus outline for the standard bubble type is circular,
but in Safari, it appears square. This is due to a 20px margin on the
SVG inside the bubble.

**Solution**
The `20px` margin was removed from the SVG, fixing the focus outline to
appear circular in Safari browser.

## Type of change

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

## How Has This Been Tested?

### Loom Video

https://www.loom.com/share/cc4244f369f84b98afaef539b79abcfe?sid=e957df16-1a53-4349-8bdc-705b2ed82d45

### Screenshots
**Before** 

https://www.loom.com/share/e858417722c64df6801ea87e4b89779f?sid=81a0acec-c5f0-4daa-832c-1f23289e2352
<img width="100" alt="image"
src="https://github.com/user-attachments/assets/19c6b62c-96da-485b-9fe8-223065415369"
/>

**After**

https://www.loom.com/share/3946546382884a33a8fef89f81faf7c2?sid=feeaf18c-2b3d-4d4f-bcdf-70335b456dd1
<img width="100" alt="image"
src="https://github.com/user-attachments/assets/0e83d9e3-3153-47ef-9f2d-0a2f7270935c"
/>




## Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-04-21 16:53:52 -07:00
Muhsin Keloth
0a394e16ca chore: Audit message characters across all channels (#11343)
- Audited message characters across all channels.
- Replaced `isAInstagramChannel` with `isAnInstagramChannel`
2025-04-21 14:46:51 +05:30
Muhsin Keloth
1531772365 chore: Migrated Instagram inbox warning style issues (#11332)
**Before**
![CleanShot 2025-04-17 at 22 53
28@2x](https://github.com/user-attachments/assets/00841dd1-ca1f-47b3-9972-6c9100bd2291)

![CleanShot 2025-04-17 at 22 53
46@2x](https://github.com/user-attachments/assets/648a4770-3aea-4b84-9456-6941744a4d65)


**After**
![CleanShot 2025-04-17 at 22 50
40@2x](https://github.com/user-attachments/assets/d37250fd-5400-4548-82f4-ab0c3b417b3a)
![CleanShot 2025-04-17 at 22 50
47@2x](https://github.com/user-attachments/assets/ca611297-8dd0-4bd9-b6b6-02660c252aa9)

---------

Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
2025-04-21 14:17:39 +05:30
Sivin Varghese
c24a6dc74c fix: Prevent CC/BCC field reset on chat activity actions (#11342)
# Pull Request Template

## Description

This PR fixes the CC/BCC field reset issue on activity action.
Fixes
[CW-4256](https://linear.app/chatwoot/issue/CW-4256/emails-added-in-cc-and-bcc-disappears-when-you-click-on-assign-to-me),
#5234

### Cause of the Issue
Previously, the CC and BCC fields in the reply box were being reset
whenever a conversation activity occurred (such as assignment, status
change, etc.). This happened because watchers on the current chat
messages array and current chat object would trigger
`setCCAndToEmailsFromLastChat` even when the last message was an
activity or system message, not a real email.

### Solution

- The updated logic ensures that the CC and BCC fields are only set
under the following conditions:
   **1**. Switching to a new conversation.
**2**. In the same conversation, only if the last message is not an
activity (i.e., only for actual emails).

- It uses the `lastEmail` computed property, which filters out private
and activity messages, ensuring only real email context changes update
the fields.
- This prevents user-entered `CC/BCC` values from being cleared after
system events (e.g., assignments or status changes), while still
updating the fields correctly when relevant messages are received.

## Type of change

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

## How Has This Been Tested?

### Loom video
**Before**

https://www.loom.com/share/2ec50dd1c0ed4eaf9170465274bea41e?sid=cc8b88cb-fd39-473a-8df3-78a242c8407b

**After**

https://www.loom.com/share/17fd2d96d5d84a049dcbf20d401d2ada?sid=8949ad48-7769-49d2-92c5-267da8c60d6e



## 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
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-04-21 13:48:56 +05:30
Muhsin Keloth
97895db85e chore: Disable warnings old Instagram inbox for messenger conversations (#11329)
We have added warnings for existing Instagram messenger inboxes via
https://github.com/chatwoot/chatwoot/pull/11303. However, an issue arose
where warnings were incorrectly displaying for messenger conversations.
This PR resolves that issue.
2025-04-17 15:47:56 +05:30
Muhsin Keloth
ce55e80bb4 chore: Add the support for xml file in attachment (#11328)
# Pull Request Template

## Description

Please include a summary of the change and issue(s) fixed. Also, mention
relevant motivation, context, and any dependencies that this change
requires.
Fixes # (issue)

## Type of change

Please delete options that are not relevant.

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
- [ ] This change requires a documentation update

## 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.


## 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
2025-04-17 14:31:52 +05:30
Sojan Jose
49715ebf2b chore: deprecate report_v4 feature flag and remove gating logic (#11320)
- deprecated report_v4 feature flag
- remove the gating logic so new reports is available by default
- make search_with_gin an internal feature flag
2025-04-17 08:52:56 +05:30
Muhsin Keloth
0b156f6d4e fix: Handle Instagram text and attachments as separate messages (#11315)
When we send text with attachments on Instagram, Instagram treats text
and attachments as separate messages. However, Chatwoot keeps them as a
single message. Since Instagram sends echo events for each message, this
can create duplicate messages in Chatwoot. To prevent this, we will send
text and attachments as separate messages.

---------

Co-authored-by: Pranav <pranav@chatwoot.com>
2025-04-16 20:46:47 +05:30
Sojan Jose
630826baed feat: Implement UI for Agent Bots in settings and remove CSML support (#11276)
- Add agent bots management UI in settings with avatar upload
- Enable agent bot configuration for all inbox types
- Implement proper CRUD operations with webhook URL support
- Fix agent bots menu item visibility in settings sidebar
- Remove all CSML-related code and features
- Add migration to convert existing CSML bots to webhook bots
- Simplify agent bot model and services to focus on webhook bots
- Improve UI to differentiate between system bots and account bots

## Video 





https://github.com/user-attachments/assets/3f4edbb7-b758-468c-8dd6-a9537b983f7d

---------

Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
2025-04-16 18:02:49 +05:30
Sivin Varghese
72509f9e38 chore: Improve translation service with HTML and plain text support (#11305)
# Pull Request Template

## Description

This PR changes to translation to properly handle different content
types during translation.

### Changes

1. **Email translation with HTML support**
   - Properly detects and preserves HTML content from emails
   - Sets `mime_type` to 'text/html' when HTML content is present

2. **Email translation with plain text support**
   - Falls back to email text content when HTML is not available
- Sets `mime_type` to 'text/plain' when HTML is not available and
content type includes 'text/plain'

3. **Plain message with plain text support (Non email channels)**
   - Sets `mime_type` to 'text/plain' for non-email channels
- Fixes an issue where Markdown formatting was being lost due to
incorrect `mime_type`
   
**Note**: Translation for very long emails is not currently supported.

Fixes
https://linear.app/chatwoot/issue/CW-4244/translate-button-doesnt-work-in-email-channels

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)

## How Has This Been Tested?

**Loom video**

https://www.loom.com/share/8f8428ed2cfe415ea5cb6c547c070f00?sid=eab9fa11-05f8-4838-9181-334bee1023c4


## 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-04-16 17:59:06 +05:30
Muhsin Keloth
c6d4bc5632 fix: Old Instagram inbox warnings (#11318)
We have added warnings for existing Instagram messenger inboxes via
https://github.com/chatwoot/chatwoot/pull/11303. There is an issue with
finding the correct Instagram/messenger inbox. This PR will fixes that
issue.
2025-04-16 16:30:32 +05:30
Shivam Mishra
5c00880857 fix: email expand color (#11314)
#### Before

![CleanShot 2025-04-16 at 12 40
57@2x](https://github.com/user-attachments/assets/da3a9acc-c7a9-496f-96b7-74e02cb479f4)

![CleanShot 2025-04-16 at 12 42
00@2x](https://github.com/user-attachments/assets/55cf40aa-1867-4062-acee-7d95b7d4a0bc)


#### After

![CleanShot 2025-04-16 at 12 40
36@2x](https://github.com/user-attachments/assets/a8ec4b03-a501-4f56-be7a-bddf7912ba1b)

![CleanShot 2025-04-16 at 12 42
16@2x](https://github.com/user-attachments/assets/fe47f492-69ab-4a0c-8dd7-979485742d9b)
2025-04-16 13:13:07 +05:30
Sivin Varghese
4da92bbc12 chore: Update PDF file text color from ruby to slate (#11313)
# Pull Request Template

## Description

This PR includes updating the PDF text color from Ruby to Slate for
improved readability

## How Has This Been Tested?

### Screenshots
**Before**

| Dark Mode | Light Mode |
| ------------- | ------------- |
| <img width="258" alt="image"
src="https://github.com/user-attachments/assets/6124c69d-8bf1-47f3-9a06-eeb21dbedbb2"
/> | <img width="258" alt="image"
src="https://github.com/user-attachments/assets/d0f2b90b-6796-45ae-a02a-05c07246d25c"
/> |


**After**

| Dark Mode | Light Mode |
| ------------- | ------------- |
| <img width="258" alt="image"
src="https://github.com/user-attachments/assets/c0285062-83b6-49d5-bdb0-2aebf977cf74"
/> | <img width="258" alt="image"
src="https://github.com/user-attachments/assets/6b153d45-ee8d-42ac-a863-0fa8b294a21b"
/> |


## Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-04-16 13:05:36 +05:30
Muhsin Keloth
ad17887898 feat: Add warnings for existing instagram messenger channels (#11303) 2025-04-16 12:54:41 +05:30
Sivin Varghese
458bf1803e fix: Emoji rendering issue with <textarea/> in chrome (#11312)
# Pull Request Template

## Description

This PR resolves a Chrome-specific rendering bug where emojis in the
`<textarea>` of the reply box display a shadow or different color tone
when placed at the start of the input without a leading space.

**Solution:** Removed the border-radius from the textarea in the Reply
box component, which resolves the rendering issue in Chrome

**Cause:** This appears to be a Chrome rendering bug related to how
border-radius is handled on form elements, especially with emojis. The
exact cause is unclear, but there is some known issue
[Chromium Issue 40333458](https://issues.chromium.org/issues/40333458)
[Related Chromium
Duplicates](https://issues.chromium.org/issues/40333458/dupes)

## Type of change

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

## How Has This Been Tested?

### Screen recording

**Before**


https://github.com/user-attachments/assets/618de129-5631-4c7c-ab0b-7188b83c6bf1

**After**


https://github.com/user-attachments/assets/bb3adcbe-e603-4792-a8fd-51501d284c78





## Checklist:

- [x] My code follows the style guidelines of this project
- [x] 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
- [x] My changes generate no new warnings
- [ ] 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
- [ ] Any dependent changes have been merged and published in downstream
modules
2025-04-16 12:21:28 +05:30
Shivam Mishra
1140ca7a78 fix: stale report value shown if summary fetch breaks (#11270)
This pull request includes several changes to better show the report
metrics fetching status on the dashboard. This also prevents showing
stale data in case fetching summary fails due to timeout or other issue

The most important changes include adding a new fetching status state to
the store called `summaryFetchingStatus`, updating the
`useReportMetrics` composable, and modifying the `ChartStats` component
to handle different fetching statuses.

#### Loading
![CleanShot 2025-04-09 at 13 49
35@2x](https://github.com/user-attachments/assets/575c9905-0bf7-4a6e-8709-026896dd95f8)

#### Finished
![CleanShot 2025-04-09 at 13 49
43@2x](https://github.com/user-attachments/assets/ef7f8cb3-ca34-4627-a954-ba23f156d2ff)

#### Failed
<img width="1512" alt="image"
src="https://github.com/user-attachments/assets/d521a785-9299-4e59-94dc-561a7a84377e"
/>

---------

Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
2025-04-15 20:18:06 +05:30
Sivin Varghese
79fc5bb555 fix: Display error message on empty response from Captain (#11302) 2025-04-15 13:20:06 +05:30