iachat/app/javascript/dashboard/components-next
Cayo P. R. Oliveira 9a05ff5247
feat: find scheduled message (#237)
* feat(scheduled-messages): scroll to sent message from sidebar

- Expose message_id in JBuilder serialization and push_event_data
- Add HIGHLIGHT_MESSAGE bus event for in-page message highlighting
- Add 'Go to message' button on sent scheduled messages in sidebar
- Enhance onScrollToMessage to fetch messages around target when not in DOM
- Extend Message.vue highlight to work with bus events (not just route query)
- Add i18n keys for EN and pt-BR

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* refactor(scheduled-messages): make sent card clickable instead of button

Replace the 'Go to message' button with a clickable card. The entire
sent scheduled message card now has cursor-pointer, hover highlight,
and a tooltip — clicking anywhere on it scrolls to the message.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(scheduled-messages): address PR review feedback

- Use camelCase value for HIGHLIGHT_MESSAGE bus event ('highlightMessage')
- Show toast alert when message not found after fetch or on fetch error
- Use the MESSAGE_NOT_FOUND i18n key that was previously unused

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(scheduled-messages): use messageId query param for find message

Replace direct bus event emission with route navigation using
?messageId= query param, reusing the same proven mechanism used by
search results and copy-message-link.

Changes:
- ScheduledMessageItem: router.replace with ?messageId= instead of
  emitting SCROLL_TO_MESSAGE directly
- ConversationView: handle ?messageId= on same-conversation (was
  previously skipped), fetch messages around target and scroll
- MessagesView: clean up ?messageId= from URL after scroll/error

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix(scheduled-messages): add toast feedback for find message

Show a persistent "Searching for message..." toast while fetching,
auto-dismissed on success. Show "Message not found" error toast if
the message cannot be located.

Uses usePendingAlert for the loading state in both ConversationView
(initial fetch) and MessagesView (fallback fetch).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: prevent scroll overshoot when navigating to message

Remove the immediate fetchPreviousMessages() call after
scrollIntoView({ behavior: smooth }). The fetch was prepending
messages above the target while the smooth scroll animation was
still running, shifting the DOM and causing the scroll to stop
short of the target message. The scroll event handler will
naturally trigger message loading when the user scrolls up later.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* chore(scheduled-messages): remove redundant clearMessageIdFromRoute calls

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-19 22:35:04 -03:00
..
Accordion feat: Allow customizing the responses, flows in Captain (#11385) 2025-04-29 15:42:15 -07:00
AssignmentPolicy fix: V2 Assignment service enhancements (#13036) 2026-02-11 12:24:45 +05:30
avatar fix: RTL issues in new conversation form (#12163) 2025-08-11 14:16:48 -07:00
banner fix(zapi): update promo banner button to type button (#142) 2025-11-13 16:43:28 -03:00
breadcrumb chore: Optimize contact page for smaller displays (#12183) 2025-08-14 19:07:20 +05:30
button chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
buttonGroup Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
Campaigns chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
captain feat: display total FAQ count in Related FAQs dialog (#13433) 2026-02-04 11:27:51 +05:30
changelog-card chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
checkbox feat: Add support for bulk action for Captain FAQs (#10905) 2025-02-27 17:05:33 -08:00
colorpicker chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
combobox chore: Remove vue-multiselect and migrate to next components (#13506) 2026-02-17 16:40:12 +05:30
Companies chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
Contacts feat: find scheduled message (#237) 2026-03-19 22:35:04 -03:00
content-templates feat: Add twilio content templates (#12277) 2025-08-29 16:13:25 +05:30
Conversation feat: Conversation workflows(EE) (#13040) 2026-01-27 11:36:20 +04:00
ConversationWorkflow feat: Conversation workflows(EE) (#13040) 2026-01-27 11:36:20 +04:00
copilot Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
CustomAttributes chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
dialog chore: Remove vue-multiselect and migrate to next components (#13506) 2026-02-17 16:40:12 +05:30
dropdown-menu Merge branch 'main' into chore/merge-upstream-4.11.0 2026-02-17 23:05:26 -03:00
Editor chore: Improve compose new conversation form (#13176) 2026-01-13 18:52:10 +05:30
feature-spotlight Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
filter feat: group conversations (#228) 2026-03-19 21:56:58 -03:00
flag feat: Flag icon component (#10564) 2024-12-10 11:53:24 +05:30
HelpCenter feat: add validation and error messages for custom HTML fields in portal settings 2026-03-09 11:48:53 -03:00
icon feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
Inbox chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
inline-input chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
input feat: Conversation workflows(EE) (#13040) 2026-01-27 11:36:20 +04:00
Label feat: Agent capacity policy Create/Edit pages (#12424) 2025-09-12 18:42:55 +05:30
message feat: find scheduled message (#237) 2026-03-19 22:35:04 -03:00
NewConversation feat: group conversations (#228) 2026-03-19 21:56:58 -03:00
pagination chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
phonenumberinput fix: Accidental contact creation on country dropdown toggle (#11494) 2025-05-16 16:14:00 +05:30
selectmenu feat: Update conversation basic filter (#11415) 2025-05-06 12:44:23 +05:30
sidebar feat: add kanban feature promotion with upgrade banner (#235) 2026-03-12 15:31:53 -03:00
spinner feat: Add Spinner to new components (#10303) 2024-10-16 17:53:46 -07:00
switch feat: group conversations (#228) 2026-03-19 21:56:58 -03:00
tabbar chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
taginput chore: Remove vue-multiselect and migrate to next components (#13506) 2026-02-17 16:40:12 +05:30
textarea feat: Conversation workflows(EE) (#13040) 2026-01-27 11:36:20 +04:00
whatsapp feat(scheduled-messages): add WhatsApp templates (#205) 2026-02-02 19:50:17 -03:00
year-in-review chore: Enable YearInReview for everyone, include analytics (#13090) 2025-12-16 18:20:10 -08:00
CardLayout.vue feat: Advanced Search Backend (#12917) 2026-01-07 15:30:49 +05:30
EmptyStateLayout.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00
SidebarActionsHeader.story.vue feat: Update the UI to support the change for Copilot as a universal copilot (#11618) 2025-05-29 12:35:10 +05:30
SidebarActionsHeader.vue feat: Update the UI to support the change for Copilot as a universal copilot (#11618) 2025-05-29 12:35:10 +05:30
TeleportWithDirection.vue feat: Add Teleport component to fix RTL/LTR utility classes (#11455) 2025-05-12 11:49:23 -07:00