## Summary
This PR enables the **Participating** conversation view in the main
sidebar and keeps the behavior aligned with existing conversation views.
## What changed
- Added **Participating** under Conversations in the new sidebar.
- Added a guard in conversation realtime `addConversation` flow so
generic `conversation.created` events are not injected while the user is
on Participating view.
- Added participating route mapping in conversation-list redirect helper
so list redirects resolve correctly to `/participating/conversations`.
## Scope notes
- Kept changes minimal and consistent with current `develop` behavior.
- No additional update-event filtering was added beyond what existing
views already do.
---------
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
* feat(whatsapp): show contact typing and recording indicators via baileys presence
Subscribe to WhatsApp presence updates via the baileys-api provider to
display real-time typing and recording indicators in the dashboard.
- Handle presence.update webhook events (composing, recording, paused,
available) and broadcast via ActionCable
- Add conversation.recording event to ActionCable, webhook, and channel
listeners for parity with typing_on/typing_off
- Show "typing..." / "recording..." in green text on the chat list,
replacing the message preview
- Show "X is typing" / "X is recording audio" in the conversation view
- Add presence_subscribe provider config option (default off) to gate
all subscription calls to the baileys-api
- Subscribe to presence on conversation open and periodically (1 min)
for the top 10 chat list conversations
- Consolidate contact LID from presence.update jidAlt payload
- Prevent echo-back of contact typing events to the channel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address review feedback
- Filter chat list typing indicator to contact-only events
- Add dedupe to presence subscribe bulk calls
- Use strong parameters for conversation_ids
- Remove redundant YAML quotes in swagger webhook enum
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address review feedback
- Extract phone from data[:id] when JID is @s.whatsapp.net (fallback
when jidAlt is absent)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address review feedback
- Filter recording users in getTypingUsersText to show correct names
- Add 10s timeout to presence_subscribe HTTP request
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: scope typing timer per user instead of per conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: make presence subscribe best-effort with rescue per channel
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix: address review feedback
- Add messagePreviewClass to typing preview for consistent padding
- Fix specs to use WebMock assertions instead of instance spying
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* feat: add group and conversation types to contacts and conversations, and implement conversation group membership model
* chore: add factory and specs for conversation group member model
* chore: add group type checks and associations for contacts and conversations
* refactor: remove scopes from ConversationGroupMember model
* refactor: remove scopes from ConversationGroupMember model specs
* refactor: enhance conversation type migration with concurrent indexing
* feat: add is_active index and scopes to ConversationGroupMember model
* feat: implement GroupConversationHandler for managing group conversations
* feat: add group_type attribute to contact creation
* fix: update WHATSAPP_CHANNEL_REGEX to allow up to 20 digits to handle group jid
* feat: handle group JID format in remote_jid method
* chore: update group contact info when finding or creating group contact
* chore: refactor and implement contact message handling and message creation logic for baileys single contact conversation
* feat: implement group message handling and metadata fetching in WhatsApp service
* chore: add spec for group type handling in contact creation for individual and group contacts
* chore: add specs for test scopes in conversation group members
* chore: update documentation for sender phone extraction in group conversation handler
* chore: move GroupConversationHandler concern to correct dir
* chore: implement specs for recipient_id handling to individual and group contacts
* chore: add group message handling specs for incoming messages
* chore: enhance group message handling to prevent race conditions
* chore: add group_metadata method to with error handling
* chore: add test for sending messages to group recipients in WhatsappBaileysService
* chore: raise error for unsuccessful response in group_metadata method
* chore: adds tests for group metadata retrieval and error handling
* chore: refactor build_sender_contact_attributes to avoid double call methods
* chore: update error handling for attachment download failure in message creation
* chore: optimize update_contact_info method to use compact hash for updates
* chore: simplify find_or_create_sender_contact method return values
* chore: rename group and individual contact message handlers
* chore: remove pointless comments from group contact message handler methods
* chore: refine sender JID extraction logic to remove unnecessary checks
* chore: remove phone number in spec for group contact attributes
* chore: implement sync_group route
* chore: implement get group_members route
* fix: sync_group participants creation handling
* chore: update contact avatar handling in group message processing
* chore: move sync_group functionality for conversation model
* feat: add sync_group action to ConversationsController and route
* fix: set contact name to phone in group message processing
* chore: refine group member retrieval logic in sync_group service and view
* feat: implement group participants update handling
* feat: implement group updates handling and localization for group activities
* chore: add handling for group membership requests and icon changes
* chore: add authorization for sync_group action in ContactsController
* chore: add sync_group endpoint specs for contact management
* chore: add authorization for sync_group action in ConversationsController
* chore: add specs for sync_group endpoint in ConversationsController
* chore: refactor index action in GroupMembersController for improved conversation filtering
* chore: add request specs for group_members endpoint in ContactsController
* chore: add specs for sync_group method in Conversation model
* chore: add specs for sync_group method in Channel::Whatsapp model
* chore: remove comments in find_or_create_group_conversation method
* chore: add specs for Contacts::SyncGroupService to validate group contact behavior
* chore: add specs for Whatsapp::BaileysHandlers::GroupsUpdate to validate group updates
* chore: add specs for Whatsapp::BaileysHandlers::GroupParticipantsUpdate to handle group participant actions
* chore: add fallback for identifier when contact has no phone_number in SendOnWhatsappService
* chore: add specs for group membership request and icon change handling in MessagesUpsert
* chore: add specs for sync_group method to handle group metadata and participant updates
* chore: update sync_group method to retrieve group members and adjust JSON response
* chore: update conversation query to filter by group type in GroupMembersController
* chore: update conversation creation in group_members_controller_spec to specify conversation_type as group
* chore: update find_or_create_group_conversation to include pending conversations
* chore: refactor sync_group method and enhance specs for group conversation handling
* feat: add GroupEventHelper module for managing group activities and contacts
* chore: refactor group contact inbox and conversation creation methods in group handlers
* chore: remove unnecessary check for blank participant contacts in sync_group_members method
* feat: implement message receipt update handling for WhatsApp integration
* chore: resolve rubocop rule for update_last_seen_at method
* chore: update swagger with endpoints for syncing group information and listing group members
* chore: integrate Contacts::SyncGroupService in group members controller, enhance error handling and update swagger
* chore: include participant information in reaction and quoted message keys for send message in group conversations
* chore: enhance whatsapp_baileys_service with participant handling for message keys
* feat: add skill for writing RSpec tests in the project
* fix: update recipient_id logic to directly use contact identifier for group contacts
* chore: implement group stub message handling for membership requests and icon changes
* fix: update whatsapp inbox source_id validation regex spec
* chore: fix spec for contact syncing group
* chore: remove readTimestamp handling and related tests for message read updates in group
* Cayo oliveira/cu 86af01932/4 backend gerenciamento dos grupos (#221)
* feat: add is_active index and scopes to ConversationGroupMember model
* feat: implement GroupConversationHandler for managing group conversations
* feat: add group_type attribute to contact creation
* fix: update WHATSAPP_CHANNEL_REGEX to allow up to 20 digits to handle group jid
* feat: handle group JID format in remote_jid method
* chore: update group contact info when finding or creating group contact
* chore: refactor and implement contact message handling and message creation logic for baileys single contact conversation
* feat: implement group message handling and metadata fetching in WhatsApp service
* chore: add spec for group type handling in contact creation for individual and group contacts
* chore: add specs for test scopes in conversation group members
* chore: update documentation for sender phone extraction in group conversation handler
* chore: move GroupConversationHandler concern to correct dir
* chore: implement specs for recipient_id handling to individual and group contacts
* chore: add group message handling specs for incoming messages
* chore: enhance group message handling to prevent race conditions
* chore: add group_metadata method to with error handling
* chore: add test for sending messages to group recipients in WhatsappBaileysService
* chore: raise error for unsuccessful response in group_metadata method
* chore: adds tests for group metadata retrieval and error handling
* chore: refactor build_sender_contact_attributes to avoid double call methods
* chore: update error handling for attachment download failure in message creation
* chore: optimize update_contact_info method to use compact hash for updates
* chore: simplify find_or_create_sender_contact method return values
* chore: rename group and individual contact message handlers
* chore: remove pointless comments from group contact message handler methods
* chore: refine sender JID extraction logic to remove unnecessary checks
* chore: remove phone number in spec for group contact attributes
* chore: implement sync_group route
* chore: implement get group_members route
* fix: sync_group participants creation handling
* chore: update contact avatar handling in group message processing
* chore: move sync_group functionality for conversation model
* feat: add sync_group action to ConversationsController and route
* fix: set contact name to phone in group message processing
* chore: refine group member retrieval logic in sync_group service and view
* feat: implement group participants update handling
* feat: implement group updates handling and localization for group activities
* chore: add handling for group membership requests and icon changes
* chore: add authorization for sync_group action in ContactsController
* chore: add sync_group endpoint specs for contact management
* chore: add authorization for sync_group action in ConversationsController
* chore: add specs for sync_group endpoint in ConversationsController
* chore: refactor index action in GroupMembersController for improved conversation filtering
* chore: add request specs for group_members endpoint in ContactsController
* chore: add specs for sync_group method in Conversation model
* chore: add specs for sync_group method in Channel::Whatsapp model
* chore: remove comments in find_or_create_group_conversation method
* chore: add specs for Contacts::SyncGroupService to validate group contact behavior
* chore: add specs for Whatsapp::BaileysHandlers::GroupsUpdate to validate group updates
* chore: add specs for Whatsapp::BaileysHandlers::GroupParticipantsUpdate to handle group participant actions
* chore: add fallback for identifier when contact has no phone_number in SendOnWhatsappService
* chore: add specs for group membership request and icon change handling in MessagesUpsert
* chore: add specs for sync_group method to handle group metadata and participant updates
* chore: update sync_group method to retrieve group members and adjust JSON response
* chore: update conversation query to filter by group type in GroupMembersController
* chore: update conversation creation in group_members_controller_spec to specify conversation_type as group
* chore: update find_or_create_group_conversation to include pending conversations
* chore: refactor sync_group method and enhance specs for group conversation handling
* feat: add GroupEventHelper module for managing group activities and contacts
* chore: refactor group contact inbox and conversation creation methods in group handlers
* chore: remove unnecessary check for blank participant contacts in sync_group_members method
* chore: update swagger with endpoints for syncing group information and listing group members
* chore: integrate Contacts::SyncGroupService in group members controller, enhance error handling and update swagger
* fix: update recipient_id logic to directly use contact identifier for group contacts
* chore: implement group stub message handling for membership requests and icon changes
* fix: update whatsapp inbox source_id validation regex spec
* chore: fix spec for contact syncing group
* fix: optimize update_last_seen_at method to use update_columns
* feat: Implement full frontend and backend support for group conversations
- Added PRD for group conversations detailing frontend and backend requirements.
- Created new Baileys TypeScript definitions for group-related functions.
- Renamed `conversation_type` to `group_type` in the database and updated all references.
- Implemented API serialization for `group_type` in conversation and contact responses.
- Developed Vuex store module for managing group members.
- Created UI components for group management, including group creation, member management, and metadata editing.
- Integrated @mention functionality for group conversations and real-time updates via ActionCable.
* feat: [US-001] - Rename conversation_type to group_type on conversations
- Add migration to rename column and indexes
- Update Conversation model enum to group_type
- Update GroupConversationHandler concern
- Update controllers (contacts, group_members)
- Update all backend specs
* chore: mark US-001 complete, update progress log, fix rubocop annotation
* feat: [US-002] - Serialize group_type fields in API responses
* feat: [US-003] - Add group_type filter to conversations index
* feat: [US-004] - Add group_type to filter_keys.yml and FilterService
* feat: US-005 - Backend group creation endpoint
- Add POST /api/v1/accounts/:account_id/groups endpoint
- Add Groups::CreateService to orchestrate Baileys group creation
- Extend WhatsappBaileysService and BaseService with group management methods
- Add routes for group members, metadata, invite, and join requests
- Returns 403 when agent lacks inbox access, 422 when provider is unavailable
* feat: US-006 - Backend add/remove members and role management endpoints
- Add create/destroy/update actions to GroupMembersController
- Delegate group management methods from Channel::Whatsapp to provider_service
- create adds members via Baileys and creates ConversationGroupMember records
- destroy removes a member by ID and sets is_active false
- update promotes/demotes a member and updates their role
* feat: US-007 - Backend group metadata update endpoint
- Add PATCH /contacts/:id/group_metadata endpoint
- Updates group subject via Baileys and syncs contact name
- Updates group description via Baileys and syncs additional_attributes.description
- Returns 422 when provider is unavailable
* feat: US-008 - Backend invite link management endpoints
- Add GET /contacts/:id/group_invite to retrieve current invite code/url
- Add POST /contacts/:id/group_invite/revoke to revoke and get new invite code/url
- Returns 422 when provider is unavailable
* feat: US-009 - Backend join request management endpoints
- Add GET /contacts/:id/group_join_requests to list pending join requests
- Add POST /contacts/:id/group_join_requests/handle to approve/reject requests
- Uses request_action param to avoid conflict with Rails reserved params[:action]
- Returns 422 when provider is unavailable
* feat: US-010 - Extend MentionService for contact mentions
- Extract mention://contact/ID/Name URIs from message content
- Store mentioned contact IDs in message.content_attributes[mentioned_contacts]
- Existing user/team mention handling unchanged
* feat: US-011 - Frontend API clients for all group endpoints
- Add app/javascript/dashboard/api/groupMembers.js
- Exports 11 methods: getGroupMembers, syncGroup, createGroup, updateGroupMetadata,
addMembers, removeMembers, updateMemberRole, getInviteLink, revokeInviteLink,
getPendingRequests, handleJoinRequest
* feat: US-012 - Frontend Vuex store module groupMembers
- Add groupMembers store module with fetch, sync, addMembers, removeMembers, updateMemberRole actions
- Add SET_GROUP_MEMBERS and SET_GROUP_MEMBERS_UI_FLAG mutation types
- Register module in store index
* feat: US-013 - Frontend i18n keys for group features
- Add groups.json with keys for group info, filter, creation modal, metadata editing, invite link, member management, join requests, and mention dropdown
- Register groups.json in i18n locale en/index.js
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: US-014 - Frontend group_type filter in ConversationBasicFilter
- Add chatGroupTypeFilter state, getter, mutation, and action to conversations store
- Add getChatGroupTypeFilter getter
- Add group_type param to ConversationApi.get()
- Add Type filter section to ConversationBasicFilter with All/Individual/Group options
- Persist group_type to UI settings under conversations_filter_by.group_type
- Restore group_type from UI settings on page load
- Include groupType in conversationFilters and pass as group_type param to API
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat: US-013 - Frontend — i18n keys for group features (en + pt-BR)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: [US-014] - Frontend — add group_type filter to ConversationBasicFilter
All implementation was already in place from prior work:
- ConversationBasicFilter.vue has Type section with All/Individual/Group options
- ChatList.vue handles group_type in conversationFilters and restores from UI settings
- Store has setChatGroupTypeFilter action, getChatGroupTypeFilter getter
- API maps groupType → group_type query param
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-015 - Frontend — add group_type to advanced filter system
- Add GROUP_TYPE to CONVERSATION_ATTRIBUTES in filterHelper.js
- Add group_type filter definition in provider.js (components-next)
- Add group_type to legacy advancedFilterItems/index.js and filterAttributeGroups
- Add group_type to automationHelper conditionFilterMaps
- Add group_type to customViewsHelper getValuesForFilter
- Add group_type options to ChatList setParamsForEditFolderModal
- Add GROUP_TYPE i18n key in en and pt_BR advancedFilters.json
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-016 - Frontend — GroupContactInfo basic display
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-017 - Frontend — GroupContactInfo sync button
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-018 - integrate GroupContactInfo in ContactPanel
- Import GroupContactInfo component
- Conditionally render GroupContactInfo when group_type === 'group'
- Keep ContactInfo for individual conversations (no regression)
- Dynamic sidebar title: 'Group' for groups, 'Contact' for individual
- contact_notes and contact_attributes accordion sections unchanged
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-019 - Frontend — group creation UI modal
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-020 - Frontend — member management UI in GroupContactInfo
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-021 - Frontend — group metadata editing UI
Add inline editing for group name, description, and avatar in GroupContactInfo:
- Click group name to edit inline, save on Enter/blur
- Click description to edit inline with textarea, save on blur
- Click avatar to open file picker for upload via contacts/update
- Loading states on all fields during save
- Success/error alerts for all operations
- updateGroupMetadata action added to groupMembers store
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-022 - Frontend — invite link management UI
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-023 - Frontend — join request management UI
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-024 - Frontend — group message bubbles: sender name with color
- Add sender name display above incoming message bubbles in group conversations
- Deterministic color per sender using AVATAR_COLORS palette (name.length % 6)
- Sender name hidden for consecutive messages from the same sender
- Individual conversation bubbles unchanged
- Pass groupWithPrevious and isGroupConversation props through MessageList → Message
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-025 - Frontend — group message bubbles: sender avatar
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: Add Ralph Wiggum AI agent script for managing tool execution and progress tracking
* feat: US-026 - Frontend — @mention dropdown for group conversations
- Create TagGroupMembers.vue component for group member mention suggestions
- Modify Editor.vue: add isGroupConversation/groupContactId props, render
TagGroupMembers for group non-private context
- Modify ReplyBox.vue: compute isGroupConversation and groupContactId from
currentChat, pass to WootMessageEditor
- @ mention plugin isAllowed now triggers for group conversations
- In individual conversations or private notes, existing behavior unchanged
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-027 - Frontend — mention rendering in group message bubbles
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-028 - Frontend ActionCable handler for contact.group_synced event
- Backend: Include group_members data in contact.group_synced ActionCable payload
- Frontend: Register contact.group_synced handler in ActionCableConnector
- Frontend: Add setGroupMembers action to groupMembers store for direct commits
- Tests: ActionCable handler spec + groupMembers store spec for new action
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: Update progress tracking for group conversations feature - mark tests as passing
* fix: sender click case mismatch and filter dropdown spacing
- Message.vue: use case-insensitive comparison for sender type check
(Contact.push_event_data returns 'contact' but SENDER_TYPES.CONTACT is 'Contact')
- ConversationBasicFilter.vue: replace last:mt-4 with flex-col gap-4
for consistent spacing between all three filter sections
* fix: four bugs found during manual testing review
- ContactPanel.vue: fix i18n key GROUP.INFO.SIDEBAR_TITLE → GROUP.SIDEBAR_TITLE
- groupMembers.js API: fix syncGroup HTTP method GET → POST to match backend route
- group_members_controller.rb: remove SyncGroupService from index action
- filterHelpers.js: add missing group_type case to getValueFromConversation
* docs: update progress with bug fix learnings
* chore: implement group creation functionality in UI components
* chore: add copy invite link functionality and update UI components
* feat: US-041 - Backend — ensure group_type is set on existing contacts and conversations
GroupConversationHandler#update_group_contact_info now sets group_type: :group
on contacts that are incorrectly typed as individual.
GroupConversationHandler#find_or_create_group_conversation updates existing
conversation's group_type to :group if it is currently :individual.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: mark US-041 as complete
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-029 - i18n keys for You badge and group settings (en + pt-BR)
All i18n keys already existed from prior iterations. Verified presence
and updated PRD status.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-030 - fix Baileys API route/method mismatches
Fix on_whatsapp to dig('data') before accessing first element.
Update spec stubs to match { data: [...] } response envelope.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-031 - group_leave, group_setting_update, group_join_approval_mode methods
All methods, delegates, and error handling already implemented.
Verified specs pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-032 - persist group settings, invite code, and profile picture during sync
Add try_update_group_avatar to fetch and attach group profile picture
during sync_group. Update spec stubs for profile-picture-url endpoint.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-033 - GroupSettingsController with leave, update, toggle
Controller and routes already implemented. Verified rubocop passes.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-034 - remove inbox_contact_id from provider_config and jbuilder
Already removed in prior iterations. Verified no references remain.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-035 - refactor TagGroupMembers to phone_number matching
Already implemented. Verified excludePhoneNumber prop and filtering.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-036 - remove InboxContact.vue and settings tab
Already removed in prior iterations. Verified no references remain.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-037 - add You badge in GroupContactInfo member list
Already implemented with isOwnMember check and blue badge styling.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-038 - fix inline edit for group name and description
Already implemented with phone number normalization. Verified code.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-039 - group settings section UI with toggles
Already implemented. Settings toggles, API calls, and i18n verified.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-040 - leave group UI with confirmation and auto-resolve
Already implemented. Leave button, confirmation, and API call verified.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-050 - Create GroupMember model and migration
New group_members table with group_contact_id, contact_id, role, is_active.
Unique index on (group_contact_id, contact_id). Associations added to Contact.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-064 - Helper method to find channel from group contact
Add Contact#group_channel to decouple channel lookup from conversations.
Update GroupMembersController and GroupSettingsController to use it.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-052 - Update GroupConversationHandler to use GroupMember
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-057 - Update GroupMembersController to query GroupMember
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-058 - Update GroupSettingsController to not depend on conversations
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-060 - Update group_members jbuilder views
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-059 - Remove group_members association from Conversation model
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: US-051 - Remove ConversationGroupMember model and table
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: mark all stories complete, update progress
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat(groups): real-time group panel, avatar refresh on icon change, editable name/description
- Add group_type to Conversations::EventDataPresenter#push_data and
Contact#push_event_data so WebSocket events carry the field, enabling
the frontend to switch to GroupContactInfo in real-time
- Update handle_icon_change_stub to call try_update_group_avatar with
force: true, purging the cached avatar and fetching the new one
- Add force parameter to try_update_group_avatar to support re-fetching
- Remove isInboxAdmin gate from name/description editing in
GroupContactInfo so any user can click to edit (server validates)
* fix(groups): rewrite SyncGroupService and simplify group metadata channel lookup
- Rewrite SyncGroupService to use contact.group_channel directly instead
of iterating conversations; find or create a conversation for sync
- Simplify GroupMetadataController to use @contact.group_channel instead
of querying conversations; remove local contact/attribute updates since
the Baileys API handles persistence via webhook events
* feat(groups): resolve conversations when inbox phone leaves or is removed
- Add resolve_conversations_if_inbox_left to GroupParticipantsUpdate
- Resolves all open/pending conversations when the inbox phone number
is removed from or leaves a group
* feat(groups): add paginated member list with infinite scroll
- Backend: add pagination to GroupMembersController (page/per_page,
default 10, ordered admins first); add meta with pagination info
to the jbuilder response
- Frontend: update groupMembers API to accept page param; add
APPEND_GROUP_MEMBERS and SET_GROUP_MEMBERS_META mutations; implement
paginated fetch with append and isFetchingMore flag in store
* feat(groups): support Ctrl+Click on group message sender to open in new tab
- navigateToGroupSender now accepts the event and checks for
Ctrl/Cmd+Click to open the sender contact in a new tab
* chore(i18n): update leave group confirmation text in en and pt_BR
* fix(groups): handle phone format differences in You badge and admin detection
- Extract phonesMatch helper that compares last 8 digits as fallback,
handling Brazilian 9th digit discrepancy (e.g. +5587988465072 vs
+558788465072)
- Apply to both isOwnMember and isInboxAdmin computed properties
* feat(groups): auto-sync members on mount, show existing members immediately
- On mount, fetch existing DB members first so they display instantly
- Then silently attempt a background sync to refresh from WhatsApp
- If sync fails (e.g. WhatsApp disconnected), existing members remain
displayed without any user-facing error
* fix(groups): pin own member on first page and return inbox phone in meta
The "You" badge was not appearing because the inbox's own member could be
missing from the first paginated page in large groups (admins sorted first).
Backend:
- Pin the inbox's own member at the top of page 1 regardless of sort order
- Return inbox_phone_number in the group members meta response
- Use last-8-digit SQL fallback for Brazilian 9th-digit phone mismatches
Frontend:
- Use meta.inbox_phone_number for the inboxPhone computed
- Fix declaration order to satisfy no-use-before-define lint rule
* fix(groups): fix member action dropdown clipped by overflow container
The promote/demote/remove dropdown menu was invisible because the member
list had `overflow-y-auto max-h-80`, clipping any absolutely-positioned
dropdown rendered inside it.
- Remove overflow container from member list; let the sidebar scroll
- Replace scroll-based infinite loading with IntersectionObserver on a
sentinel element for cleaner pagination trigger
- All member action logic (promote, demote, remove) was already wired;
the dropdown is now visible on hover
* fix(groups): keep member action dropdown visible when menu is open
The opacity-0/group-hover classes on the action menu wrapper caused the
DropdownMenu to become invisible as soon as the mouse left the row.
Now the wrapper stays fully opaque while the menu is active.
* fix(groups): move clickaway to member list wrapper to prevent instant close
v-on-clickaway was bound to every member's action div individually.
Clicking the three-dot button on one member fired closeMemberMenu from
all other members' clickaway handlers, closing the menu instantly.
Moved the directive to the single member list container instead.
* feat: add WhatsApp mention conversion (incoming + outgoing)
- New MentionConverterService for bidirectional mention handling
- Incoming: converts @phone/mentionedJid to mention://contact/ URIs
- Outgoing: extracts mention://contact/ URIs into WhatsApp mentions array
- Supports @everyone/todos group mentions
- WhatsApp renderer preserves mention display text instead of raw URI
* fix: preserve mention display text in WhatsApp renderer
mention:// URIs now render as display name text instead of the raw URL
when converting markdown to WhatsApp format
* feat: add @everyone mention option in group conversations
- Everyone item shown at top of mention dropdown
- Searchable by 'all', 'todos', 'everyone' keywords
- i18n keys added for en and pt-BR
* refactor: use Switch component for group settings toggles
- Add disabled prop to Switch component
- Replace custom toggle buttons in GroupContactInfo with Switch
- Loading spinner shown alongside toggle while toggling
* feat(whatsapp): add group sync status tracking (group_left, group_last_synced_at)
* feat(whatsapp): hide group management UI when group_left is true
* fix(groupMembers): include inbox phone number in group members state and sync event
* feat(whatsapp): wrap group settings and leave in Accordion component
* feat(groupMembers): handle group creator modification errors and update error messages
* feat(groupMembers): enhance invite link functionality and clean up UI state after copying
* refactor: remove sync_group functionality from conversations and related specs
* feat(GroupContactInfo): implement scroll-based loading for group members
* docs(swagger): add group API endpoints and remove conversation sync_group
- Remove dead conversation/{id}/sync_group swagger entry and file
- Update group_members.yml with pagination params, POST operation, and $ref schema
- Add swagger for: group_members_member (PATCH/DELETE), group_metadata,
group_invite, group_invite_revoke, group_join_requests,
group_join_requests_handle, group_settings, group_settings_leave,
group_settings_toggle_join_approval, groups/create
- Add group_member schema definition
- Add Groups tag to application tag_groups
- Register all 12 group endpoints in paths/index.yml
* feat(WhatsappBaileysService): enhance mention handling by replacing @DisplayName with @lid/@phone in outgoing text
* feat(groups): move group sync to background job with 15-min cooldown
- Create Contacts::SyncGroupJob that checks group_last_synced_at
before calling SyncGroupService (skips if < 15 min)
- Controller sync_group now enqueues the job and returns 202 Accepted
- Delete sync_group.json.jbuilder (no longer needed)
- Frontend sync action is fire-and-forget; results via ActionCable
- Auto-trigger sync on conversation select and panel mount
- Remove manual sync button from GroupContactInfo
* fix: show group members list even after leaving group\n\nKeep the members section visible in read-only mode when\ngroup_left is true. Admin actions (add member, promote,\ndemote, remove) remain hidden. Pending Join Requests and\nAdvanced Options also stay hidden.
* fix: disable group name/description/avatar editing when group_left is true
* fix: remove @all mention and fix Enter key in group mention dropdown\n\n- Remove the @all/everyone special mention from TagGroupMembers since\n no channel provider currently supports mentioning all participants\n- Fix Enter key sending message instead of inserting selected mention\n in group conversations. The root cause was Editor.vue only emitting\n toggleUserMention=true for private notes (isPrivate), leaving\n ReplyBox unaware the group mention dropdown was open. Now also\n emits for isGroupConversation.\n- Add TagGroupMembers spec covering filtering, exclusion, and emission"
* fix: address PR review feedback for group conversations
- Fix nil safety in group_invites and group_join_requests controllers
by replacing group_conversation.inbox.channel with @contact.group_channel
- Add before_action guard in group_members_controller to validate
contact is a group with identifier before create/update/destroy
- Persist metadata locally in group_metadata_controller after
provider calls (subject -> name, description -> additional_attributes)
- Add server-side allow_group_creation? check in groups_controller
- Add word boundary to mention regex to prevent matching inside words
- Remove useless catch clauses in groupMembers store (try/finally only)
- Default groupType to [] in customViewsHelper to prevent crash
- Fix swagger parameter name mismatch (contact_id -> id) across
all group endpoint YML files for consistency
* fix: address PR #228 review feedback - strong params, guards, and safety fixes
* fix: dispatch real-time events for Baileys group participant and metadata updates
Both group-participants.update and groups.update handlers were updating
backend data (GroupMember records, Contact attributes) but never
dispatching ActionCable events, leaving the frontend member list and
group metadata stale until manual sync.
Changes:
- Add dispatch_group_synced_event helper to GroupEventHelper concern
- Dispatch CONTACT_GROUP_SYNCED after participant add/remove/promote/demote
- Dispatch CONTACT_GROUP_SYNCED after group subject/description/settings changes
- Frontend: onContactGroupSynced also dispatches contacts/updateContact
to refresh group name, description and settings in the sidebar
* fix: enhance member menu positioning and close behavior on sidebar scroll
* feat: implement group property updates and enhance toast notifications
* fix: update WhatsApp channel regex to allow optional hyphenated numbers
* feat: implement group admin functionalities including leave, update properties, and toggle join approval
* refactor: simplify group message handling by removing metadata fetching and syncing methods
* chore: remove raph files
* feat: update Portuguese translations for 'Read More' and 'Insert Read More' phrases
* feat: enhance group admin functionalities with join approval and member add modes
* feat: enhance group join request handling by adding removal of handled requests and updating pending join requests
* feat: restrict message sending in announcement mode groups
When a Baileys WhatsApp group has announcement mode enabled (announce=true),
only admin members can send messages. This adds:
- Frontend: disabled editor + banner for non-admin inbox in announcement groups
- Backend: validation in SendOnWhatsappService to reject messages
- Shared phone helper utility extracted from GroupContactInfo
- i18n keys for en and pt_BR
* feat: add group sync job enqueueing and improve avatar update handling
* feat: add functionality to reset invite link and confirm member addition restrictions
* feat: update group name extraction logic to handle nil values
* feat: add inbox admin status handling and update related components
* feat: remove group conversation resolution on leave action
* feat: enhance group sender avatar interaction with tooltip and cursor pointer
* feat: add force option to SyncGroupJob and update related specs
* feat: enhance invite link handling and avatar update logic in group conversations
* chore: remove prd.json
* fix: change group sender name display from block to inline-block for better layout
* feat: add group members loading check and fetch logic in MessagesView and ReplyBox components
* feat: allow id and firstUnreadId props to accept both Number and String types
feat: add vOnClickOutside import to Editor component
feat: enhance Portuguese translations for integrations and settings
fix: change button color in GroupContactInfo component from green to teal
* feat: soft-disabled group conversations with activity tracking
Groups start in a soft-disabled state by default when using Baileys.
Chatwoot still creates group conversations but does not process every
incoming message. Instead, Baileys accumulates group messages and sends
periodic groups.activity webhook events to update last_activity_at.
Backend:
- Add WHATSAPP_GROUPS_ENABLED env var and groups_enabled? class method
- Send groupsEnabled in Baileys connection setup
- Create groups.activity handler to update conversation last_activity_at
- Gate group message processing behind groups_enabled? check
- Expose groups_enabled via inbox API
Frontend:
- Add warning banner with CTA to app.fazer.ai on disabled group conversations
- Disable reply editor for non-private-note mode when groups disabled
- Add i18n strings for en and pt_BR
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: use method for groups disabled banner action to avoid window scope issue
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: broadcast conversation update after groups.activity event
update_columns bypasses ActiveRecord callbacks, so the ActionCable
broadcast was never triggered when last_activity_at changed. Dispatch
a CONVERSATION_UPDATED event explicitly so the sidebar updates in
real-time.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: show unread dot for soft-disabled group conversations with activity
Since soft-disabled groups don't create messages, unread_count is
always 0 and the standard badge won't show. Detect unread state by
comparing last_activity_at > agent_last_seen_at for these groups
and display a teal dot indicator instead of a count badge.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: clear unread dot when agent opens soft-disabled group conversation
The update_last_seen endpoint skipped updating agent_last_seen_at when
there were no unread messages (the throttle path). For soft-disabled
groups that never create messages, this meant the dot indicator could
never be cleared. Add an unseen_activity? check that bypasses the
throttle when last_activity_at > agent_last_seen_at.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: group avatar upload to provider and fix icon change sync
- Route avatar upload through GroupMetadataController to push to WhatsApp
provider before saving locally
- Add update_group_picture to baileys service and base service
- Fix buildContactFormData crash when social_profiles is undefined
- Make try_update_group_avatar public so GROUP_CHANGE_ICON stub handler
can call it from outside the service class
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: update specs for group conversations feature changes
- Add groupsEnabled param to setup_channel_provider and handle_channel_error WebMock stubs
- Add group-request-participants-list stub for sync_group tests
- Add group_type to push_event_data expected hash
- Set last_activity_at in throttle tests to prevent unseen_activity? bypass
- Update sync_group delegation expectation to include soft: false
- Stub groups_enabled? in group message handling tests
- Update WhatsApp source_id regex expectation for group contact IDs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: add settings file for additional directories configuration
* chore: undo unrelated changes
* chore: remove planning doc, fix migration version, fix swagger param consistency
- Remove planejamento-chat-interno.md (unrelated planning document)
- Fix CreateGroupMembers migration API version from 7.0 to 7.1
- Fix swagger.json: normalize group endpoint paths from {contact_id} to {id}
to match YAML sources and existing contact sub-resource conventions
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: CayoPOliveira <cayoproliveira@gmail.com>
Co-authored-by: Cayo P. R. Oliveira <cayo@fazer.ai>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
# Pull Request Template
## Description
This PR replaces `vue-virtual-scroller` with
[`virtua`](https://github.com/inokawa/virtua/#benchmark) for the
conversation list virtualization.
### Changes
- Replace `vue-virtual-scroller`
(`DynamicScroller`/`DynamicScrollerItem`) with `virtua`'s `Virtualizer`
component
- Remove `IntersectionObserver`-based infinite scroll in favor of
`Virtualizer`'s `@scroll` event with offset-based bottom detection
- Remove `useEventListener` scroll binding and
`intersectionObserverOptions` computed
- Simplify item rendering — no more `DynamicScrollerItem` wrapper or
`size-dependencies` tracking; `virtua` measures items automatically
## 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
- [ ] 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
# Pull Request Template
## Description
This PR adds support for removing labels from the conversation card
context menu. Assigned labels now show a checkmark, and clicking an
already-selected label will remove it.
Fixes
https://linear.app/chatwoot/issue/CW-6400/allow-removing-labels-directly-from-the-right-click-menuhttps://github.com/chatwoot/chatwoot/issues/13367
## Type of change
- [x] New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
**Screencast**
https://github.com/user-attachments/assets/4e3a6080-a67d-4851-9d10-d8dbf3ceeb04
## 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
# Pull Request Template
## Description
This PR includes the following updates:
1. Updated the design system color tokens by introducing new tokens for
surfaces, overlays, buttons, labels, and cards, along with refinements
to existing shades.
2. Refreshed both light and dark themes with adjusted background,
border, and solid colors.
3. Replaced static Inter font files with the Inter variable font
(including italic), supporting weights from 100–900.
4. Added custom font weights (420, 440, 460, 520) along with custom
typography classes to enable more fine-grained and consistent typography
control.
## 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 <pranav@chatwoot.com>
We are expanding Chatwoot’s automation capabilities by
introducing **Conversation Workflows**, a dedicated section in settings
where teams can configure rules that govern how conversations are closed
and what information agents must fill before resolving. This feature
helps teams enforce data consistency, collect structured resolution
information, and ensure downstream reporting is accurate.
Instead of having auto‑resolution buried inside Account Settings, we
introduced a new sidebar item:
- Auto‑resolve conversations (existing behaviour)
- Required attributes on resolution (new)
This groups all conversation‑closing logic into a single place.
#### Required Attributes on Resolve
Admins can now pick which custom conversation attributes must be filled
before an agent can resolve a conversation.
**How it works**
- Admin selects one or more attributes from the list of existing
conversation level custom attributes.
- These selected attributes become mandatory during resolution.
- List all the attributes configured via Required Attributes (Text,
Number, Link, Date, List, Checkbox)
- When an agent clicks Resolve Conversation:
If attributes already have values → the conversation resolves normally.
If attributes are missing → a modal appears prompting the agent to fill
them.
<img width="1554" height="1282" alt="CleanShot 2025-12-10 at 11 42
23@2x"
src="https://github.com/user-attachments/assets/4cd5d6e1-abe8-4999-accd-d4a08913b373"
/>
#### Custom Attributes Integration
On the Custom Attributes page, we will surfaced indicators showing how
each attribute is being used.
Each attribute will show badges such as:
- Resolution → used in the required‑on‑resolve workflow
- Pre‑chat form → already existing
<img width="2390" height="1822" alt="CleanShot 2025-12-10 at 11 43
42@2x"
src="https://github.com/user-attachments/assets/b92a6eb7-7f6c-40e6-bf23-6a5310f2d9c5"
/>
#### Admin Flow
- Navigate to Settings → Conversation Workflows.
- Under Required attributes on resolve, click Add Required Attribute.
- Pick from the dropdown list of conversation attributes.
- Save changes.
Agents will now be prompted automatically whenever they resolve.
<img width="2434" height="872" alt="CleanShot 2025-12-10 at 11 44 42@2x"
src="https://github.com/user-attachments/assets/632fc0e5-767c-4a1c-8cf4-ffe3d058d319"
/>
#### NOTES
- The Required Attributes on Resolve modal should only appear when
values are missing.
- Required attributes must block the resolution action until satisfied.
- Bulk‑resolve actions should follow the same rules — any conversation
missing attributes cannot be bulk‑resolved, rest will be resolved, show
a notification that the resolution cannot be done.
- API resolution does not respect the attributes.
---------
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Pranav <pranav@chatwoot.com>
<img width="1240" alt="Screenshot 2025-06-05 at 12 39 04 AM"
src="https://github.com/user-attachments/assets/0071cd23-38c3-4638-946e-f1fbd11ec845"
/>
## Changes
Give the admins an option to delete conversation via the context menu
- enable conversation deletion in routes and controller
- expose delete API on conversations
- add delete option in conversation context menu and integrate with card
and list
- implement store action and mutation for delete
- update i18n with new strings
fixes: https://github.com/chatwoot/chatwoot/issues/947
---------
Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: Pranav <pranavrajs@gmail.com>
# 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>
# 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
This pull request includes significant changes to the filtering logic
for conversations in the frontend, here's a summary of the changes
This includes adding a `matchesFilters` method that evaluates a
conversation against the applied filters. It does so by first evaluating
all the conditions, and later converting the results into a JSONLogic
object that can be evaluated according to Postgres operator precedence
### Alignment Specs
To ensure the frontend and backend implementations always align, we've
added tests on both sides with same cases, for anyone fixing any
regressions found in the frontend implementation, they need to ensure
the existing tests always pass.
Test Case | JavaScript Spec | Ruby Spec | Match?
-- | -- | -- | --
**A AND B OR C** | Present | Present | Yes
Matches when all conditions are true | Present | Present | Yes
Matches when first condition is false but third is true | Present |
Present | Yes
Matches when first and second conditions are false but third is true |
Present | Present | Yes
Does not match when all conditions are false | Present | Present | Yes
**A OR B AND C** | Present | Present | Yes
Matches when first condition is true | Present | Present | Yes
Matches when second and third conditions are true | Present | Present |
Yes
**A AND B OR C AND D** | Present | Present | Yes
Matches when first two conditions are true | Present | Present | Yes
Matches when last two conditions are true | Present | Present | Yes
**Mixed Operators (A AND (B OR C) AND D)** | Present | Present | Yes
Matches when all conditions in the chain are true | Present | Present |
Yes
Does not match when the last condition is false | Present | Present |
Yes
---------
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>
# Pull Request Template
## Description
This PR fixes the issue where the saved `order_by` value for the
conversation list is not being applied. The feature was originally added
in PR https://github.com/chatwoot/chatwoot/pull/8237 but broke after
merging the Vue 3 migration PR
https://github.com/chatwoot/chatwoot/pull/10047
Fixes
https://linear.app/chatwoot/issue/CW-4110/not-using-the-saved-sort-order-by-option-from-ui-settings
**Cause of the Issue:**
The previous implementation checked `orderBy` against the keys of the
sorting constants instead of their values. Since `orderBy` stores a
sorting value, this caused the condition to fail, leading to fallback to
the default sorting option.
**Solution:**
The fix ensures that `orderBy` is validated against the values of the
sorting constants rather than the keys. This correctly applies the saved
sorting preference, while still falling back to the default if needed.
## 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/ebe8a4d3f1c041c6862334dc3b6d43a3?sid=5167feb7-eb4a-4f2c-8211-662830ba946c
## 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
# Pull Request Template
## Description
The PR includes usability feedback fixes for the conversation card
context menu. A "Mark as Read" option has been added after "Mark as
Unread" to prevent misclicks due to shifting menu positions.
Additionally, a separator line has been introduced for better grouping
and clarity
#### **Orders**
<img width="210" alt="image"
src="https://github.com/user-attachments/assets/d7c04356-7cfb-4f43-ac55-beb4167f91e9"
/>
<img width="210" alt="image"
src="https://github.com/user-attachments/assets/593acd58-39cf-4b25-b119-03b89cb3528c"
/>
**Fixes** https://linear.app/chatwoot/issue/CW-4088/usability-feedback
## Type of change
- [x] New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
### **Loom video**
https://www.loom.com/share/59f8ad3bf4054b299bfcffc0ba24eca1?sid=98fbb67d-c3e9-4fa4-9b04-2a7cb3bf8568
## 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
- Increase the sidebar and chatlist width on screens bigger than 2xl
- Fix background of the copilot sidebar
- Increase the breakpoint for hiding chatlist from 1024 to 1200
# Pull Request Template
## Description
This PR fixes the issue where the bulk action inbox assignable agent
list was not showing.
The issue started after merging this [feat: Vite+Vue 3
PR](https://github.com/chatwoot/chatwoot/pull/10047 ).
**Cause of issue**
Previously, `selectedInboxes` was accessed from the `ChatList.vue`
component. However, after moving the bulk action logic from mixin to the
`useBulkActions.js` composable, we were still referencing
`selectedInboxes` from the `ChatList.vue` component, even though it was
being set in the composable. This caused the API failed to load the
assignable agent list.
Ref:https://github.com/chatwoot/chatwoot/blob/develop/app/javascript/dashboard/composables/chatlist/useBulkActions.js#L18
**Solution**
Removed the usage of `selectedInboxes` from the `ChatList.vue` component
ref and using `selectedInboxes` ref directly from the
`useBulkActions.js`
Fixes
https://linear.app/chatwoot/issue/CW-3696/bulk-action-agent-list-is-not-loading
## 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/21e3835b3db04e34b94531ec128b586b?sid=beda60f0-1c8e-457b-b617-379d4af91873
## 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
This PR has the initial version of the new sidebar targeted for the next major redesign of the app. This PR includes the following changes
- Components in the `layouts-next` and `base-next` directories in `dashboard/components`
- Two generic components `Avatar` and `Icon`
- `SidebarGroup` component to manage expandable sidebar groups with nested navigation items. This includes handling active states, transitions, and permissions.
- `SidebarGroupHeader` component to display the header of each navigation group with optional icons and active state indication.
- `SidebarGroupLeaf` component for individual navigation items within a group, supporting icons and active state.
- `SidebarGroupSeparator` component to visually separate nested navigation items. (They look a lot like header)
- `SidebarGroupEmptyLeaf` component to render empty state of any navigation groups.
----
Co-authored-by: Pranav <pranav@chatwoot.com>
Co-authored-by: Pranav <pranavrajs@gmail.com>
These fixes are all auto generated and can be merged directly
Fixes the following issues
1. Event used on components should be hypenated
2. Attribute orders in components
3. Use `unmounted` instead of `destroyed`
4. Add explicit `emits` declarations for components, autofixed [using
this
script](https://gist.github.com/scmmishra/6f549109b96400006bb69bbde392eddf)
We ignore the top level v-if for now, we will fix it later
In admin settings, this Pr will add the UI for managing custom roles (
ref: https://github.com/chatwoot/chatwoot/pull/9995 ). It also handles
the routing logic changes to accommodate fine-tuned permissions.
---------
Co-authored-by: Pranav <pranavrajs@gmail.com>
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
Co-authored-by: iamsivin <iamsivin@gmail.com>
Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
This PR has the following changes
1. Fix tab styles issue caused by adding an additional wrapper for
getting an element ref on `ChatTypeTabs.vue`
2. Refactor `useKeyboardEvents` composable to not require an element
ref. It will use a local abort controller to abort any listener
---------
Co-authored-by: Sivin Varghese <64252451+iamsivin@users.noreply.github.com>
# Pull Request Template
## Description
This PR will replace the usage of `alertMixin` from the code base with
the `useAlert` composable.
Fixes
https://linear.app/chatwoot/issue/CW-3462/replace-alertmixin-usage-with-usealert
## Type of change
- [x] Breaking change (fix or feature that would cause existing
functionality not to work as expected)
## How Has This Been Tested?
Please refer this issue description
https://linear.app/chatwoot/issue/CW-3462/replace-alertmixin-usage-with-usealert
## 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
- [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: Sojan Jose <sojan@pepalo.com>
# Pull Request Template
## Description
This PR will replace the usage of `timeMixin` with `timeHelper`
Fixes
https://linear.app/chatwoot/issue/CW-3451/move-time-mixin-to-a-helper
## Type of change
- [x] New feature (non-breaking change which adds functionality)
## How Has This Been Tested?
Please refer to this issue description.
https://linear.app/chatwoot/issue/CW-3451/move-time-mixin-to-a-helper
## 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: Sojan Jose <sojan@pepalo.com>
# Pull Request Template
## Description
Currently, when a user navigates to a chat and attempts to access the
custom snooze modal, it is not visible, making it unable to set custom
snooze options. With this fix, the custom snooze modal will correctly
display even when a chat is open in mobile view.
**Cause of this issue**
The `<custom-snooze-modal/>` component is added to the `<chat-list/>`
component. To accommodate small screen views, we are using the expanded
view. However, if we open a chat and select the custom snooze option
from the chat header in the message view, the `<custom-snooze-modal/>`
component is hidden in the `<chat-list/>` component.
**Solution**
So, I moved the `<custom-snooze-modal/>` to the wrapper component
`<conversation-view/>` so we can use in all cases like,
1. Right-click to custom snooze
2. CMD bar custom snooze
3. Small screen custom snooze
# Replace the deprecated `eventBus` with mitt.js
## Description
Since eventBus and it's respective methods are deprecated and removed
from all future releases of vue, this was blocking us from migrating.
This PR replaces eventBus with
[mitt](https://github.com/developit/mitt). I have created a wrapper
mitt.js to simulate the same old event names so it's backwards
compatible, without making a lot of changes.
Fixes # (issue)
## Type of change
Please delete options that are not relevant.
- [x] 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?
1. Made sure all the places we're listening to bus events are working as
expected.
2. Respective specsf or the events from mitt.
## 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
- [x] 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