Skip to content

Preview the newest message in the inbox list - #246

Merged
clbotdev merged 1 commit into
mainfrom
fix/inbox-latest-message
Nov 28, 2026
Merged

clbotdev merged 1 commit into
mainfrom
fix/inbox-latest-message

Conversation

@clbotdev

Copy link
Copy Markdown
Contributor

Problem

Each inbox row showed the ticket subject. For a chat, that's the first message, so a new message from the visitor never appeared in the list. You only saw it by opening the conversation.

Fix

  • Ticket list reads return `lastMessagePreview`, the plain text of each ticket's newest message. It comes from one `DISTINCT ON` query over the listed tickets, with no schema change.
  • Chat rows show the newest message in place of the subject. Email, form and API tickets show the subject with the newest message under it.

Testing

  • Typecheck passes.
  • API tests: `tickets/queries`, `api-validation`, `support/sessions` and `conformance` all pass, 21 tests. The test now asserts that the list previews the newest message.

Each inbox row showed the ticket subject, which for a chat is its first
message, so new messages never showed in the list. Ticket list reads now
include lastMessagePreview, the newest message's text. Chat rows show it
in place of the subject; other tickets show the subject with the preview
under it.
@clbotdev

Copy link
Copy Markdown
Contributor Author

QA e2e passed. Deployed qa-int-cd8c89b (main + #242 + #243 + #245 + this PR). The inbox list API returns lastMessagePreview, and the chat rows show the newest message: "QA message 23 after the fix" instead of the subject "QA long thread 1", and the agent's reply on the second ticket. Locally the same check showed "message 23 after the fix" instead of "long thread 1".

@clbotdev
clbotdev merged commit 72c1c7e into main Nov 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants