Commit Graph

54 Commits

Author SHA1 Message Date
Abhinav Raut
c16144a2bf fix: schema 2025-05-16 23:01:24 +05:30
Abhinav Raut
7f1c2c2f11 feat(wip): activity log / audit log
- single table stores acitivites against entities, actors, timestamps, ip addresses and activity description.
- admin page to view, sort and filter activity logs.
- new `activity_logs:manage` permission
2025-05-16 23:01:24 +05:30
Abhinav Raut
0556318714 set sane defaults for email notification smtp settings 2025-04-28 01:49:12 +05:30
Jonathan Leroy
ac61d43688 Add new automations rules filters "Hours since first reply" and "Hours
since last reply"
2025-04-15 20:40:40 +02:00
Abhinav Raut
a9f9d368b9 refactor: replace contacts:manage with with more granular permissions like contacts:read_all, contacts:read, contacts:block etc.
fix: filter out unknown permissions from role form while submitting
fix: correct strong password validation logic on reset
refactor: remove contact note update handler as it adds more complexity agents can simply delete note.
feat: new block contact api which required contacts:block perm
2025-04-15 02:23:47 +05:30
Abhinav Raut
a0c77bc12e feat: contact notes
refactor:  split code in internal/users/users.go into following files
internal/users/notes.go
internal/users/agent.go
internal/users/contact.go
2025-04-15 02:23:47 +05:30
Abhinav Raut
0254bab266 feat: regex hint 2025-04-15 02:23:47 +05:30
Abhinav Raut
d69a8c58d1 feat: custom attributes for contacts and conversations 2025-04-15 02:23:47 +05:30
Abhinav Raut
b2a53b18d5 feat: manage contacts
- New permission `contacts:manage`
- Views for contact list and single contact view.
- Ability to block contacts that in inturn stops new messages from the contact.
- Make all DB transactions that run dynamically generated SQL query `readonly`
- Rename `/admin/teams/users` to `/admin/users/agents/` for consistency. (ref #50)
- Fix UI glitches for long emails (refs #54)
- Fix empty created_at date for agents admin table (refs #51)
- Migrations for v0.6.0
2025-04-10 04:13:11 +05:30
Abhinav Raut
9bfe014d1e WIP: manage contacts page 2025-04-09 16:52:25 +05:30
Abhinav Raut
1821647695 feat: allow admins to set availability status
remove unnecessary column `reassign_replies` instead add a new enum `away_and_reassigning` to enum user availability status
2025-04-05 18:12:42 +05:30
Abhinav Raut
6d588f7a4e feat: show user summary on /admin/users
- Displays metrics like last active at, last login along with the avatar.
- Adds new column `last_login_at` to users table.
- Updates translations for the same
2025-04-04 22:00:26 +05:30
Abhinav Raut
2a382d6036 feat: Toggle button for user to reassign replies to conversations if they are away, user status now actually affects the conversation workflow.
Online: Conversations are auto-assigned.
Auto-away (inactivity in browser): Marks agent as away without stopping assignment (nothing changes for agent).
Manual away: Prevents new conversations from being assigned. (option available in the sidebar)
Reassign replies: Customer replies unassigns the conversation, returning it to the team inbox / unassigned inbox.
2025-04-04 03:29:16 +05:30
Abhinav Raut
a41c360cdb fix: update timezone from 'Asia/Calcutta' to 'Asia/Kolkata' in schema 2025-03-21 23:39:31 +05:30
Abhinav Raut
aeef7d4ad7 feat: configurable SLA alerts per SLA. 2025-03-21 23:23:03 +05:30
Abhinav Raut
5f1a40acba feat: adds new TLS type, tls skip verify and hello name to migrations and schema 2025-03-14 22:42:59 +05:30
Abhinav Raut
eefacdbda2 chore: adds new column applied sla status to applied slas table. 2025-03-12 02:30:43 +05:30
Abhinav Raut
494bc15b0a feat: Enable agents to create conversations from the UI
Before this feature the only way to create a conversation was by adding inbox and sending an email.

Agents first search contacts by email, see a dropdown select an existing contact or fill a new email for new contact.

The backend creates contact if it does not exist, creates a conversation, sends a reply to the conversation.
Optinally assigns conversation to a user / team.

fix: Replies to emails create a new conversation instead of attaching to the previous one.

Was not happening in gmail, as gmail was sending the references headers in all replies and I missed this completely. So when libredesk searches a conversation by references headers it worked!

Instead the right way is to generate the outgoing email message id and saving it in DB. This commit fixes that.

There could be more backup strategies like putting reference number in the subject but that can be explored later.

chore: new role `conversatons:write` that enables the create conversations feature for an agent.

chore: migrations for v0.4.0.
2025-03-05 01:17:42 +05:30
Abhinav Raut
26d76c966f feat: allow setting OpenAI API KEY from the UI.
feat: new `ai:manage` permission for the same
Migrations for new role.
2025-03-01 19:40:18 +05:30
Abhinav Raut
67e1230485 feat: agent availability status
New columns in users table to store user availability status.

Websocket pings sets the last active at timestamp, once user stops sending pings (on disconnect) after 5 minutes the user availalbility status changes to offline.

Detects auto away by checking for mouse, keyboard events and sets user status to away.

User can also set their status to away manually from the sidebar.

Migrations for v0.3.0

Minor visual fixes.

Bump version in package.json
2025-02-26 04:34:30 +05:30
Abhinav Raut
d2a79d9a10 feat: store last message sender in conversation as this will be used to show the Reply icon in the conversations list.
- Introduces new column `last_message_sender` in conversations table.
- Changes to propogate this new column in websocket updates.
2025-02-21 21:40:57 +05:30
Abhinav Raut
8567baa0e1 chore: remove 'In Progress' and 'Waiting' from default statuses
As an admin can always add custom statuses and expand upon the existing ones, the `In Progress` and `Waiting` statuses are not required.
2025-02-21 20:40:32 +05:30
Abhinav Raut
80a5b1c0a3 fix: incorrect team emoji DB column constraint 2025-02-13 23:05:45 +05:30
Abhinav Raut
7efe811e52 Fix: Avoid unnecessary upsertTags API calls on conversation changes.
refactor: rename `LibreDesk` -> `Libredesk`
2025-02-12 03:17:47 +05:30
Abhinav Raut
356a206110 fix: new incoming messages having 0 attachments in API responses, upload attachments first before sending out websocket updates.
- refactor: stringutils package remove unncessary `string` in function names.
- minor refactors.
2025-02-08 18:04:02 +05:30
Abhinav Raut
71246a1593 feat[sql]: Add indexes to tables 2025-02-04 02:25:11 +05:30
Abhinav Raut
37b3c4abcc feat: adds waiting since in API responses and structs.
chore: rename senderTypeUser to senderTypeAgent to keep naming consistent.
2025-02-04 00:08:51 +05:30
Abhinav Raut
cfe15ba275 feat: adds waiting_since column to conversations, start saving waiting_since on agent and contact reply.
- fix: waiting since sort order, use the new `waiting_since` column.
2025-02-03 23:36:38 +05:30
Abhinav Raut
d7ac76824f cleanup: remove assigned_agent_id column from csat responses table. 2025-02-02 18:46:43 +05:30
Abhinav Raut
8ac77ba08f make media disposition col nullable. 2025-01-30 01:39:54 +05:30
Abhinav Raut
d291c3f4b9 feat: conversation reference sequence numbers with optional prefix, adds a postgres function that takes optional prefix and combines the sequence number with it. e.g. TIK100 where TIK is the reference is the prefix and 100 is the sequence number.
- feat: start conversation sequence number from 100.
- fix: enforce consistent ON DELETE behavior across schema relationships.
- fix: prevent application of same SLA to a conversation when assigned team changes.
- fix: Automation apply SLA action use assigned team's working hrs and timezone first and then fallback to workspace timezone and working hours.
- frontend fixes
2025-01-29 00:49:36 +05:30
Abhinav Raut
140dae305c feat: max active conversation auto assignement limits to agents 2025-01-25 16:40:11 +05:30
Abhinav Raut
3c71ab35ff Feat: Add SLAs per team
- Feat: Provide the ability to change SLAs for conversations; this will start a new deadline calculation from the time the SLA is set.
2025-01-24 04:34:51 +05:30
Abhinav Raut
50188352a5 fix: Use SyncedEnforcer in casbin, fixes panics.
feat: store user roles in user roles table, drops the roles table on users table.
feat: standardize column names in schema, renames disabled bool to enables.
- vue router fixes to allow components / pages to rerender after creating an object in db.
- minor fixes and refactors.
2025-01-22 03:40:32 +05:30
Abhinav Raut
4dee94949d chore: remove inbox_type col from views.
- Adds FKEY to missing columns
- Updates unique partial index on users, to handle  the case where a soft deleted user is added again.
2025-01-21 02:39:18 +05:30
Abhinav Raut
64777b15dd feat: adds default notification template in db
- Updates default statuses list.
2025-01-20 02:12:48 +05:30
Abhinav Raut
0c01b53b09 feat(conversations): add trigram index for searching ref numbers
feat(messages): add trigram index for text content search
- feat: UI animations for conversation and messages list.
- Simplify websocket updates.
2025-01-19 23:10:53 +05:30
Abhinav Raut
87c14aa15d feat: Macros, macros not completely replace canned responses as they do the same job as canned repsonse.
- tiptap editor fixes for hardlines.
- set app font to jakarta, fix shadcn components having a different font.
- UI improvements on /admin
- UI improvements on inbox tab.
2025-01-17 04:57:01 +05:30
Abhinav Raut
92b614ddf6 feat[automation]: ability to drag and drop automation rule and set their execution order
- feat[automation]: execution mode for automations to execute the first matching rule or run all.
- Refactor automations to use fields, values, operator and select options from @/consts @/composables
- Refactor view filters to use the pick fields, values, operator, select options from @/consts @/composables
- feat: Move from yarn to pnpm!
- feat: Custom component ComboBox, replaces convo sidebar inputs with  combo
box.
- feat: initialize stores on app load to avoid multiple API calls by storing data in Pinia.
- change app fontm trying diff fonts.
- Keep side bar menu items by default open in inboxes .
2025-01-12 06:20:45 +05:30
Abhinav Raut
98537825e9 feat: AI clean up of agent responses, adds new ai package
- feat: full screen tiptap editor, esentially two editors that attempt to keep their state in sync.
- moves tiptap editor menu bar to to show up as a bubble once text is selected.
- Layout fixes and improvements.
- Improves /reports/overview charts and cards.
2025-01-09 05:01:33 +05:30
Abhinav Raut
d8e29b569f feat: conversation snooze
feat: command menu on press ctrl + k
feat: CSAT email when a conversation is marked resolved.
feat(AI)  agent message rewriting with OpenAI prompts
2025-01-08 06:34:28 +05:30
Abhinav Raut
7f4f8ecf66 fix[frontend]: sidebar active state
- replace conversation sidebar with shadcn sidebar
- refactor: rename and simplify permissions for better clarity and usability
- WIP - Snoozing of conversations and UI.
2025-01-07 04:23:27 +05:30
Abhinav Raut
caf8e7d34d WIP: MVP with shadcn sidebar
- csat
- SLA
- email notification templates
2025-01-06 02:39:44 +05:30
Abhinav Raut
48e89dc4b9 feat: hot reload package configs on change, no binary restart needed
- feat: soft deletion for users, inboxes, teams, and tags
- Rename tables and queries.
2024-11-13 01:47:16 +05:30
Abhinav Raut
9cd8aae3dc feat: button to scroll to the bottom of message list
- feat: show new messages in conversation count when user has scrolled to older messages
- feat: Events in conversation update automation rules
- feat: use prop vee-validate validations in `SelectTag` custom component and changes to enable use of vee-validate
- Adds new column events in automation rules
- Delete unlinked messages media files periodically.
2024-11-11 03:37:28 +05:30
Abhinav Raut
ed314eb1a5 feat: reset password flow
- feat: notification emails including - welcome email, assigned conversation email, reset password email.
- feat: adds outer app component which does not have a navbar
- feat: improve email templating, adds contact and conversations fields to email template
- fix: evaluator - ensure "contains" checks evaluate individual tokens in the string rather than the entire string.
- feat: logo URL for the app in general settings.
- General fixes and refactors.
- fix: hide trailing prose mirror line breaks.
2024-11-03 00:40:51 +05:30
Abhinav Raut
268c0b9b3b fix: schema.sql 2024-10-22 12:55:11 +05:30
Abhinav Raut
b1975d6484 feat: graceful shutdown
- feat: sets inter as the app font
- feat: update colour theme
- remove unncesary redirects after form is saved
- feat: addsconv  reference number in information accordion
- feat: adds reference number filter to conversation list
- feat: adds title for router components
- chore: remove unused uuid columns from tables
2024-10-22 02:52:36 +05:30
Abhinav Raut
98df9efd63 feat: adds dropdown to automation form fields
- feat: adds csrf token check
- feat: adds conversation sub and unsub for WS updates.
- Clean up and remove unncessary code
- refactor and simplify auth middlewares
- fix: automation rules
- Update schema.sql
2024-10-14 01:50:08 +05:30
Abhinav Raut
fbf631d8ad fix: whitespace being trimmed in canned repsonse
- refactor: conversations store.
- feat: Show conversation subject on top of conversation messages list
- feat: adds shadow to panels
- update: schema.sql adds insert statements for priority / status
- fix: trim canned response content to 100 chars.
- revert: rename team conversations tab to unassigned.
2024-10-11 05:31:12 +05:30