The resolved conversations chart filtered on created_at but grouped by resolved_at, so anything created before the window never showed up, and the tag list dropped tags whose conversations were all older than the window. Dropped the message volume COUNT(DISTINCT) and three of the four users table scans, and added the created_at indexes these queries need. The Pending tile is now labelled Awaiting First Reply since it counts conversations with no agent reply yet.
Marking a next-response SLA event met or breached never updated
conversations.next_sla_deadline_at, so the conversation kept sorting as if
the reply was still due. Reopening a resolved conversation had the same
problem in reverse: the column stays NULL even though its deadlines are
live again.
- Introduced a new category field for conversation statuses to classify them as 'open', 'waiting', or 'resolved'. Which allows max assignment limits in team to work with custom statuses as well.