iachat/app/javascript/dashboard/components/widgets/conversation
Sivin Varghese 0012fa2c35
fix: align message trimming with configured maxLength (#13947)
# Pull Request Template

## Description

This PR fixes 
1. Messages being trimmed to the default 1024 limit in `trimContent`
method, instead of channel-specific limits for drafts and AI tasks.
2. Telegram messages are allowed up to 10,000 characters in config, but
the API supports only 4096, causing failures for oversized messages.

Fixes
https://linear.app/chatwoot/issue/CW-6694/captain-ai-rewrite-tasks-truncate-draft-to-1024-chars-trimcontent
https://github.com/chatwoot/chatwoot/issues/13919

## 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/00e9d6b4d19247febf35dffa99da3805

**After**
https://www.loom.com/share/c4900e9effc345c79bcd8a5aa1ee277b


## 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
2026-03-31 10:39:54 +05:30
..
advancedFilterItems fix: Add Portuguese (Brazil) to CSAT template language options (#13343) 2026-01-22 15:59:24 +04:00
components chore: Replace Thumbnail with Avatar (#12119) 2025-08-11 15:47:17 +05:30
ContentTemplates feat: Add call-to-action template support for Twilio (#13179) 2026-01-06 10:38:36 +04:00
contextMenu feat: Allow removing labels via conversation context menu (#13525) 2026-02-17 13:30:55 +05:30
conversation fix: apply installation branding replacement in tooltip copy (#13538) 2026-02-13 16:47:25 -08:00
conversationBulkActions feat: Add natural language date parser for snooze functionality (#13587) 2026-03-06 12:20:22 +04:00
conversationCardComponents chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
copilot feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
EmptyState chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
helpers chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
linear chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
WhatsappTemplates refactor: Consolidate WhatsApp template components and improve naming (#12299) 2025-08-26 15:20:53 +05:30
CannedResponse.vue style: apply fixes for eslint issues [cw-3590] (#10210) 2024-10-03 15:02:12 +05:30
ConversationBasicFilter.vue feat: Add a priority + created at sort for conversations (#13658) 2026-02-25 18:22:41 -08:00
ConversationBox.vue fix: Adjust inbox settings pages layout width (#13590) 2026-02-20 20:20:32 +05:30
ConversationCard.vue chore(v5): update priority icons (#13905) 2026-03-26 09:20:36 +05:30
ConversationHeader.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
ConversationSidebar.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
CopilotEditorSection.vue chore: Hide reply-to when copilot is active (#13749) 2026-03-11 11:30:30 +05:30
EmailTranscriptModal.vue fix: show upgrade prompt when email transcript returns 402 (#13650) 2026-02-26 12:54:40 +05:30
FilterItem.vue chore: Update chat list header UI (#10573) 2024-12-12 10:12:07 +05:30
MessagePreview.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
MessageSignatureMissingAlert.vue feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
MessagesView.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
MoreActions.vue fix: Update design to fix the crowded header (#11633) 2025-05-29 18:45:28 -06:00
OnboardingFeatureCard.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
OnboardingView.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
QuotedEmailPreview.vue fix: Rendering on email without html content (#12561) 2025-10-01 13:43:05 +05:30
ReplyBox.vue fix: align message trimming with configured maxLength (#13947) 2026-03-31 10:39:54 +05:30
ReplyBoxBanner.vue fix: Wrong assignee displayed after switching conversations (#13501) 2026-02-10 15:23:55 +05:30
ReplyEmailHead.vue chore: Update styles in settings pages (#11070) 2025-03-18 14:40:02 -07:00
ReplyToMessage.vue chore: Auto-focus editor when replying to a message (#13857) 2026-03-20 16:59:27 +05:30
ShopifyOrderItem.vue chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
ShopifyOrdersList.vue feat(apps): Shopify Integration (#11101) 2025-03-19 15:37:55 -07:00
TagAgents.vue feat: Add the ability to mention team in private message (#11758) 2025-07-02 19:57:59 +05:30
TagTools.vue feat: New Scenarios page (#11975) 2025-07-30 19:34:27 +05:30
VariableList.vue fix: Variable search item not showing after braces/commas (#11864) 2025-07-03 19:39:36 +05:30
VoiceCallStatus.vue feat: outbound voice call essentials (#12782) 2025-11-24 17:47:00 -08:00