diff --git a/apps/client/public/locales/en-US/translation.json b/apps/client/public/locales/en-US/translation.json
index 25be7f1b..e269d5de 100644
--- a/apps/client/public/locales/en-US/translation.json
+++ b/apps/client/public/locales/en-US/translation.json
@@ -953,6 +953,7 @@
"Try a different search term.": "Try a different search term.",
"Try again": "Try again",
"Untitled chat": "Untitled chat",
+ "No document": "No document",
"You": "You",
"What can I help you with?": "What can I help you with?",
"Are you sure you want to revoke this {{credential}}": "Are you sure you want to revoke this {{credential}}",
diff --git a/apps/client/public/locales/ru-RU/translation.json b/apps/client/public/locales/ru-RU/translation.json
index ee5d320b..140c6761 100644
--- a/apps/client/public/locales/ru-RU/translation.json
+++ b/apps/client/public/locales/ru-RU/translation.json
@@ -954,6 +954,7 @@
"Try a different search term.": "Попробуйте другой поисковый запрос.",
"Try again": "Попробовать снова",
"Untitled chat": "Чат без названия",
+ "No document": "Без документа",
"What can I help you with?": "Чем я могу вам помочь?",
"Are you sure you want to revoke this {{credential}}": "Вы уверены, что хотите отозвать этот {{credential}}",
"Automatically provision users and groups from your identity provider via SCIM.": "Автоматически предоставляйте доступ пользователям и группам из вашего провайдера удостоверений через SCIM.",
diff --git a/apps/client/src/features/ai-chat/components/conversation-list.tsx b/apps/client/src/features/ai-chat/components/conversation-list.tsx
index 8e08fa0e..b5a2a4e5 100644
--- a/apps/client/src/features/ai-chat/components/conversation-list.tsx
+++ b/apps/client/src/features/ai-chat/components/conversation-list.tsx
@@ -18,8 +18,31 @@ import {
useRenameAiChatMutation,
} from "@/features/ai-chat/queries/ai-chat-query.ts";
import { IAiChat } from "@/features/ai-chat/types/ai-chat.types.ts";
+import { useTimeAgo } from "@/hooks/use-time-ago.tsx";
import classes from "@/features/ai-chat/components/ai-chat.module.css";
+/**
+ * The dimmed second line of a chat row: how long ago the chat was created and
+ * the document it was created in. Its own component so the self-updating
+ * `useTimeAgo` hook is called per row legally (hooks cannot run inside `.map()`).
+ */
+function ChatMetaLine({
+ createdAt,
+ pageTitle,
+}: {
+ createdAt: string;
+ pageTitle?: string | null;
+}) {
+ const { t } = useTranslation();
+ const ago = useTimeAgo(createdAt);
+ // e.g. "2 hours ago · Onboarding guide" / "2 hours ago · No document"
+ return (
+
+ {ago} · {pageTitle || t("No document")}
+
+ );
+}
+
interface ConversationListProps {
activeChatId: string | null;
onSelect: (chatId: string) => void;
@@ -127,16 +150,24 @@ export default function ConversationList({
}
}}
>
-
- {chat.roleName && (
-
- {chat.roleEmoji || "🤖"}
+
+
+ {chat.roleName && (
+
+ {chat.roleEmoji || "🤖"}
+
+ )}
+
+ {chat.title || t("Untitled chat")}
- )}
-
- {chat.title || t("Untitled chat")}
-
-
+
+
+