Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(support):Include ticket id in email subject (#8991)

Marc Klingenb1880ddb8250
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 816bf34713..c4592b704c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -621,6 +621,9 @@ importers:
lucide-react:
specifier: ^0.462.0
version: 0.462.0([email protected])
+ nanoid:
+ specifier: ^3.3.8
+ version: 3.3.11
next:
specifier: 15.5.2
@@ -9870,11 +9873,6 @@ packages:
engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
hasBin: true
- resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==}
- engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1}
- hasBin: true
-
resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==}
@@ -10773,7 +10771,7 @@ packages:
resolution: {integrity: sha512-39olGaX2djYUdhaQQHDZ0T0GwEp+5f9UB9HmEP0qHfdQHIq0xGQZuAZ5TLnJIc/88SrPLpEflPC+xUqOTv3c5g==}
- deprecated: < 24.10.2 is no longer supported
+ deprecated: < 24.9.0 is no longer supported
resolution: {integrity: sha512-LA0Y9kxMYv47GIPJy6MI84fqTd2HmYZI83W/kM/SkKfDlajnZYfmXFTxkbY+xSBPkLJxltMa9hIkmdc29eguMA==}
@@ -24351,8 +24349,6 @@ snapshots:
-
@@ -25018,7 +25014,7 @@ snapshots:
dependencies:
- nanoid: 3.3.8
+ nanoid: 3.3.11
picocolors: 1.1.1
source-map-js: 1.2.1
diff --git a/web/package.json b/web/package.json
index 94ad1fc567..a70fb764b3 100644
--- a/web/package.json
+++ b/web/package.json
@@ -120,6 +120,7 @@
"langchain": "^0.3.28",
"lodash": "^4.17.21",
"lucide-react": "^0.462.0",
+ "nanoid": "^3.3.8",
"next": "15.5.2",
"next-auth": "^4.24.11",
"next-query-params": "^5.1.0",
diff --git a/web/src/features/support-chat/trpc/plainRouter.ts b/web/src/features/support-chat/trpc/plainRouter.ts
index 2b5002ad35..b42092b1fd 100644
--- a/web/src/features/support-chat/trpc/plainRouter.ts
+++ b/web/src/features/support-chat/trpc/plainRouter.ts
@@ -7,6 +7,7 @@ import { TRPCError } from "@trpc/server";
import { z } from "zod";
import { env } from "@/src/env.mjs";
import { VERSION } from "@/src/constants";
+import { nanoid } from "nanoid";
import {
MessageTypeSchema,
@@ -224,10 +225,12 @@ export const plainRouter = createTRPCRouter({
const { topLevel, subtype } = splitTopic(input.topic);
// (3) Create thread (no initial message; with fallback inside)
+ // Generate a short unique identifier to prevent Gmail from merging threads
+ const uniqueId = nanoid(5);
const { threadId, createdAt, status, createdWithThreadFields } =
await plainCreateSupportThread(plain, {
email,
- title: `[${input.messageType}] ${input.topic} • ${topLevel}/${subtype}`,
+ title: `[${uniqueId}] ${input.messageType}: ${input.topic} • ${topLevel}/${subtype}`,
messageType: input.messageType,
severity: input.severity,
topicTopLevel: topLevel,