Skip to content

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

fix(web): restore notebook tooltip import and tool hint locale fallback

Bingxi Zhao (Frank)83121eeceaaf
diff --cc web/components/notebook/NotebookRecordRow.tsx
index 7df9d1cf3,7df9d1cf3..5189f89d7
--- a/web/components/notebook/NotebookRecordRow.tsx
+++ b/web/components/notebook/NotebookRecordRow.tsx
@@@ -14,7 -14,7 +14,7 @@@ import
} from "lucide-react";
import { useTranslation } from "react-i18next";
import { ConfirmDialog } from "@/components/ui/ConfirmDialog";
--import Tooltip from "@/components/common/Tooltip";
++import Tooltip from "@/shared/ui/Tooltip";
import NotebookRecordActions from "@/components/notebook/NotebookRecordActions";
import { notify } from "@/lib/notifications";
import type { NotebookRecordItem, NotebookSummary } from "@/lib/notebook-api";
diff --cc web/features/settings/sections/ToolsSettingsSection.tsx
index ffb264bb8,ffb264bb8..22825a7c9
--- a/web/features/settings/sections/ToolsSettingsSection.tsx
+++ b/web/features/settings/sections/ToolsSettingsSection.tsx
@@@ -76,6 -76,6 +76,7 @@@ const CAPABILITY_LABELS: Record<string
export default function ToolsSettingsPage() {
const { t } = useTranslation();
const { language, draftRevision } = useSettings();
++ const hintLanguage = language === "zh" ? "zh" : "en";
const [tools, setTools] = useState<BuiltinTool[] | null>(null);
const [error, setError] = useState<string | null>(null);
const [expanded, setExpanded] = useState<Set<string>>(new Set());
@@@ -183,8 -183,8 +184,8 @@@
.map((section) => ({
...section,
tools: section.tools.filter((tool) => {
-- const hints = tool.hints[language];
-- const alternateHints = tool.hints[language === "zh" ? "en" : "zh"];
++ const hints = tool.hints[hintLanguage];
++ const alternateHints = tool.hints[hintLanguage === "zh" ? "en" : "zh"];
const searchableText = [
tool.name,
tool.description,
@@@ -218,7 -218,7 +219,7 @@@
}),
}))
.filter((section) => section.tools.length > 0);
-- }, [language, query, sections]);
++ }, [hintLanguage, query, sections]);
const toggleExpanded = (name: string) => {
setExpanded((prev) => {
@@@ -311,7 -311,7 +312,7 @@@
<div className="border-t border-[var(--border)]/60">
{list.map((tool, idx) => {
const isOpen = expanded.has(tool.name);
-- const hints = tool.hints[language];
++ const hints = tool.hints[hintLanguage];
const isPending = pending.has(tool.name);
const isComingSoon = !!tool.coming_soon;
const isAvailable = tool.available !== false;