45 Commits

Author SHA1 Message Date
Ruslan Bakiev
fe4bd59248 refactor(whisper): use shared whisper service instead of local model
Replace @xenova/transformers in-process model with HTTP calls to shared
whisper-asr-webservice container (http://whisper:9000). Converts PCM16
samples to WAV and sends to /asr endpoint. Env: WHISPER_URL.
2026-03-07 10:51:40 +07:00
Ruslan Bakiev
12af9979ab feat(crm): add deal create/update controls with status and payment 2026-02-27 09:44:15 +07:00
Ruslan Bakiev
aae2a03340 fix(contacts): keep unread inbound-only while refreshing outbound preview 2026-02-26 12:27:06 +07:00
Ruslan Bakiev
a0ff1d00f6 Hydrate Telegram avatars on demand in frontend API 2026-02-26 11:43:47 +07:00
Ruslan Bakiev
6bae0300c8 Cache Telegram avatars locally and refresh avatar file ids 2026-02-26 10:59:44 +07:00
Ruslan Bakiev
ba3e5f7cac Fix Telegram contact avatars in CRM list 2026-02-26 10:41:27 +07:00
Ruslan Bakiev
0f87586e81 fix: OUT messages no longer create unread status + handle Telegram read receipts
Only inbound (IN) messages determine hasUnread in getContacts(). Telegram
read_business_message events are now parsed and processed to auto-mark
contacts as read for the entire team.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 14:53:55 +07:00
Ruslan Bakiev
6291797bb6 chore: upgrade Prisma 7, LangChain 1.x, Tailwind 4.2, Vue 3.5.29 and other deps
- Prisma 6 → 7: new prisma-client generator, prisma.config.ts, PrismaPg adapter, updated all imports
- LangChain 0.x → 1.x: @langchain/core, langgraph, openai
- Tailwind 4.1 → 4.2.1, daisyUI 5.5.19, Vue 3.5.29, ai 6.0.99, zod 4.3.6
- Fix MessageDirection bug in crm-updates.ts (OUTBOUND → OUT)
- Add server/generated to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:27:26 +07:00
Ruslan Bakiev
f4891e6932 fix: replace prisma.$use with $extends for Prisma 6 compatibility
prisma.$use middleware API was removed in Prisma 6. Switched to
$extends query hooks which is the supported approach.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:08:20 +07:00
Ruslan Bakiev
5c29cde13d refactor: remove manual upsertClientTimelineEntry from GraphQL resolvers
CalendarEvent and FeedCard timeline entries are now handled by Prisma
middleware automatically. Document timeline entry is inlined since
WorkspaceDocument stores contactId in scope field, not on the model.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:04:04 +07:00
Ruslan Bakiev
693a96cffd feat: auto-create ClientTimelineEntry via Prisma middleware
CalendarEvent and FeedCard now automatically get a ClientTimelineEntry
when created/updated with a contactId. This ensures events created by
the agent (or any other code path) appear in the contact timeline
without needing explicit upsertClientTimelineEntry calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:01:30 +07:00
Ruslan Bakiev
bf7f4ae933 feat: broadcast pilot agent traces via WebSocket for live status on reconnect
Agent trace logs are now stored in-memory (pilotRunStore) and broadcast
through the existing /ws/crm-updates WebSocket channel. When a client
reconnects, it receives a pilot.catchup with all accumulated logs so the
user sees agent progress even after page reload. Three new WS event
types: pilot.trace, pilot.finished, pilot.catchup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 08:45:32 +07:00
Ruslan Bakiev
5492e0d05c feat: unread message tracking with blue dot indicator
Add ContactThreadRead model to track when users last viewed each contact thread.
Contacts with messages newer than the last read time show a blue dot in the sidebar.
Opening a thread automatically marks it as read via markThreadRead mutation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:25:32 +07:00
Ruslan Bakiev
643d8d02ba feat: granular WebSocket message.new events
- WebSocket now detects new ContactMessages and broadcasts
  message.new events with contactId, text, channel, direction
- Frontend handles message.new: refreshes timeline for open chat,
  refreshes contacts for sidebar preview update
- dashboard.changed still fires for non-message changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 20:04:55 +07:00
Ruslan Bakiev
601de37ab0 feat: add lastMessageText and lastMessageChannel to contacts query
Enriches the contacts resolver to include the last message preview
and channel, so the sidebar can show thread previews without loading
all communications. No frontend changes yet — fields returned but unused.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:02:02 +07:00
Ruslan Bakiev
227030b9ae feat(calendar): replace CSS-transform zoom with GSAP flying-rect animation and scope data to year
- Add CalendarDateRange input to GraphQL schema; server resolver now accepts from/to params
- Frontend query sends year-scoped date range variables reactively
- Rewrite zoom-in/zoom-out animations using GSAP flying-rect overlay (650ms vs 2400ms)
- Add flying-rect element to CrmCalendarPanel with proper CSS
- Remove old calendarSceneTransformStyle CSS-transition approach
- Add calendarKillTweens cleanup in onBeforeUnmount

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:41:35 +07:00
Ruslan Bakiev
94c01516ba precompute call waveforms and stop list-time audio loading 2026-02-23 16:02:57 +07:00
Ruslan Bakiev
60b9bb9fd1 remove contact company/country/location across db and ui 2026-02-23 14:52:26 +07:00
Ruslan Bakiev
6ad53e64c5 feat(documents): delete document from context menu 2026-02-23 14:27:00 +07:00
Ruslan Bakiev
d3b751db65 refactor(graphql): replace dashboard query with resource queries 2026-02-23 12:46:29 +07:00
Ruslan Bakiev
acd974766a feat(telegram): ingest and render inbound voice messages 2026-02-23 12:21:53 +07:00
Ruslan Bakiev
43960d0374 feat(auth): enforce login route with global middleware 2026-02-23 12:01:03 +07:00
Ruslan Bakiev
70369255a2 refactor: move timeline scheduler to isolated service 2026-02-23 10:58:55 +07:00
Ruslan Bakiev
4b9682e447 feat: add unified client timeline query 2026-02-23 10:48:21 +07:00
Ruslan Bakiev
95fd9a64ce feat(chat): add contact inbox sources with per-user hide filters 2026-02-23 10:41:02 +07:00
Ruslan Bakiev
43b487ccec refactor ai naming and make omni raw-json first 2026-02-23 09:32:59 +07:00
Ruslan Bakiev
1b3b215bff fix(queue): use BullMQ-safe outbound job ids 2026-02-23 09:10:06 +07:00
Ruslan Bakiev
f1fb2fbfa6 feat(chat): add outbound delivery statuses to omnichat thread UI 2026-02-23 09:04:49 +07:00
Ruslan Bakiev
2f719219c4 Queue Telegram outbound on createCommunication 2026-02-23 08:45:23 +07:00
Ruslan Bakiev
cd2267e9d3 Remove Telegram API avatar logic from frontend service 2026-02-23 08:24:04 +07:00
Ruslan Bakiev
cbc2a3b31b Fallback Telegram avatars from identities in dashboard 2026-02-23 08:10:59 +07:00
Ruslan Bakiev
0f1028b0fa Add Telegram avatar proxy and realtime CRM websocket updates 2026-02-23 08:09:53 +07:00
Ruslan Bakiev
f81a0fde55 Refine documents UX and extract document scope helpers 2026-02-23 08:04:58 +07:00
Ruslan Bakiev
5679f22f7f fix: switch telegram connect to short token and single-window redirect 2026-02-22 09:20:22 +07:00
Ruslan Bakiev
8a14f002f8 feat: implement token-complete telegram connect flow via bot button 2026-02-22 08:56:53 +07:00
Ruslan Bakiev
d9148261a9 feat: add crm return button in telegram connect messages 2026-02-22 08:52:24 +07:00
Ruslan Bakiev
e907bcfe86 fix: reply with connect instructions on plain telegram start 2026-02-22 08:50:37 +07:00
Ruslan Bakiev
6ee12ed254 fix: send telegram confirmation messages during business connect flow 2026-02-22 07:51:35 +07:00
Ruslan Bakiev
fa1231df37 feat: add scoped context payload and rollbackable document changes 2026-02-21 16:27:09 +07:00
Ruslan Bakiev
052f37d0ec feat: add telegram business connect onboarding and status sync 2026-02-21 16:27:04 +07:00
Ruslan Bakiev
b73babbbf6 Restructure omni services and add Chatwoot research snapshot 2026-02-21 11:11:27 +07:00
Ruslan Bakiev
129daa31d7 Add URL-based change review and selective change-set rollback 2026-02-20 19:04:49 +07:00
Ruslan Bakiev
b9ba5778f5 require contactId for contact summary updates 2026-02-20 16:26:34 +07:00
Ruslan Bakiev
c9dd8cbfe2 fix crm tool schema syntax for nuxt build 2026-02-20 13:23:27 +07:00
Ruslan Bakiev
46cca064df chore: rename service folders to lowercase 2026-02-20 12:10:25 +07:00