From 19d31025a6093aa9e6bf4f5b2cc1c56dfa5ad19f Mon Sep 17 00:00:00 2001 From: louispaulb Date: Mon, 15 Jun 2026 06:11:47 -0400 Subject: [PATCH] feat(inbox+historique): sender-identity fix, single-source taxonomy, dispatch history & leaderboards MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Inbox identity/grouping (fixes mislabeled threads): - customerName = real From display name, then a customer matched BY EMAIL, then the raw address — never the AI's content-guessed name (a gilles@ relay showed as "Sylvie Juteau"). - never group a thread by one of our own domains (support@targo.ca, *@targointernet.com): re-ingested outbound was collapsing unrelated threads into one mislabeled "Guylaine Gagnon" thread. Refactor: queues/TYPES/QUEUE_OF/CAT centralized in lib/categories.js (were drifting across conversation.js + inbox-triage.js; telephonie/television had no matching triage type). Removed dead export findConversationByEmail. Feat: addMessage stamps msg.agent on outbound replies -> per-agent stats. Historique (/historique, HistoriquePage.vue): tournées par technicien (ALL statuses incl. Completed/Cancelled — the board hid them), tech leaderboard, inbox leaderboard. Hub: /dispatch/history, /dispatch/leaderboard, /conversations/leaderboard. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../components/shared/ConversationPanel.vue | 1322 ++++++++++++++++- .../ops/src/components/shared/MessageList.vue | 323 ++++ apps/ops/src/composables/useConversations.js | 309 +++- apps/ops/src/config/nav.js | 18 +- apps/ops/src/layouts/MainLayout.vue | 75 +- apps/ops/src/pages/HistoriquePage.vue | 269 ++++ apps/ops/src/router/index.js | 8 + services/targo-hub/lib/categories.js | 33 + services/targo-hub/lib/conversation.js | 968 +++++++++++- services/targo-hub/lib/dispatch.js | 38 + services/targo-hub/lib/inbox-triage.js | 76 + 11 files changed, 3289 insertions(+), 150 deletions(-) create mode 100644 apps/ops/src/components/shared/MessageList.vue create mode 100644 apps/ops/src/pages/HistoriquePage.vue create mode 100644 services/targo-hub/lib/categories.js create mode 100644 services/targo-hub/lib/inbox-triage.js diff --git a/apps/ops/src/components/shared/ConversationPanel.vue b/apps/ops/src/components/shared/ConversationPanel.vue index c524a69..75b7b36 100644 --- a/apps/ops/src/components/shared/ConversationPanel.vue +++ b/apps/ops/src/components/shared/ConversationPanel.vue @@ -1,23 +1,38 @@