Skip to content

DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.

Merge pull request #1086 from contributor

Bingxi Zhao (Frank)c7a9d26695b8
diff --cc web/components/courses/OrganizedSessionList.tsx
index 967173703,0aa57c143..795a513a0
--- a/web/components/courses/OrganizedSessionList.tsx
+++ b/web/components/courses/OrganizedSessionList.tsx
@@@ -29,14 -22,7 +29,17 @@@ import type
SessionSummary,
} from "@/lib/session-api";
import { organizeSessionTree } from "@/lib/session-organization";
--import { isPlaceholderSessionTitle } from "@/lib/session-title";
++import {
++ displaySessionTitle,
++ isPlaceholderSessionTitle,
++} from "@/lib/session-title";
+import { useDragSort } from "@/hooks/useDragSort";
+import { placeMenu, type FloatingMenuPosition } from "@/lib/floating-menu";
+import {
+ applyManualOrder,
+ readCollapsedGroups,
+ writeCollapsedGroups,
+} from "@/lib/sidebar-layout";
interface OrganizedSessionListProps {
sessions: SessionSummary[];
@@@ -86,12 -87,11 +89,15 @@@ export default function OrganizedSessio
onRename,
onDelete,
onOrganize,
+ manualOrder,
+ onReorder,
+ onResetOrder,
+ scrollRef,
}: OrganizedSessionListProps) {
const { t } = useTranslation();
+ // Backend writes the English sentinel "New conversation" until the LLM
+ // title lands; mirror SessionList by showing a localized, breathing label.
+ const placeholderLabel = t("New chat");
const [editingId, setEditingId] = useState<string | null>(null);
const [draftTitle, setDraftTitle] = useState("");
const [openMenuId, setOpenMenuId] = useState<string | null>(null);
@@@ -375,16 -246,19 +381,19 @@@
}}
className="min-w-0 flex-1 rounded border border-[var(--border)] bg-[var(--background)] px-1.5 py-0.5 text-[12px] outline-none focus:border-[var(--ring)]"
/>
+ ) : isPlaceholderSessionTitle(session.title) ? (
+ <span
+ className="dt-breathing-text min-w-0 flex-1 truncate text-[12.5px] italic text-[var(--muted-foreground)]"
+ title={placeholderLabel}
+ >
- {placeholderLabel}
++ {displaySessionTitle(session.title, placeholderLabel)}
+ </span>
) : (
<span
- className={`min-w-0 flex-1 truncate text-[12.5px] ${
- isPlaceholderSessionTitle(session.title)
- ? "italic opacity-70"
- : ""
- }`}
+ className="min-w-0 flex-1 truncate text-[12.5px]"
title={session.title}
>
- {session.title || t("New chat")}
- {session.title}
++ {displaySessionTitle(session.title, placeholderLabel)}
</span>
)}
{pinned ? <Pin size={10} className="shrink-0 opacity-55" /> : null}