DeepTutor: Lifelong Personalized Tutoring. https://deeptutor.info/.
Python ai-agentsai-tutorclawbotcli-tooldeepresearchinteractive-learninglearningmulti-agent-systemsrag
fix(tooltips): migrate data and admin button hints (#1526)
Bingxi Zhao (Frank)de5ecb9b2ad7
diff --git a/web/app/(admin)/admin/users/page.tsx b/web/app/(admin)/admin/users/page.tsxindex 2b9d9795c..41e242d87 100644--- a/web/app/(admin)/admin/users/page.tsx+++ b/web/app/(admin)/admin/users/page.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { Fragment, useEffect, useState, useCallback } from "react";import { useRouter } from "next/navigation";import { useTranslation } from "react-i18next";@@ -585,63 +586,81 @@ export default function AdminUsersPage() {<td className="px-5 py-3.5"><div className="flex items-center justify-end gap-1.5">{canManageAssignments && (+ <Tooltip label={t("Manage assignments")} side="top">+ <button+ onClick={() =>+ setExpandedUserId((current) =>+ current === user.id ? null : user.id,+ )+ }+ aria-label={t("Manage assignments")}+ className="rounded-lg p-1.5 text-[var(--muted-foreground)]+ hover:bg-[var(--background)] hover:text-[var(--foreground)]+ transition-colors"+ >+ <SlidersHorizontal size={15} />+ </button>+ </Tooltip>+ )}+ <Tooltip label={+ isSelf+ ? t("Cannot change your own role")+ : user.role === "admin"+ ? t("Demote to user")+ : t("Promote to admin")+ } side="top"><buttononClick={() =>- setExpandedUserId((current) =>- current === user.id ? null : user.id,- )+ setConfirmTarget({+ kind: isAdmin ? "demote" : "promote",+ user,+ })+ }+ disabled={isSelf}+ aria-label={+ isSelf+ ? t("Cannot change your own role")+ : user.role === "admin"+ ? t("Demote to user")+ : t("Promote to admin")}- title={t("Manage assignments")}className="rounded-lg p-1.5 text-[var(--muted-foreground)]hover:bg-[var(--background)] hover:text-[var(--foreground)]- transition-colors"+ disabled:opacity-30 disabled:cursor-not-allowed transition-colors">- <SlidersHorizontal size={15} />+ {user.role === "admin" ? (+ <ShieldOff size={15} />+ ) : (+ <Shield size={15} />+ )}</button>- )}- <button- onClick={() =>- setConfirmTarget({- kind: isAdmin ? "demote" : "promote",- user,- })- }- disabled={isSelf}- title={- isSelf- ? t("Cannot change your own role")- : user.role === "admin"- ? t("Demote to user")- : t("Promote to admin")- }- className="rounded-lg p-1.5 text-[var(--muted-foreground)]- hover:bg-[var(--background)] hover:text-[var(--foreground)]- disabled:opacity-30 disabled:cursor-not-allowed transition-colors"- >- {user.role === "admin" ? (- <ShieldOff size={15} />- ) : (- <Shield size={15} />- )}- </button>- <button- onClick={() =>- setConfirmTarget({ kind: "delete", user })- }- disabled={isSelf}- title={+ </Tooltip>+ <Tooltip label={isSelf? t("Cannot delete your own account"): t("Delete {{username}}", {username: user.username,})- }- className="rounded-lg p-1.5 text-[var(--muted-foreground)]- hover:bg-red-500/10 hover:text-red-500- disabled:opacity-30 disabled:cursor-not-allowed transition-colors"- >- <Trash2 size={15} />- </button>+ } side="top">+ <button+ onClick={() =>+ setConfirmTarget({ kind: "delete", user })+ }+ disabled={isSelf}+ aria-label={+ isSelf+ ? t("Cannot delete your own account")+ : t("Delete {{username}}", {+ username: user.username,+ })+ }+ className="rounded-lg p-1.5 text-[var(--muted-foreground)]+ hover:bg-red-500/10 hover:text-red-500+ disabled:opacity-30 disabled:cursor-not-allowed transition-colors"+ >+ <Trash2 size={15} />+ </button>+ </Tooltip></div></td></tr>diff --git a/web/components/agents/ConnectedAgents.tsx b/web/components/agents/ConnectedAgents.tsxindex f9fa297b1..becc987ca 100644--- a/web/components/agents/ConnectedAgents.tsx+++ b/web/components/agents/ConnectedAgents.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";import { Cpu, Loader2, Plug, Plus, Trash2, X } from "lucide-react";@@ -160,20 +161,21 @@ export default function ConnectedAgents() {{conn.cwd ? ` · ${conn.cwd}` : ""}</div></div>- <button- type="button"- onClick={() => void handleDisconnect(conn.name)}- disabled={busyName === conn.name}- title={tr({ zh: "断开", en: "Disconnect" })}- aria-label={tr({ zh: "断开", en: "Disconnect" })}- className="rounded-lg border border-[var(--border)]/50 p-2 text-[var(--muted-foreground)] transition-colors hover:border-red-300 hover:text-red-600 disabled:opacity-50 dark:hover:border-red-900 dark:hover:text-red-400"- >- {busyName === conn.name ? (- <Loader2 className="h-3.5 w-3.5 animate-spin" />- ) : (- <Trash2 className="h-3.5 w-3.5" />- )}- </button>+ <Tooltip label={tr({ zh: "断开", en: "Disconnect" })} side="top">+ <button+ type="button"+ onClick={() => void handleDisconnect(conn.name)}+ disabled={busyName === conn.name}+ aria-label={tr({ zh: "断开", en: "Disconnect" })}+ className="rounded-lg border border-[var(--border)]/50 p-2 text-[var(--muted-foreground)] transition-colors hover:border-red-300 hover:text-red-600 disabled:opacity-50 dark:hover:border-red-900 dark:hover:text-red-400"+ >+ {busyName === conn.name ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ <Trash2 className="h-3.5 w-3.5" />+ )}+ </button>+ </Tooltip></div>);})}diff --git a/web/components/auth/LogoutButton.tsx b/web/components/auth/LogoutButton.tsxindex 157892cb9..dc3f62cec 100644--- a/web/components/auth/LogoutButton.tsx+++ b/web/components/auth/LogoutButton.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { LogOut } from "lucide-react";import { useRouter } from "next/navigation";import { useTranslation } from "react-i18next";@@ -24,14 +25,15 @@ export function LogoutButton({ collapsed = false }: LogoutButtonProps) {if (collapsed) {return (- <button- onClick={handleLogout}- className="rounded-lg p-2 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--background)]/50 hover:text-red-500"- aria-label={t("Sign out")}- title={t("Sign out")}- >- <LogOut size={16} strokeWidth={1.5} />- </button>+ <Tooltip label={t("Sign out")} side="top">+ <button+ onClick={handleLogout}+ className="rounded-lg p-2 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--background)]/50 hover:text-red-500"+ aria-label={t("Sign out")}+ >+ <LogOut size={16} strokeWidth={1.5} />+ </button>+ </Tooltip>);}diff --git a/web/components/cli-apps/CliAppsSection.tsx b/web/components/cli-apps/CliAppsSection.tsxindex b882d2d58..ac6892f6a 100644--- a/web/components/cli-apps/CliAppsSection.tsx+++ b/web/components/cli-apps/CliAppsSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import {AlertTriangle,@@ -275,27 +276,29 @@ function Installed({/>)}{isAdmin && (- <button- type="button"- disabled={busy === app.id}- onClick={() => {- if (- typeof window !== "undefined" &&- !window.confirm(- t('Remove "{{name}}" from this deployment?', {- name: app.display_name,- }),- )- ) {- return;- }- void act(app.id, () => uninstallCliApp(app.id));- }}- title={t("Uninstall")}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-red-500 disabled:opacity-50"- >- <Trash2 size={14} />- </button>+ <Tooltip label={t("Uninstall")} side="top">+ <button+ type="button"+ disabled={busy === app.id}+ onClick={() => {+ if (+ typeof window !== "undefined" &&+ !window.confirm(+ t('Remove "{{name}}" from this deployment?', {+ name: app.display_name,+ }),+ )+ ) {+ return;+ }+ void act(app.id, () => uninstallCliApp(app.id));+ }}+ aria-label={t("Uninstall")}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-red-500 disabled:opacity-50"+ >+ <Trash2 size={14} />+ </button>+ </Tooltip>)}</div></div>diff --git a/web/components/knowledge/CreateKbModal.tsx b/web/components/knowledge/CreateKbModal.tsxindex e0471e039..bf7846a6c 100644--- a/web/components/knowledge/CreateKbModal.tsx+++ b/web/components/knowledge/CreateKbModal.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import type { EmbeddingModelSelection } from "@/features/knowledge/model/types";import { useEffect, useRef, useState, type ReactNode } from "react";@@ -1439,45 +1440,45 @@ function LinkModeFields({const enabled = linkSourceEnabled(p);const disabled = submitting || !enabled;return (- <button+ <Tooltipkey={p.id}- type="button"- disabled={disabled}- onClick={() => setLinkSource(p.id)}- title={- !enabled- ? t(- "This engine's index lives in the cloud and can't be linked.",- )- : undefined- }- className={`group flex flex-col gap-1 rounded-2xl border p-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${- selected- ? "border-[var(--primary)] bg-[var(--primary)]/5"- : "border-[var(--border)] hover:border-[var(--ring)]"- }`}+ label={enabled ? p.name : t("This engine's index lives in the cloud and can't be linked.")}+ suppressed={enabled}+ side="top">- <div className="flex items-center justify-between gap-2">- <span className="flex min-w-0 items-center gap-2 text-[13px] font-medium text-[var(--foreground)]">- <KnowledgeEngineIcon engine={p.id} size={24} />- <span className="truncate">{p.name}</span>- </span>- {selected ? (- <Check className="h-3.5 w-3.5 text-[var(--primary)]" />- ) : !enabled ? (- <span className="inline-flex items-center gap-1 rounded-full bg-[var(--muted)] px-1.5 py-0.5 text-[10px] font-medium text-[var(--muted-foreground)]">- {t("Cloud index")}- </span>- ) : p.id === IMA_PROVIDER ? (- <span className="inline-flex items-center gap-1 rounded-full bg-sky-100 px-1.5 py-0.5 text-[10px] font-medium text-sky-700 dark:bg-sky-950/30 dark:text-sky-300">- {t("Read only")}+ <button+ type="button"+ disabled={disabled}+ onClick={() => setLinkSource(p.id)}+ aria-label={p.name}+ className={`group flex h-full w-full flex-col gap-1 rounded-2xl border p-3 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-50 ${+ selected+ ? "border-[var(--primary)] bg-[var(--primary)]/5"+ : "border-[var(--border)] hover:border-[var(--ring)]"+ }`}+ >+ <div className="flex items-center justify-between gap-2">+ <span className="flex min-w-0 items-center gap-2 text-[13px] font-medium text-[var(--foreground)]">+ <KnowledgeEngineIcon engine={p.id} size={24} />+ <span className="truncate">{p.name}</span></span>- ) : null}- </div>- <span className="text-[11.5px] leading-snug text-[var(--muted-foreground)]">- {p.description}- </span>- </button>+ {selected ? (+ <Check className="h-3.5 w-3.5 text-[var(--primary)]" />+ ) : !enabled ? (+ <span className="inline-flex items-center gap-1 rounded-full bg-[var(--muted)] px-1.5 py-0.5 text-[10px] font-medium text-[var(--muted-foreground)]">+ {t("Cloud index")}+ </span>+ ) : p.id === IMA_PROVIDER ? (+ <span className="inline-flex items-center gap-1 rounded-full bg-sky-100 px-1.5 py-0.5 text-[10px] font-medium text-sky-700 dark:bg-sky-950/30 dark:text-sky-300">+ {t("Read only")}+ </span>+ ) : null}+ </div>+ <span className="text-[11.5px] leading-snug text-[var(--muted-foreground)]">+ {p.description}+ </span>+ </button>+ </Tooltip>);})}diff --git a/web/components/knowledge/FileDropZone.tsx b/web/components/knowledge/FileDropZone.tsxindex 7034173dc..e52dc7bdf 100644--- a/web/components/knowledge/FileDropZone.tsx+++ b/web/components/knowledge/FileDropZone.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useMemo, useRef, useState, type DragEvent } from "react";import { useTranslation } from "react-i18next";import { AlertTriangle, CheckCircle2, FileText, Files, X } from "lucide-react";@@ -361,14 +362,16 @@ function SelectionSummary({</p>)}</div>- <button- type="button"- onClick={() => onRemove(item.id)}- title={t("Remove")}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--background)] hover:text-[var(--foreground)]"- >- <X className="h-3.5 w-3.5" />- </button>+ <Tooltip label={t("Remove")} side="top">+ <button+ type="button"+ onClick={() => onRemove(item.id)}+ aria-label={t("Remove")}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--background)] hover:text-[var(--foreground)]"+ >+ <X className="h-3.5 w-3.5" />+ </button>+ </Tooltip></div>))}</div>diff --git a/web/components/knowledge/KbDocumentList.tsx b/web/components/knowledge/KbDocumentList.tsxindex 2634360b2..42aa65a6d 100644--- a/web/components/knowledge/KbDocumentList.tsx+++ b/web/components/knowledge/KbDocumentList.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";import {@@ -225,15 +226,16 @@ export default function KbDocumentList({if (collapsed) {return (<aside className="flex h-full w-[44px] shrink-0 flex-col items-center gap-1 border-r border-[var(--border)] bg-[var(--card)]/40 py-2">- <button- type="button"- onClick={onToggleCollapsed}- title={t("Expand")}- aria-label={t("Expand")}- className="flex h-7 w-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- <PanelLeftOpen size={13} strokeWidth={1.7} />- </button>+ <Tooltip label={t("Expand")} side="top">+ <button+ type="button"+ onClick={onToggleCollapsed}+ aria-label={t("Expand")}+ className="flex h-7 w-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ <PanelLeftOpen size={13} strokeWidth={1.7} />+ </button>+ </Tooltip><div className="my-1 h-px w-6 bg-[var(--border)]/60" /><div className="flex w-full flex-1 flex-col items-center gap-0.5 overflow-y-auto pb-2">{fileEntries.map((file) => {@@ -245,7 +247,7 @@ export default function KbDocumentList({key={file.name}type="button"onClick={() => onSelect(file)}- title={file.name}+aria-label={file.name}className={`relative flex h-8 w-8 shrink-0 items-center justify-center rounded-md transition-colors ${active@@ -338,7 +340,7 @@ export default function KbDocumentList({<buttontype="button"onClick={() => onSelect(file)}- title={node.path}+ aria-label={node.path}className="flex min-w-0 flex-1 items-center gap-2 text-left"><Icon@@ -361,54 +363,58 @@ export default function KbDocumentList({<span className="px-0.5 text-[10px] font-medium text-red-600 dark:text-red-400">{t("Delete?")}</span>- <button- type="button"- onClick={() => void handleDelete(node.path)}- disabled={busy}- title={t("Confirm delete")}- aria-label={t("Confirm delete")}- className="rounded p-1 text-red-600 transition-colors hover:bg-red-50 disabled:opacity-40 dark:text-red-400 dark:hover:bg-red-950/40"- >- <Check className="h-3.5 w-3.5" />- </button>- <button- type="button"- onClick={() => setConfirmDeleteFor(null)}- title={t("Cancel")}- aria-label={t("Cancel")}- className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- <X className="h-3.5 w-3.5" />- </button>+ <Tooltip label={t("Confirm delete")} side="top">+ <button+ type="button"+ onClick={() => void handleDelete(node.path)}+ disabled={busy}+ aria-label={t("Confirm delete")}+ className="rounded p-1 text-red-600 transition-colors hover:bg-red-50 disabled:opacity-40 dark:text-red-400 dark:hover:bg-red-950/40"+ >+ <Check className="h-3.5 w-3.5" />+ </button>+ </Tooltip>+ <Tooltip label={t("Cancel")} side="top">+ <button+ type="button"+ onClick={() => setConfirmDeleteFor(null)}+ aria-label={t("Cancel")}+ className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ <X className="h-3.5 w-3.5" />+ </button>+ </Tooltip></div>) : (<div className="flex shrink-0 items-center opacity-0 transition-opacity group-hover/row:opacity-100">- <button- type="button"- onClick={() => {- setConfirmDeleteFor(null);- setMoveMenuFor((cur) =>- cur === node.path ? null : node.path,- );- }}- title={t("Move to…")}- aria-label={t("Move to…")}- className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- <MoveRight className="h-3.5 w-3.5" />- </button>- <button- type="button"- onClick={() => {- setMoveMenuFor(null);- setConfirmDeleteFor(node.path);- }}- title={t("Delete file")}- aria-label={t("Delete file")}- className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-950/40 dark:hover:text-red-400"- >- <Trash2 className="h-3.5 w-3.5" />- </button>+ <Tooltip label={t("Move to…")} side="top">+ <button+ type="button"+ onClick={() => {+ setConfirmDeleteFor(null);+ setMoveMenuFor((cur) =>+ cur === node.path ? null : node.path,+ );+ }}+ aria-label={t("Move to…")}+ className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ <MoveRight className="h-3.5 w-3.5" />+ </button>+ </Tooltip>+ <Tooltip label={t("Delete file")} side="top">+ <button+ type="button"+ onClick={() => {+ setMoveMenuFor(null);+ setConfirmDeleteFor(node.path);+ }}+ aria-label={t("Delete file")}+ className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-600 dark:hover:bg-red-950/40 dark:hover:text-red-400"+ >+ <Trash2 className="h-3.5 w-3.5" />+ </button>+ </Tooltip></div>)}</div>@@ -468,41 +474,44 @@ export default function KbDocumentList({</span></div><div className="flex shrink-0 items-center gap-0.5">- <button- type="button"- onClick={() => {- setNewFolderOpen((v) => !v);- setNewFolderName("");- }}- title={t("New folder")}- aria-label={t("New folder")}- className="rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- <FolderPlus size={13} strokeWidth={1.7} />- </button>- <button- type="button"- onClick={() => void load(true)}- title={t("Refresh")}- aria-label={t("Refresh")}- disabled={loading || busy}- className="rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-40"- >- {loading ? (- <Loader2 className="h-3 w-3 animate-spin" />- ) : (- <RefreshCw className="h-3 w-3" />- )}- </button>- <button- type="button"- onClick={onToggleCollapsed}- title={t("Collapse")}- aria-label={t("Collapse")}- className="rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- <PanelLeftClose size={12} strokeWidth={1.7} />- </button>+ <Tooltip label={t("New folder")} side="top">+ <button+ type="button"+ onClick={() => {+ setNewFolderOpen((v) => !v);+ setNewFolderName("");+ }}+ aria-label={t("New folder")}+ className="rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ <FolderPlus size={13} strokeWidth={1.7} />+ </button>+ </Tooltip>+ <Tooltip label={t("Refresh")} side="top">+ <button+ type="button"+ onClick={() => void load(true)}+ aria-label={t("Refresh")}+ disabled={loading || busy}+ className="rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-40"+ >+ {loading ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <RefreshCw className="h-3 w-3" />+ )}+ </button>+ </Tooltip>+ <Tooltip label={t("Collapse")} side="top">+ <button+ type="button"+ onClick={onToggleCollapsed}+ aria-label={t("Collapse")}+ className="rounded-md p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ <PanelLeftClose size={12} strokeWidth={1.7} />+ </button>+ </Tooltip></div></div>diff --git a/web/components/knowledge/KbFilePreview.tsx b/web/components/knowledge/KbFilePreview.tsxindex 9d0b6aa93..c553aa64e 100644--- a/web/components/knowledge/KbFilePreview.tsx+++ b/web/components/knowledge/KbFilePreview.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import dynamic from "next/dynamic";import { useEffect, useMemo, useState } from "react";import { useTranslation } from "react-i18next";@@ -149,23 +150,24 @@ export default function KbFilePreview({<div className="flex h-full flex-col">{onToggleFileList && (<div className="flex items-center justify-end border-b border-[var(--border)] bg-[var(--card)]/40 px-3 py-1.5">- <button- type="button"- onClick={onToggleFileList}- title={+ <Tooltip label={fileListCollapsed ? t("Show file list") : t("Hide file list")- }- aria-label={- fileListCollapsed ? t("Show file list") : t("Hide file list")- }- className="flex h-7 w-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- {fileListCollapsed ? (- <PanelLeftOpen size={13} strokeWidth={1.7} />- ) : (- <PanelLeftClose size={13} strokeWidth={1.7} />- )}- </button>+ } side="top">+ <button+ type="button"+ onClick={onToggleFileList}+ aria-label={+ fileListCollapsed ? t("Show file list") : t("Hide file list")+ }+ className="flex h-7 w-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ {fileListCollapsed ? (+ <PanelLeftOpen size={13} strokeWidth={1.7} />+ ) : (+ <PanelLeftClose size={13} strokeWidth={1.7} />+ )}+ </button>+ </Tooltip></div>)}<div className="flex flex-1 flex-col items-center justify-center gap-3 px-6 py-12 text-center">@@ -213,23 +215,24 @@ export default function KbFilePreview({{/* Header */}<div className="flex items-center gap-2 border-b border-[var(--border)] bg-[var(--card)]/80 px-3 py-2">{onToggleFileList && !fullscreen && (- <button- type="button"- onClick={onToggleFileList}- title={- fileListCollapsed ? t("Show file list") : t("Hide file list")- }- aria-label={+ <Tooltip label={fileListCollapsed ? t("Show file list") : t("Hide file list")- }- className="flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- {fileListCollapsed ? (- <PanelLeftOpen size={13} strokeWidth={1.7} />- ) : (- <PanelLeftClose size={13} strokeWidth={1.7} />- )}- </button>+ } side="top">+ <button+ type="button"+ onClick={onToggleFileList}+ aria-label={+ fileListCollapsed ? t("Show file list") : t("Hide file list")+ }+ className="flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ {fileListCollapsed ? (+ <PanelLeftOpen size={13} strokeWidth={1.7} />+ ) : (+ <PanelLeftClose size={13} strokeWidth={1.7} />+ )}+ </button>+ </Tooltip>)}<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-[var(--muted)]/60"><HeaderIcon size={15} strokeWidth={1.6} className={spec.tint} />@@ -249,19 +252,20 @@ export default function KbFilePreview({</div>)}- <button- type="button"- onClick={() => setFullscreen((value) => !value)}- title={fullscreen ? t("Exit fullscreen") : t("Fullscreen")}- aria-label={fullscreen ? t("Exit fullscreen") : t("Fullscreen")}- className="flex h-7 w-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- {fullscreen ? (- <Minimize2 size={13} strokeWidth={1.7} />- ) : (- <Maximize2 size={13} strokeWidth={1.7} />- )}- </button>+ <Tooltip label={fullscreen ? t("Exit fullscreen") : t("Fullscreen")} side="top">+ <button+ type="button"+ onClick={() => setFullscreen((value) => !value)}+ aria-label={fullscreen ? t("Exit fullscreen") : t("Fullscreen")}+ className="flex h-7 w-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ {fullscreen ? (+ <Minimize2 size={13} strokeWidth={1.7} />+ ) : (+ <Maximize2 size={13} strokeWidth={1.7} />+ )}+ </button>+ </Tooltip>{previewUrl && (<>@@ -274,23 +278,24 @@ export default function KbFilePreview({><Download size={13} strokeWidth={1.7} /></a>- <button- type="button"- onClick={() => void handleCopy()}- title={t("Copy link")}- aria-label={t("Copy link")}- className="flex h-7 w-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- {copied ? (- <Check- size={13}- strokeWidth={1.7}- className="text-emerald-500"- />- ) : (- <Copy size={13} strokeWidth={1.7} />- )}- </button>+ <Tooltip label={t("Copy link")} side="top">+ <button+ type="button"+ onClick={() => void handleCopy()}+ aria-label={t("Copy link")}+ className="flex h-7 w-7 items-center justify-center rounded-md text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ {copied ? (+ <Check+ size={13}+ strokeWidth={1.7}+ className="text-emerald-500"+ />+ ) : (+ <Copy size={13} strokeWidth={1.7} />+ )}+ </button>+ </Tooltip></>)}</div>diff --git a/web/components/knowledge/KbGitHubSourcesSection.tsx b/web/components/knowledge/KbGitHubSourcesSection.tsxindex bf970008a..a2b9d1022 100644--- a/web/components/knowledge/KbGitHubSourcesSection.tsx+++ b/web/components/knowledge/KbGitHubSourcesSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";import { Github, Loader2, Plus, RefreshCw, Trash2 } from "lucide-react";@@ -305,14 +306,16 @@ function SourceCard({</p>)}</div>- <button- type="button"- onClick={onRemove}- title={t("Remove source")}- className="shrink-0 rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-red-600"- >- <Trash2 className="h-3.5 w-3.5" />- </button>+ <Tooltip label={t("Remove source")} side="top">+ <button+ type="button"+ onClick={onRemove}+ aria-label={t("Remove source")}+ className="shrink-0 rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-red-600"+ >+ <Trash2 className="h-3.5 w-3.5" />+ </button>+ </Tooltip></div>);}diff --git a/web/components/knowledge/KbIndexVersionsSection.tsx b/web/components/knowledge/KbIndexVersionsSection.tsxindex b58b6ccf3..087e84757 100644--- a/web/components/knowledge/KbIndexVersionsSection.tsx+++ b/web/components/knowledge/KbIndexVersionsSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useEffect, useState } from "react";import { useEmbeddingModels } from "@/hooks/useEmbeddingModels";import type { EmbeddingModelSelection } from "@/features/knowledge/model/types";@@ -210,11 +211,7 @@ export default function KbIndexVersionsSection({</div>{showReindexCta && (- <button- type="button"- onClick={handleReindex}- disabled={submitting || isReindexingHere}- title={+ <Tooltip label={isError? t("Retry indexing from the documents already stored in this knowledge base.",@@ -226,28 +223,33 @@ export default function KbIndexVersionsSection({? "Rebuild this PageIndex knowledge base. Existing index versions are preserved.": "Choose an embedding model to rebuild this knowledge base. Existing index versions are preserved.",)- }- className={`inline-flex shrink-0 items-center gap-1.5 rounded-md border px-2.5 py-1 text-[12px] font-medium transition-colors disabled:opacity-50 ${- isError- ? "border-red-200 bg-red-50 text-red-700 hover:bg-red-100 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300"- : "border-amber-300 bg-amber-50 text-amber-700 hover:bg-amber-100 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300"- }`}- >- {submitting || isReindexingHere ? (- <Loader2 className="h-3 w-3 animate-spin" />- ) : (- <RefreshCw className="h-3 w-3" />- )}- {isReindexingHere- ? isError- ? t("Retrying…")- : t("Re-indexing…")- : isError- ? t("Retry indexing")- : isEmptyEmbeddingKb- ? t("Change model")- : t("Re-index")}- </button>+ } side="top">+ <button+ type="button"+ onClick={handleReindex}+ disabled={submitting || isReindexingHere}+ className={`inline-flex shrink-0 items-center gap-1.5 rounded-md border px-2.5 py-1 text-[12px] font-medium transition-colors disabled:opacity-50 ${+ isError+ ? "border-red-200 bg-red-50 text-red-700 hover:bg-red-100 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300"+ : "border-amber-300 bg-amber-50 text-amber-700 hover:bg-amber-100 dark:border-amber-900 dark:bg-amber-950/30 dark:text-amber-300"+ }`}+ >+ {submitting || isReindexingHere ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <RefreshCw className="h-3 w-3" />+ )}+ {isReindexingHere+ ? isError+ ? t("Retrying…")+ : t("Re-indexing…")+ : isError+ ? t("Retry indexing")+ : isEmptyEmbeddingKb+ ? t("Change model")+ : t("Re-index")}+ </button>+ </Tooltip>)}</div>diff --git a/web/components/knowledge/KbLinkedFoldersSection.tsx b/web/components/knowledge/KbLinkedFoldersSection.tsxindex e6d4c9eac..dfd39e1cf 100644--- a/web/components/knowledge/KbLinkedFoldersSection.tsx+++ b/web/components/knowledge/KbLinkedFoldersSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useRef, useState } from "react";import {CheckCircle2,@@ -213,22 +214,24 @@ export default function KbLinkedFoldersSection({)}</p></div>- <button- type="button"- onClick={() => setLinkOpen(true)}- disabled={readOnly || activeSync}- className="inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-md bg-[var(--primary)] px-3 py-2 text-[12px] font-medium text-[var(--primary-foreground)] transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:cursor-not-allowed disabled:opacity-45"- title={- readOnly- ? t("Assigned knowledge bases are read-only.")- : activeSync- ? t("Wait for the current sync to finish.")- : undefined- }- >- <FolderSync className="h-3.5 w-3.5" />- {t("Link folder")}- </button>+ <Tooltip label={+ readOnly+ ? t("Assigned knowledge bases are read-only.")+ : activeSync+ ? t("Wait for the current sync to finish.")+ : t("Link folder")+ } side="top">+ <button+ type="button"+ onClick={() => setLinkOpen(true)}+ disabled={readOnly || activeSync}+ className="inline-flex min-h-9 shrink-0 items-center gap-1.5 rounded-md bg-[var(--primary)] px-3 py-2 text-[12px] font-medium text-[var(--primary-foreground)] transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:cursor-not-allowed disabled:opacity-45"+ aria-label={t("Link folder")}+ >+ <FolderSync className="h-3.5 w-3.5" />+ {t("Link folder")}+ </button>+ </Tooltip></div>{readOnly && (@@ -363,40 +366,42 @@ function LinkedFolderCard({</div><div className="flex shrink-0 flex-wrap items-center gap-1.5">- <button- type="button"- onClick={onSync}- disabled={actionDisabled}- className="inline-flex min-h-9 items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--card)] px-2.5 py-2 text-[11.5px] font-medium text-[var(--foreground)] transition-colors hover:bg-[var(--muted)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:cursor-not-allowed disabled:opacity-45"- title={+ <Tooltip label={readOnly? t("Assigned knowledge bases are read-only."): busy? t("Wait for the current sync to finish."): t("Check this folder for new or modified files")- }- >- {syncing ? (- <Loader2 className="h-3 w-3 animate-spin" />- ) : (- <RefreshCw className="h-3 w-3" />- )}- {syncing ? t("Syncing…") : t("Sync now")}- </button>- <button- type="button"- onClick={onUnlink}- disabled={actionDisabled}- aria-label={t("Unlink {{path}}", { path: folder.path })}- title={t("Unlink folder")}- className="inline-flex min-h-9 min-w-9 items-center justify-center rounded-md border border-transparent px-2 py-2 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:cursor-not-allowed disabled:opacity-45 dark:hover:bg-red-950/30"- >- {unlinking ? (- <Loader2 className="h-3.5 w-3.5 animate-spin" />- ) : (- <Trash2 className="h-3.5 w-3.5" />- )}- </button>+ } side="top">+ <button+ type="button"+ onClick={onSync}+ disabled={actionDisabled}+ className="inline-flex min-h-9 items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--card)] px-2.5 py-2 text-[11.5px] font-medium text-[var(--foreground)] transition-colors hover:bg-[var(--muted)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:cursor-not-allowed disabled:opacity-45"+ >+ {syncing ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <RefreshCw className="h-3 w-3" />+ )}+ {syncing ? t("Syncing…") : t("Sync now")}+ </button>+ </Tooltip>+ <Tooltip label={t("Unlink folder")} side="top">+ <button+ type="button"+ onClick={onUnlink}+ disabled={actionDisabled}+ aria-label={t("Unlink {{path}}", { path: folder.path })}+ className="inline-flex min-h-9 min-w-9 items-center justify-center rounded-md border border-transparent px-2 py-2 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-600 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:cursor-not-allowed disabled:opacity-45 dark:hover:bg-red-950/30"+ >+ {unlinking ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ <Trash2 className="h-3.5 w-3.5" />+ )}+ </button>+ </Tooltip></div></div>diff --git a/web/components/knowledge/KbUpdateHistory.tsx b/web/components/knowledge/KbUpdateHistory.tsxindex 4f29254df..d743994ee 100644--- a/web/components/knowledge/KbUpdateHistory.tsx+++ b/web/components/knowledge/KbUpdateHistory.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useState } from "react";import { useTranslation } from "react-i18next";import {@@ -40,15 +41,16 @@ export default function KbUpdateHistory({{entries.length}</span></div>- <button- type="button"- onClick={onClear}- title={t("Clear history")}- className="flex h-6 w-6 items-center justify-center rounded text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- aria-label={t("Clear history")}- >- <Trash2 className="h-3 w-3" />- </button>+ <Tooltip label={t("Clear history")} side="top">+ <button+ type="button"+ onClick={onClear}+ className="flex h-6 w-6 items-center justify-center rounded text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ aria-label={t("Clear history")}+ >+ <Trash2 className="h-3 w-3" />+ </button>+ </Tooltip></div><ul className="divide-y divide-[var(--border)] rounded-lg border border-[var(--border)]">diff --git a/web/components/knowledge/KbWebSourcesSection.tsx b/web/components/knowledge/KbWebSourcesSection.tsxindex 1198eaff2..31fb26e51 100644--- a/web/components/knowledge/KbWebSourcesSection.tsx+++ b/web/components/knowledge/KbWebSourcesSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useState } from "react";import { useTranslation } from "react-i18next";import {@@ -439,37 +440,40 @@ function WebSourceCard({</div><div className="flex shrink-0 items-center gap-1">{job?.state === "running" || job?.state === "pending" ? (- <button- type="button"- onClick={onCancel}- disabled={busy}- title={t("Cancel sync")}- aria-label={t("Cancel sync")}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-red-600 disabled:opacity-50"- >- <Ban className="h-3.5 w-3.5" />- </button>+ <Tooltip label={t("Cancel sync")} side="top">+ <button+ type="button"+ onClick={onCancel}+ disabled={busy}+ aria-label={t("Cancel sync")}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-red-600 disabled:opacity-50"+ >+ <Ban className="h-3.5 w-3.5" />+ </button>+ </Tooltip>) : (+ <Tooltip label={t("Retry sync")} side="top">+ <button+ type="button"+ onClick={onRetry}+ disabled={busy || !source.enabled || !source.auto_sync_enabled}+ aria-label={t("Retry sync")}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-50"+ >+ <RotateCcw className="h-3.5 w-3.5" />+ </button>+ </Tooltip>+ )}+ <Tooltip label={t("Remove source")} side="top"><buttontype="button"- onClick={onRetry}- disabled={busy || !source.enabled || !source.auto_sync_enabled}- title={t("Retry sync")}- aria-label={t("Retry sync")}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-50"+ onClick={onRemove}+ aria-label={t("Remove source")}+ className="shrink-0 rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-red-600">- <RotateCcw className="h-3.5 w-3.5" />+ <Trash2 className="h-3.5 w-3.5" /></button>- )}- <button- type="button"- onClick={onRemove}- title={t("Remove source")}- aria-label={t("Remove source")}- className="shrink-0 rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-red-600"- >- <Trash2 className="h-3.5 w-3.5" />- </button>+ </Tooltip></div></div>);diff --git a/web/components/knowledge/KnowledgeBaseDetail.tsx b/web/components/knowledge/KnowledgeBaseDetail.tsxindex 7ac795719..5e363bdd4 100644--- a/web/components/knowledge/KnowledgeBaseDetail.tsx+++ b/web/components/knowledge/KnowledgeBaseDetail.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { knowledgeBaseRef } from "@/lib/knowledge-helpers";import type { EmbeddingModelSelection } from "@/features/knowledge/model/types";@@ -252,28 +253,29 @@ export default function KnowledgeBaseDetail({</div></div>{canRetry && (- <button- type="button"- onClick={handleRetry}- disabled={retrySubmitting || isReindexingLocally}- title={t(+ <Tooltip label={t("Retry indexing from the documents already stored in this knowledge base.",- )}- className="inline-flex shrink-0 items-center gap-1.5 rounded-md border border-red-200 bg-red-50 px-2.5 py-1 text-[12px] font-medium text-red-700 transition-colors hover:bg-red-100 disabled:opacity-50 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300"- >- {retrySubmitting || isReindexingLocally ? (- <Loader2 className="h-3 w-3 animate-spin" />- ) : (- <RefreshCw className="h-3 w-3" />- )}- {retrySubmitting || isReindexingLocally- ? t("Retrying…")- : t(- kbProvider(kb) === "lightrag"- ? "Review rebuild"- : "Retry indexing",- )}- </button>+ )} side="top">+ <button+ type="button"+ onClick={handleRetry}+ disabled={retrySubmitting || isReindexingLocally}+ className="inline-flex shrink-0 items-center gap-1.5 rounded-md border border-red-200 bg-red-50 px-2.5 py-1 text-[12px] font-medium text-red-700 transition-colors hover:bg-red-100 disabled:opacity-50 dark:border-red-900 dark:bg-red-950/30 dark:text-red-300"+ >+ {retrySubmitting || isReindexingLocally ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <RefreshCw className="h-3 w-3" />+ )}+ {retrySubmitting || isReindexingLocally+ ? t("Retrying…")+ : t(+ kbProvider(kb) === "lightrag"+ ? "Review rebuild"+ : "Retry indexing",+ )}+ </button>+ </Tooltip>)}</div>diff --git a/web/components/memory/MemoryRunPanel.tsx b/web/components/memory/MemoryRunPanel.tsxindex 9cbd93e8f..8b8acf7b7 100644--- a/web/components/memory/MemoryRunPanel.tsx+++ b/web/components/memory/MemoryRunPanel.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import {AlertCircle,@@ -270,37 +271,43 @@ export default function MemoryRunPanel({<div className="flex items-center gap-1">{run && events.length > 0 && (<>- <button- type="button"- onClick={handleUndo}- disabled={isRunning || undoDepth <= 0}- className="inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-40"- title={t("Undo last memory edit")}- >- <Undo2 className="h-3 w-3" />- {undoDepth > 0 && <span>{undoDepth}</span>}- </button>- <button- type="button"- onClick={clear}- disabled={isRunning}- className="inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-40"- title={t("Clear trace")}- >- <Trash2 className="h-3 w-3" />- </button>+ <Tooltip label={t("Undo last memory edit")} side="top">+ <button+ type="button"+ onClick={handleUndo}+ disabled={isRunning || undoDepth <= 0}+ className="inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-40"+ aria-label={t("Undo last memory edit")}+ >+ <Undo2 className="h-3 w-3" />+ {undoDepth > 0 && <span>{undoDepth}</span>}+ </button>+ </Tooltip>+ <Tooltip label={t("Clear trace")} side="top">+ <button+ type="button"+ onClick={clear}+ disabled={isRunning}+ className="inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[11px] text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-40"+ aria-label={t("Clear trace")}+ >+ <Trash2 className="h-3 w-3" />+ </button>+ </Tooltip></>)}- <button- type="button"- onClick={() => void handleReset()}- disabled={isRunning}- className="inline-flex items-center gap-1 rounded-md border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[11px] font-medium text-amber-700 hover:bg-amber-500/20 hover:text-amber-800 disabled:opacity-40 dark:text-amber-300 dark:hover:text-amber-200"- title={t("Reset memory (delete md + seen-id state)")}- >- <RotateCcw className="h-3 w-3" />- <span>{t("Reset")}</span>- </button>+ <Tooltip label={t("Reset memory (delete md + seen-id state)")} side="top">+ <button+ type="button"+ onClick={() => void handleReset()}+ disabled={isRunning}+ className="inline-flex items-center gap-1 rounded-md border border-amber-500/40 bg-amber-500/10 px-2 py-0.5 text-[11px] font-medium text-amber-700 hover:bg-amber-500/20 hover:text-amber-800 disabled:opacity-40 dark:text-amber-300 dark:hover:text-amber-200"+ aria-label={t("Reset memory (delete md + seen-id state)")}+ >+ <RotateCcw className="h-3 w-3" />+ <span>{t("Reset")}</span>+ </button>+ </Tooltip></div></header>@@ -357,23 +364,27 @@ export default function MemoryRunPanel({t={t}/>{isRunning ? (- <button- type="button"- onClick={() => void cancel()}- className="inline-flex h-7 w-9 items-center justify-center rounded-full bg-[var(--muted)] text-[var(--foreground)] transition hover:opacity-90"- title={t("Cancel")}- >- <Octagon className="h-3.5 w-3.5" />- </button>+ <Tooltip label={t("Cancel")} side="top">+ <button+ type="button"+ onClick={() => void cancel()}+ className="inline-flex h-7 w-9 items-center justify-center rounded-full bg-[var(--muted)] text-[var(--foreground)] transition hover:opacity-90"+ aria-label={t("Cancel")}+ >+ <Octagon className="h-3.5 w-3.5" />+ </button>+ </Tooltip>) : (- <button- type="button"- onClick={handleRun}- className="inline-flex h-7 w-9 items-center justify-center rounded-full bg-[var(--primary)] text-[var(--primary-foreground)] transition hover:opacity-90"- title={t("Run")}- >- <Send className="h-3.5 w-3.5" />- </button>+ <Tooltip label={t("Run")} side="top">+ <button+ type="button"+ onClick={handleRun}+ className="inline-flex h-7 w-9 items-center justify-center rounded-full bg-[var(--primary)] text-[var(--primary-foreground)] transition hover:opacity-90"+ aria-label={t("Run")}+ >+ <Send className="h-3.5 w-3.5" />+ </button>+ </Tooltip>)}</div></div>@@ -860,25 +871,26 @@ function ModelPill({const inactive = disabled || loading || error || options.length === 0;return (- <div ref={rootRef} className="relative w-full min-w-0">- <button- type="button"- disabled={inactive}- onClick={() => setOpen(!open)}- title={+ <div ref={rootRef} className="relative w-full min-w-0 [&>span]:w-full">+ <Tooltip label={selectedOption? `${selectedOption.profile_name} | ${selectedOption.provider}`: label- }- className={- "flex w-full min-w-0 items-center gap-1 rounded-full border border-[var(--border)] bg-[var(--background)] px-2.5 py-1 text-[11.5px] text-[var(--foreground)] transition hover:bg-[var(--muted)]/60 disabled:opacity-50 " +- (open ? "border-[var(--primary)]/40" : "")- }- >- <Bot className="h-3 w-3 shrink-0 text-[var(--muted-foreground)]" />- <span className="flex-1 truncate text-left">{label}</span>- <ChevronDown className="h-3 w-3 shrink-0 text-[var(--muted-foreground)]" />- </button>+ } side="top">+ <button+ type="button"+ disabled={inactive}+ onClick={() => setOpen(!open)}+ className={+ "flex w-full min-w-0 items-center gap-1 rounded-full border border-[var(--border)] bg-[var(--background)] px-2.5 py-1 text-[11.5px] text-[var(--foreground)] transition hover:bg-[var(--muted)]/60 disabled:opacity-50 " ++ (open ? "border-[var(--primary)]/40" : "")+ }+ >+ <Bot className="h-3 w-3 shrink-0 text-[var(--muted-foreground)]" />+ <span className="flex-1 truncate text-left">{label}</span>+ <ChevronDown className="h-3 w-3 shrink-0 text-[var(--muted-foreground)]" />+ </button>+ </Tooltip>{open && !inactive && (<div className="absolute right-0 top-full z-30 mt-1 max-h-72 w-[min(320px,calc(100vw-32px))] overflow-y-auto rounded-xl border border-[var(--border)] bg-[var(--card)] p-1 shadow-lg">diff --git a/web/components/memory/MemorySection.tsx b/web/components/memory/MemorySection.tsxindex d6a4d9d88..16accee4c 100644--- a/web/components/memory/MemorySection.tsx+++ b/web/components/memory/MemorySection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { browserStorage } from "@/shared/storage";import dynamic from "next/dynamic";@@ -610,29 +611,30 @@ function TabStrip({ tab, onChange, l2Count, l3Count, t }: TabStripProps) {{tabs.map(({ key, label, count, hint }) => {const active = tab === key;return (- <button- key={key}- onClick={() => onChange(key)}- title={hint}- className={`relative px-4 py-2 text-[13px] font-medium transition-colors ${- active- ? "text-[var(--foreground)]"- : "text-[var(--muted-foreground)] hover:text-[var(--foreground)]"- }`}- >- {label}- {typeof count === "number" && (- <span className="ml-2 rounded-full bg-[var(--muted)] px-1.5 py-0.5 text-[10px] font-normal text-[var(--muted-foreground)]">- {count}- </span>- )}- {active && (- <span- aria-hidden- className="absolute -bottom-px left-0 right-0 h-[2px] bg-[var(--foreground)]"- />- )}- </button>+ <Tooltip key={key} label={hint} side="top">+ <button+ onClick={() => onChange(key)}+ aria-label={label}+ className={`relative px-4 py-2 text-[13px] font-medium transition-colors ${+ active+ ? "text-[var(--foreground)]"+ : "text-[var(--muted-foreground)] hover:text-[var(--foreground)]"+ }`}+ >+ {label}+ {typeof count === "number" && (+ <span className="ml-2 rounded-full bg-[var(--muted)] px-1.5 py-0.5 text-[10px] font-normal text-[var(--muted-foreground)]">+ {count}+ </span>+ )}+ {active && (+ <span+ aria-hidden+ className="absolute -bottom-px left-0 right-0 h-[2px] bg-[var(--foreground)]"+ />+ )}+ </button>+ </Tooltip>);})}</div>@@ -822,19 +824,20 @@ export function L1View({{t("{{n}} pending", { n: pendingCount })}</span>)}- <button- onClick={() => void onRefresh()}- disabled={refreshing}- className="inline-flex items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--card)] px-2.5 py-1 text-[12px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] disabled:opacity-50"- title={t("Re-scan workspace and record any changes")}- >- {refreshing ? (- <Loader2 className="h-3 w-3 animate-spin" />- ) : (- <RefreshCw className="h-3 w-3" />- )}- {t("Refresh")}- </button>+ <Tooltip label={t("Re-scan workspace and record any changes")} side="top">+ <button+ onClick={() => void onRefresh()}+ disabled={refreshing}+ className="inline-flex items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--card)] px-2.5 py-1 text-[12px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] disabled:opacity-50"+ >+ {refreshing ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <RefreshCw className="h-3 w-3" />+ )}+ {t("Refresh")}+ </button>+ </Tooltip></div></div>)}@@ -853,19 +856,20 @@ export function L1View({{t("{{n}} pending", { n: pendingCount })}</span>)}- <button- onClick={() => void onRefresh()}- disabled={refreshing}- className="inline-flex items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--card)] px-2.5 py-1 text-[12px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] disabled:opacity-50"- title={t("Re-scan workspace and record any changes")}- >- {refreshing ? (- <Loader2 className="h-3 w-3 animate-spin" />- ) : (- <RefreshCw className="h-3 w-3" />- )}- {t("Refresh")}- </button>+ <Tooltip label={t("Re-scan workspace and record any changes")} side="top">+ <button+ onClick={() => void onRefresh()}+ disabled={refreshing}+ className="inline-flex items-center gap-1.5 rounded-md border border-[var(--border)] bg-[var(--card)] px-2.5 py-1 text-[12px] text-[var(--muted-foreground)] hover:text-[var(--foreground)] disabled:opacity-50"+ >+ {refreshing ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <RefreshCw className="h-3 w-3" />+ )}+ {t("Refresh")}+ </button>+ </Tooltip></div>)}</div>diff --git a/web/components/notebook/NotebookConsole.tsx b/web/components/notebook/NotebookConsole.tsxindex d0321c453..ab7cba871 100644--- a/web/components/notebook/NotebookConsole.tsx+++ b/web/components/notebook/NotebookConsole.tsx@@ -273,15 +273,17 @@ export default function NotebookConsole({{scopedNotebooks.length}</span></h1>- <button- type="button"- onClick={() => setCreating((v) => !v)}- title={t("New notebook")}- aria-expanded={creating}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- >- <Plus size={15} />- </button>+ <Tooltip label={t("New notebook")} side="top">+ <button+ type="button"+ onClick={() => setCreating((v) => !v)}+ aria-label={t("New notebook")}+ aria-expanded={creating}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ >+ <Plus size={15} />+ </button>+ </Tooltip></div>{creating && (diff --git a/web/components/notebook/NotebookRecordRow.tsx b/web/components/notebook/NotebookRecordRow.tsxindex cf19206a3..4dbbf53ac 100644--- a/web/components/notebook/NotebookRecordRow.tsx+++ b/web/components/notebook/NotebookRecordRow.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import dynamic from "next/dynamic";import { useEffect, useState } from "react";import {@@ -254,19 +255,20 @@ export default function NotebookRecordRow({{timestamp}</span>- <button- type="button"- disabled={busy}- aria-label={t("Edit record")}- title={t("Edit record")}- onClick={() => {- if (!expanded) onToggle();- startEditing();- }}- className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-lg text-[var(--muted-foreground)] opacity-60 transition-[background-color,color,opacity,transform] duration-150 active:scale-[0.97] hover:bg-[var(--muted)] hover:text-[var(--foreground)] hover:opacity-100 focus-visible:bg-[var(--muted)] focus-visible:text-[var(--foreground)] focus-visible:opacity-100 focus-visible:outline-none disabled:opacity-30"- >- <Pencil size={14} />- </button>+ <Tooltip label={t("Edit record")} side="top">+ <button+ type="button"+ disabled={busy}+ aria-label={t("Edit record")}+ onClick={() => {+ if (!expanded) onToggle();+ startEditing();+ }}+ className="inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-lg text-[var(--muted-foreground)] opacity-60 transition-[background-color,color,opacity,transform] duration-150 active:scale-[0.97] hover:bg-[var(--muted)] hover:text-[var(--foreground)] hover:opacity-100 focus-visible:bg-[var(--muted)] focus-visible:text-[var(--foreground)] focus-visible:opacity-100 focus-visible:outline-none disabled:opacity-30"+ >+ <Pencil size={14} />+ </button>+ </Tooltip><NotebookRecordActionstargets={moveTargets}diff --git a/web/components/settings/CodeBuddyAuthCard.tsx b/web/components/settings/CodeBuddyAuthCard.tsxindex 254de8be9..172448677 100644--- a/web/components/settings/CodeBuddyAuthCard.tsx+++ b/web/components/settings/CodeBuddyAuthCard.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import {CheckCircle2,ExternalLink,@@ -114,16 +115,17 @@ export function CodeBuddyAuthCard() {{t("codebuddy.auth.description")}</p></div>- <button- type="button"- onClick={() => void refresh()}- disabled={loading || working}- className="rounded-md p-1.5 text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-40"- title={t("codebuddy.auth.checkAgain")}- aria-label={t("codebuddy.auth.checkAgain")}- >- <RefreshCw className={`h-4 w-4 ${loading ? "animate-spin" : ""}`} />- </button>+ <Tooltip label={t("codebuddy.auth.checkAgain")} side="top">+ <button+ type="button"+ onClick={() => void refresh()}+ disabled={loading || working}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)] disabled:opacity-40"+ aria-label={t("codebuddy.auth.checkAgain")}+ >+ <RefreshCw className={`h-4 w-4 ${loading ? "animate-spin" : ""}`} />+ </button>+ </Tooltip></div><div className="mt-3 flex flex-wrap items-center gap-2">diff --git a/web/components/settings/ModelsWorkspace.tsx b/web/components/settings/ModelsWorkspace.tsxindex fc1f9d2ad..b04abdc4e 100644--- a/web/components/settings/ModelsWorkspace.tsx+++ b/web/components/settings/ModelsWorkspace.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { stageRegistryAction, type RegistryEdit } from "@/lib/provider-registry";import { useEffect, useId, useRef, useState } from "react";import Link from "next/link";@@ -788,16 +789,17 @@ function ModelEditor({{active && <Check size={13} />}{" "}{t(active ? "Default model" : "Set as default")}</button>- <button- type="button"- aria-label={t("Remove model")}- disabled={applying || managed || assignedToTask}- title={assignedToTask ? t("Choose another background task model before removing this model.") : undefined}- onClick={() => void remove()}- className={`${registryDanger} ml-auto`}- >- <Trash2 size={14} />- </button>+ <Tooltip label={assignedToTask ? t("Choose another background task model before removing this model.") : t("Remove model")} side="top">+ <button+ type="button"+ aria-label={t("Remove model")}+ disabled={applying || managed || assignedToTask}+ onClick={() => void remove()}+ className={`${registryDanger} ml-auto`}+ >+ <Trash2 size={14} />+ </button>+ </Tooltip></div></div></section>diff --git a/web/components/settings/ProvidersWorkspace.tsx b/web/components/settings/ProvidersWorkspace.tsxindex 657368d7d..737d5e071 100644--- a/web/components/settings/ProvidersWorkspace.tsx+++ b/web/components/settings/ProvidersWorkspace.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { stageRegistryAction, type RegistryEdit } from "@/lib/provider-registry";import { useEffect, useRef, useState } from "react";import Link from "next/link";@@ -387,27 +388,27 @@ export function ProvidersWorkspace() {)}<div className="flex flex-wrap items-center gap-2 border-t border-[var(--border)] pt-4">- <button- type="button"- disabled={- applying || providerUsage(draft, source) > 0 || managed- }- title={+ <Tooltip label={providerUsage(draft, source)- ? t(- "Change or remove the models using this provider first.",- )- : undefined- }- onClick={async () => {- await stageRegistry({ kind: "provider", ref: source.ref, delete: true });- setSelected(null);- }}- className={`${registryDanger} ml-auto`}- >- <Trash2 size={13} />- {t("Remove provider")}- </button>+ ? t("Change or remove the models using this provider first.")+ : t("Remove provider")+ } side="top">+ <button+ type="button"+ disabled={+ applying || providerUsage(draft, source) > 0 || managed+ }+ aria-label={t("Remove provider")}+ onClick={async () => {+ await stageRegistry({ kind: "provider", ref: source.ref, delete: true });+ setSelected(null);+ }}+ className={`${registryDanger} ml-auto`}+ >+ <Trash2 size={13} />+ {t("Remove provider")}+ </button>+ </Tooltip></div>{source && (<div className="flex flex-wrap gap-2 border-t border-[var(--border)] pt-4">diff --git a/web/components/settings/RegistryControls.tsx b/web/components/settings/RegistryControls.tsxindex 5c969feaa..b5697b65f 100644--- a/web/components/settings/RegistryControls.tsx+++ b/web/components/settings/RegistryControls.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { type KeyboardEvent, useEffect, useId, useRef, useState } from "react";import { Check, ChevronDown, Loader2, Pencil, PlugZap, X } from "lucide-react";import { useTranslation } from "react-i18next";@@ -57,17 +58,18 @@ export function EditableRegistryName({>{name}</h3>- <button- type="button"- aria-label={label}- title={label}- onClick={() => {- setEditing(true);- }}- className="shrink-0 rounded-md p-2 text-[var(--muted-foreground)] hover:bg-[var(--accent)] hover:text-[var(--foreground)]"- >- <Pencil size={14} />- </button>+ <Tooltip label={label} side="top">+ <button+ type="button"+ aria-label={label}+ onClick={() => {+ setEditing(true);+ }}+ className="shrink-0 rounded-md p-2 text-[var(--muted-foreground)] hover:bg-[var(--accent)] hover:text-[var(--foreground)]"+ >+ <Pencil size={14} />+ </button>+ </Tooltip></div>);}diff --git a/web/components/settings/ServiceConfigEditor.tsx b/web/components/settings/ServiceConfigEditor.tsxindex aa0bc74de..8344bbde7 100644--- a/web/components/settings/ServiceConfigEditor.tsx+++ b/web/components/settings/ServiceConfigEditor.tsx@@ -1716,21 +1716,22 @@ function ProfileFields({}placeholder="sk-..."/>- <button- type="button"- onClick={() => setShowApiKey((prev) => !prev)}- className="absolute right-1 top-1/2 -translate-y-1/2 rounded-md p-1.5 text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- aria-label={- showApiKey ? t("Hide API key") : t("Show API key")- }- title={showApiKey ? t("Hide API key") : t("Show API key")}- >- {showApiKey ? (- <EyeOff className="h-4 w-4" />- ) : (- <Eye className="h-4 w-4" />- )}- </button>+ <span className="absolute right-1 top-1/2 -translate-y-1/2">+ <Tooltip label={showApiKey ? t("Hide API key") : t("Show API key")} side="top">+ <button+ type="button"+ onClick={() => setShowApiKey((prev) => !prev)}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ aria-label={showApiKey ? t("Hide API key") : t("Show API key")}+ >+ {showApiKey ? (+ <EyeOff className="h-4 w-4" />+ ) : (+ <Eye className="h-4 w-4" />+ )}+ </button>+ </Tooltip>+ </span></div></div>)}diff --git a/web/components/settings/SettingsToolbar.tsx b/web/components/settings/SettingsToolbar.tsxindex b0ae02d00..8b1a0d94e 100644--- a/web/components/settings/SettingsToolbar.tsx+++ b/web/components/settings/SettingsToolbar.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { Loader2, Save, Undo2, Check } from "lucide-react";import { useTranslation } from "react-i18next";import { useSettings } from "@/features/settings/store/SettingsStore";@@ -52,20 +53,21 @@ export function SettingsToolbar() {<Undo2 size={14} />{t("Discard")}</button>- <button- type="button"- onClick={() => void saveDraft()}- disabled={busy || draftState !== "unsaved"}- title={t("Store these changes without putting them into effect.")}- className="inline-flex items-center gap-1.5 rounded-lg border border-[var(--border)] px-3 py-2 text-xs disabled:opacity-40"- >- {saving ? (- <Loader2 size={14} className="animate-spin" />- ) : (- <Save size={14} />- )}- {t("Save draft")}- </button>+ <Tooltip label={t("Store these changes without putting them into effect.")} side="top">+ <button+ type="button"+ onClick={() => void saveDraft()}+ disabled={busy || draftState !== "unsaved"}+ className="inline-flex items-center gap-1.5 rounded-lg border border-[var(--border)] px-3 py-2 text-xs disabled:opacity-40"+ >+ {saving ? (+ <Loader2 size={14} className="animate-spin" />+ ) : (+ <Save size={14} />+ )}+ {t("Save draft")}+ </button>+ </Tooltip><buttontype="button"onClick={applyCatalog}diff --git a/web/components/space/ArchivedConversations.tsx b/web/components/space/ArchivedConversations.tsxindex 61992b5b3..c712d7251 100644--- a/web/components/space/ArchivedConversations.tsx+++ b/web/components/space/ArchivedConversations.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import {ArchiveRestore,BookText,@@ -76,7 +77,7 @@ export default function ArchivedConversations({disabled={disabled}onClick={() => onOpen(session.session_id)}className="min-w-0 flex-1 px-1 text-left"- title={t("Open")}+><divclassName={`truncate text-[13px] font-medium text-[var(--foreground)] ${@@ -95,20 +96,21 @@ export default function ArchivedConversations({</p></button>{onDelete && (- <button- type="button"- onClick={() => onDelete(session.session_id)}- disabled={disabled || busy || deletingId === session.session_id}- aria-label={t("Delete permanently")}- title={t("Delete permanently")}- className="shrink-0 rounded-lg p-2 text-[var(--muted-foreground)] hover:bg-red-500/10 hover:text-red-600 disabled:opacity-50"- >- {deletingId === session.session_id ? (- <Loader2 size={15} className="animate-spin" />- ) : (- <Trash2 size={15} />- )}- </button>+ <Tooltip label={t("Delete permanently")} side="top">+ <button+ type="button"+ onClick={() => onDelete(session.session_id)}+ disabled={disabled || busy || deletingId === session.session_id}+ aria-label={t("Delete permanently")}+ className="shrink-0 rounded-lg p-2 text-[var(--muted-foreground)] hover:bg-red-500/10 hover:text-red-600 disabled:opacity-50"+ >+ {deletingId === session.session_id ? (+ <Loader2 size={15} className="animate-spin" />+ ) : (+ <Trash2 size={15} />+ )}+ </button>+ </Tooltip>)}<buttontype="button"diff --git a/web/components/space/MyAgentsSection.tsx b/web/components/space/MyAgentsSection.tsxindex 8695edbe9..e36082246 100644--- a/web/components/space/MyAgentsSection.tsx+++ b/web/components/space/MyAgentsSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { useRouter } from "next/navigation";import {@@ -477,38 +478,40 @@ function AgentCard({</div><div className="flex shrink-0 items-center gap-1">- <button- type="button"- onClick={(event) => {- event.stopPropagation();- onRefresh();- }}- disabled={refreshing}- title={t("Refresh history")}- aria-label={t("Refresh history")}- className="rounded-lg border border-[var(--border)]/50 p-2 text-[var(--muted-foreground)] transition-colors hover:border-[var(--border)] hover:text-[var(--foreground)] disabled:opacity-50"- >- {refreshing ? (- <Loader2 className="h-3.5 w-3.5 animate-spin" />- ) : (- <RefreshCw className="h-3.5 w-3.5" />- )}- </button>- <div ref={menuRef} className="relative">+ <Tooltip label={t("Refresh history")} side="top"><buttontype="button"onClick={(event) => {event.stopPropagation();- setMenuOpen((v) => !v);+ onRefresh();}}- title={t("More")}- aria-label={t("More")}- aria-haspopup="menu"- aria-expanded={menuOpen}- className="rounded-lg border border-[var(--border)]/50 p-2 text-[var(--muted-foreground)] transition-colors hover:border-[var(--border)] hover:text-[var(--foreground)]"+ disabled={refreshing}+ aria-label={t("Refresh history")}+ className="rounded-lg border border-[var(--border)]/50 p-2 text-[var(--muted-foreground)] transition-colors hover:border-[var(--border)] hover:text-[var(--foreground)] disabled:opacity-50">- <MoreHorizontal className="h-3.5 w-3.5" />+ {refreshing ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ <RefreshCw className="h-3.5 w-3.5" />+ )}</button>+ </Tooltip>+ <div ref={menuRef} className="relative">+ <Tooltip label={t("More")} side="top">+ <button+ type="button"+ onClick={(event) => {+ event.stopPropagation();+ setMenuOpen((v) => !v);+ }}+ aria-label={t("More")}+ aria-haspopup="menu"+ aria-expanded={menuOpen}+ className="rounded-lg border border-[var(--border)]/50 p-2 text-[var(--muted-foreground)] transition-colors hover:border-[var(--border)] hover:text-[var(--foreground)]"+ >+ <MoreHorizontal className="h-3.5 w-3.5" />+ </button>+ </Tooltip>{menuOpen && (<divrole="menu"diff --git a/web/components/space/PersonasSection.tsx b/web/components/space/PersonasSection.tsxindex 14429320a..4543c44a1 100644--- a/web/components/space/PersonasSection.tsx+++ b/web/components/space/PersonasSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useState } from "react";import dynamic from "next/dynamic";import { useTranslation } from "react-i18next";@@ -345,31 +346,35 @@ export default function PersonasSection() {</span>) : (<div className="flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100">- <button- onClick={(e) => {- e.stopPropagation();- void openEdit(persona.name);- }}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- title={t("Edit")}- >- <Pencil size={13} />- </button>- <button- onClick={(e) => {- e.stopPropagation();- void handleDelete(persona.name);- }}- disabled={deleting === persona.name}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-600 disabled:opacity-50 dark:hover:bg-red-950/30"- title={t("Delete")}- >- {deleting === persona.name ? (- <Loader2 size={13} className="animate-spin" />- ) : (- <Trash2 size={13} />- )}- </button>+ <Tooltip label={t("Edit")} side="top">+ <button+ onClick={(e) => {+ e.stopPropagation();+ void openEdit(persona.name);+ }}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ aria-label={t("Edit")}+ >+ <Pencil size={13} />+ </button>+ </Tooltip>+ <Tooltip label={t("Delete")} side="top">+ <button+ onClick={(e) => {+ e.stopPropagation();+ void handleDelete(persona.name);+ }}+ disabled={deleting === persona.name}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-600 disabled:opacity-50 dark:hover:bg-red-950/30"+ aria-label={t("Delete")}+ >+ {deleting === persona.name ? (+ <Loader2 size={13} className="animate-spin" />+ ) : (+ <Trash2 size={13} />+ )}+ </button>+ </Tooltip></div>)}</div>@@ -416,7 +421,7 @@ export default function PersonasSection() {void openEdit(name);}}className="inline-flex items-center gap-1 rounded-md px-2 py-1 text-[12px] text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- title={t("Edit")}+><Pencil size={12} />{t("Edit")}diff --git a/web/components/space/SkillsSection.tsx b/web/components/space/SkillsSection.tsxindex 0f7e43b6b..8ac8dfbfd 100644--- a/web/components/space/SkillsSection.tsx+++ b/web/components/space/SkillsSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { resourceUsage } from "@/lib/workspaces-api";import { useCallback, useEffect, useMemo, useState } from "react";import dynamic from "next/dynamic";@@ -499,22 +500,26 @@ export default function SkillsSection() {</span>)}<div className="flex items-center gap-1">- <button- onClick={() =>- setRenamingTag({ original: tag, value: tag })- }- className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- title={t("Rename")}- >- <Pencil size={12} />- </button>- <button- onClick={() => void handleDeleteTag(tag)}- className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-500 dark:hover:bg-red-950/30"- title={t("Delete")}- >- <Trash2 size={12} />- </button>+ <Tooltip label={t("Rename")} side="top">+ <button+ onClick={() =>+ setRenamingTag({ original: tag, value: tag })+ }+ className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ aria-label={t("Rename")}+ >+ <Pencil size={12} />+ </button>+ </Tooltip>+ <Tooltip label={t("Delete")} side="top">+ <button+ onClick={() => void handleDeleteTag(tag)}+ className="rounded p-1 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-500 dark:hover:bg-red-950/30"+ aria-label={t("Delete")}+ >+ <Trash2 size={12} />+ </button>+ </Tooltip></div></div>))}@@ -667,31 +672,35 @@ export default function SkillsSection() {</span>) : (<div className="flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100">- <button- onClick={(e) => {- e.stopPropagation();- void openEdit(skill.name);- }}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- title={t("Edit")}- >- <Pencil size={13} />- </button>- <button- onClick={(e) => {- e.stopPropagation();- void handleDelete(skill.name);- }}- disabled={deleting === skill.name}- className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-600 disabled:opacity-50 dark:hover:bg-red-950/30"- title={t("Delete")}- >- {deleting === skill.name ? (- <Loader2 size={13} className="animate-spin" />- ) : (- <Trash2 size={13} />- )}- </button>+ <Tooltip label={t("Edit")} side="top">+ <button+ onClick={(e) => {+ e.stopPropagation();+ void openEdit(skill.name);+ }}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"+ aria-label={t("Edit")}+ >+ <Pencil size={13} />+ </button>+ </Tooltip>+ <Tooltip label={t("Delete")} side="top">+ <button+ onClick={(e) => {+ e.stopPropagation();+ void handleDelete(skill.name);+ }}+ disabled={deleting === skill.name}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-red-50 hover:text-red-600 disabled:opacity-50 dark:hover:bg-red-950/30"+ aria-label={t("Delete")}+ >+ {deleting === skill.name ? (+ <Loader2 size={13} className="animate-spin" />+ ) : (+ <Trash2 size={13} />+ )}+ </button>+ </Tooltip></div>)}</div>@@ -763,7 +772,7 @@ export default function SkillsSection() {void openEdit(name);}}className="inline-flex items-center gap-1 rounded-md px-2 py-1 text-[12px] text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)]"- title={t("Edit")}+><Pencil size={12} />{t("Edit")}diff --git a/web/components/workspaces/WorkspaceChatGroups.tsx b/web/components/workspaces/WorkspaceChatGroups.tsxindex c32e9f453..38ceaa6f0 100644--- a/web/components/workspaces/WorkspaceChatGroups.tsx+++ b/web/components/workspaces/WorkspaceChatGroups.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useState } from "react";import { ChevronDown, Folder, Plus } from "lucide-react";import { useTranslation } from "react-i18next";@@ -135,18 +136,19 @@ function WorkspaceGroup({{/* Starting a conversation here is the workspace's own action, so itlives on its row — revealed on hover, like every other row action inthis column, rather than parked beside the title at all times. */}- <button- type="button"- aria-label={t("New chat in {{name}}", {- name: workspace.display_name,- })}- title={t("New chat in {{name}}", { name: workspace.display_name })}- onClick={() => props.onNewChat(workspace.workspace_id)}- disabled={workspace.status !== "ready"}- className="shrink-0 rounded-md p-1 text-[var(--muted-foreground)] opacity-100 transition-opacity hover:text-[var(--foreground)] sm:opacity-0 focus-visible:opacity-100 group-hover/heading:opacity-100 disabled:opacity-30"- >- <Plus size={13} strokeWidth={1.9} />- </button>+ <Tooltip label={t("New chat in {{name}}", { name: workspace.display_name })} side="top">+ <button+ type="button"+ aria-label={t("New chat in {{name}}", {+ name: workspace.display_name,+ })}+ onClick={() => props.onNewChat(workspace.workspace_id)}+ disabled={workspace.status !== "ready"}+ className="shrink-0 rounded-md p-1 text-[var(--muted-foreground)] opacity-100 transition-opacity hover:text-[var(--foreground)] sm:opacity-0 focus-visible:opacity-100 group-hover/heading:opacity-100 disabled:opacity-30"+ >+ <Plus size={13} strokeWidth={1.9} />+ </button>+ </Tooltip></div>{open && (<div className="ml-1.5 border-l border-[color-mix(in_srgb,var(--border)_40%,transparent)] pl-1">diff --git a/web/components/workspaces/WorkspacePill.tsx b/web/components/workspaces/WorkspacePill.tsxindex 27101232d..b733be441 100644--- a/web/components/workspaces/WorkspacePill.tsx+++ b/web/components/workspaces/WorkspacePill.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useEffect, useRef, useState } from "react";import Link from "next/link";import { Check, ChevronDown, Folder, FolderOpen, Plus } from "lucide-react";@@ -114,32 +115,33 @@ export function WorkspacePill({return (<div className="relative flex min-w-0 items-center gap-1.5">- <button- ref={buttonRef}- {...triggerProps}- type="button"- disabled={disabled}- onClick={() => setOpen((value) => !value)}- aria-haspopup="menu"- aria-expanded={open}- aria-label={t(pickerLabel)}- title={label}- className="inline-flex h-8 shrink-0 items-center rounded-lg px-2 text-[13px] font-medium text-[var(--muted-foreground)] transition-[background-color,color,transform] duration-150 hover:bg-[color-mix(in_srgb,var(--muted)_55%,transparent)] hover:text-[var(--foreground)] active:scale-[0.97] disabled:opacity-50"- >- {workspaceId ? (- <FolderOpen size={15} strokeWidth={1.7} className="shrink-0" />- ) : (- <Folder size={15} strokeWidth={1.7} className="shrink-0" />- )}- <ToolbarLabel expanded={expanded}>- <span className="max-w-[150px] truncate">{label}</span>- <ChevronDown- size={12}- strokeWidth={2}- className={`-mr-0.5 shrink-0 transition-transform duration-200 ${open ? "rotate-180" : ""}`}- />- </ToolbarLabel>- </button>+ <Tooltip label={label} side="top">+ <button+ ref={buttonRef}+ {...triggerProps}+ type="button"+ disabled={disabled}+ onClick={() => setOpen((value) => !value)}+ aria-haspopup="menu"+ aria-expanded={open}+ aria-label={t(pickerLabel)}+ className="inline-flex h-8 shrink-0 items-center rounded-lg px-2 text-[13px] font-medium text-[var(--muted-foreground)] transition-[background-color,color,transform] duration-150 hover:bg-[color-mix(in_srgb,var(--muted)_55%,transparent)] hover:text-[var(--foreground)] active:scale-[0.97] disabled:opacity-50"+ >+ {workspaceId ? (+ <FolderOpen size={15} strokeWidth={1.7} className="shrink-0" />+ ) : (+ <Folder size={15} strokeWidth={1.7} className="shrink-0" />+ )}+ <ToolbarLabel expanded={expanded}>+ <span className="max-w-[150px] truncate">{label}</span>+ <ChevronDown+ size={12}+ strokeWidth={2}+ className={`-mr-0.5 shrink-0 transition-transform duration-200 ${open ? "rotate-180" : ""}`}+ />+ </ToolbarLabel>+ </button>+ </Tooltip>{error ? (<span@@ -157,7 +159,7 @@ export function WorkspacePill({role="menu"className="dt-popup-up absolute bottom-full left-0 z-50 mb-1.5 w-[248px] overflow-hidden rounded-xl border border-[var(--border)] bg-[var(--popover)] py-1 shadow-lg backdrop-blur-md">- <div className="max-h-[280px] overflow-y-auto">+ <div className="max-h-[280px] overflow-y-auto [&>span]:w-full">{selectable.length === 0 ? (<p className="px-3 py-2.5 text-[11.5px] leading-relaxed text-[var(--muted-foreground)]">{t(@@ -166,31 +168,35 @@ export function WorkspacePill({</p>) : (selectable.map((row) => (- <button+ <Tooltipkey={row.workspace_id}- type="button"- role="menuitemradio"- aria-checked={row.workspace_id === workspaceId}- disabled={row.status !== "ready"}- title={row.status === "ready" ? row.path : row.error}- onClick={() => {- onSelect(row.workspace_id);- setOpen(false);- }}- className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px] text-[var(--foreground)] transition-colors hover:bg-[color-mix(in_srgb,var(--muted)_60%,transparent)] disabled:opacity-50"+ label={row.status === "ready" ? row.path : row.error}+ side="right">- <Folder- size={13}- strokeWidth={1.7}- className="shrink-0 text-[var(--muted-foreground)]"- />- <span className="min-w-0 flex-1 truncate">- {row.display_name}- </span>- {row.workspace_id === workspaceId ? (- <Check size={12} className="shrink-0" />- ) : null}- </button>+ <button+ type="button"+ role="menuitemradio"+ aria-checked={row.workspace_id === workspaceId}+ disabled={row.status !== "ready"}+ onClick={() => {+ onSelect(row.workspace_id);+ setOpen(false);+ }}+ className="flex w-full items-center gap-2 px-3 py-1.5 text-left text-[12.5px] text-[var(--foreground)] transition-colors hover:bg-[color-mix(in_srgb,var(--muted)_60%,transparent)] disabled:opacity-50"+ >+ <Folder+ size={13}+ strokeWidth={1.7}+ className="shrink-0 text-[var(--muted-foreground)]"+ />+ <span className="min-w-0 flex-1 truncate">+ {row.display_name}+ </span>+ {row.workspace_id === workspaceId ? (+ <Check size={12} className="shrink-0" />+ ) : null}+ </button>+ </Tooltip>)))}</div>@@ -246,15 +252,16 @@ export function WorkspacePill({{t("Manage workspaces")}</Link>{!creating && (- <button- type="button"- aria-label={t("New workspace")}- title={t("New workspace")}- onClick={() => setCreating(true)}- className="flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ring)]"- >- <Plus size={15} strokeWidth={1.7} />- </button>+ <Tooltip label={t("New workspace")} side="top">+ <button+ type="button"+ aria-label={t("New workspace")}+ onClick={() => setCreating(true)}+ className="flex h-7 w-7 shrink-0 items-center justify-center rounded-md transition-colors hover:bg-[var(--muted)] hover:text-[var(--foreground)] focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--ring)]"+ >+ <Plus size={15} strokeWidth={1.7} />+ </button>+ </Tooltip>)}</div></div>diff --git a/web/features/settings/components/UsageActivity.tsx b/web/features/settings/components/UsageActivity.tsxindex cfbea376f..05df68519 100644--- a/web/features/settings/components/UsageActivity.tsx+++ b/web/features/settings/components/UsageActivity.tsx@@ -1,5 +1,6 @@'use client'+import Tooltip from "@/shared/ui/Tooltip";import { useMemo, useRef, useState } from 'react'import { useTranslation } from 'react-i18next'import { activityCalendar, type DailyUsage } from '@/lib/usage-statistics'@@ -99,14 +100,15 @@ export default function UsageActivity({: 0const future = day.date > todayreturn (- <button- key={day.date}+ <Tooltip key={day.date} label={dayLabel(day)} side="top">+ <button+type="button"data-date={day.date}disabled={future}tabIndex={index === focused ? 0 : -1}aria-label={dayLabel(day)}- title={dayLabel(day)}+aria-pressed={selected?.date === day.date}className={`h-[11px] w-[11px] rounded-[2px] outline-offset-2 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[var(--primary)] ${future ? 'bg-[var(--muted)]/40' : colors[level]} ${selected?.date === day.date ? 'ring-1 ring-[var(--foreground)] ring-offset-1 ring-offset-[var(--background)]' : ''}`}onMouseEnter={() => setSelected(day)}@@ -137,6 +139,7 @@ export default function UsageActivity({?.focus()}}/>+ </Tooltip>)})}</div>diff --git a/web/features/settings/sections/ArchivedChatsSettingsSection.tsx b/web/features/settings/sections/ArchivedChatsSettingsSection.tsxindex 5b28ec13c..2abe3b290 100644--- a/web/features/settings/sections/ArchivedChatsSettingsSection.tsx+++ b/web/features/settings/sections/ArchivedChatsSettingsSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { navigateTask } from "@/lib/workspace-scope";import { sessionWorkspaceId } from "@/lib/session-api";import { useCallback, useEffect, useMemo, useState } from "react";@@ -191,16 +192,17 @@ export default function ArchivedChatsSettingsSection() {<option value="mastery">{t("Mastery Path")}</option><option value="reading">{t("Immersive Reading")}</option></select>- <button- type="button"- onClick={() => void refresh()}- disabled={loading || !!busy}- aria-label={t("Refresh")}- title={t("Refresh")}- className="rounded-xl border border-[var(--border)] p-2.5 disabled:opacity-40"- >- <RefreshCw size={16} />- </button>+ <Tooltip label={t("Refresh")} side="top">+ <button+ type="button"+ onClick={() => void refresh()}+ disabled={loading || !!busy}+ aria-label={t("Refresh")}+ className="rounded-xl border border-[var(--border)] p-2.5 disabled:opacity-40"+ >+ <RefreshCw size={16} />+ </button>+ </Tooltip></div>{error && (<p role="alert" className="mb-4 text-sm text-red-600 dark:text-red-400">diff --git a/web/features/settings/sections/ToolsSettingsSection.tsx b/web/features/settings/sections/ToolsSettingsSection.tsxindex 3f1a92452..49528aee4 100644--- a/web/features/settings/sections/ToolsSettingsSection.tsx+++ b/web/features/settings/sections/ToolsSettingsSection.tsx@@ -1,5 +1,6 @@"use client";+import Tooltip from "@/shared/ui/Tooltip";import { useStagedSettings } from "@/features/settings/store/useStagedSettings";import { useEffect, useMemo, useState } from "react";import { ChevronDown, Loader2, Lock, Search, Wrench, X } from "lucide-react";@@ -257,15 +258,18 @@ export default function ToolsSettingsPage() {spellCheck={false}/>{query && (- <button- type="button"- onClick={() => setQuery("")}- aria-label={t("Clear")}- title={t("Clear")}- className="absolute right-2 top-1/2 -translate-y-1/2 rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]/60 hover:text-[var(--foreground)] focus:outline-none focus:ring-2 focus:ring-[var(--ring)]/30"- >- <X className="h-3.5 w-3.5" />- </button>+ <span className="absolute right-2 top-1/2 -translate-y-1/2">+ <Tooltip label={t("Clear")} side="top">+ <button+ type="button"+ onClick={() => setQuery("")}+ aria-label={t("Clear")}+ className="rounded-md p-1.5 text-[var(--muted-foreground)] transition-colors hover:bg-[var(--muted)]/60 hover:text-[var(--foreground)] focus:outline-none focus:ring-2 focus:ring-[var(--ring)]/30"+ >+ <X className="h-3.5 w-3.5" />+ </button>+ </Tooltip>+ </span>)}</div></div>diff --git a/web/features/settings/sections/WorkspaceSettingsSection.tsx b/web/features/settings/sections/WorkspaceSettingsSection.tsxindex e896b3bcc..bf798693d 100644--- a/web/features/settings/sections/WorkspaceSettingsSection.tsx+++ b/web/features/settings/sections/WorkspaceSettingsSection.tsx@@ -1,5 +1,6 @@'use client'+import Tooltip from "@/shared/ui/Tooltip";import { useCallback, useEffect, useState } from 'react'import Link from 'next/link'import { Archive, ArchiveRestore, Folder, FolderInput, Globe2, Pencil, Plus, Settings2 } from 'lucide-react'@@ -40,9 +41,15 @@ function WorkspaceRow({ row, run, busy }: { row: ChatWorkspaceRegistration; run:</Link>)}{row.kind !== 'system' && !row.archived && <button type="button" className={actionClass} onClick={() => { setResources(row.resources ?? inheritedWorkspaceResources()); setResourcesOpen(!resourcesOpen) }}><Settings2 size={14} />{t('Assigned resources')}</button>}- {custom && <button type="button" className={actionClass} aria-label={t('Rename workspace')} title={t('Rename workspace')} onClick={() => { setName(row.display_name); setEditing(!editing); setMoving(false) }}><Pencil size={14} /></button>}- <button type="button" className={actionClass} aria-label={t('Move folder')} title={t('Move folder')} onClick={() => { setMoving(!moving); setEditing(false); setDestination('') }}><FolderInput size={14} /></button>- {custom && <button type="button" className={actionClass} aria-label={row.archived ? t('Restore workspace') : t('Archive workspace')} title={row.archived ? t('Restore workspace') : t('Archive workspace')} onClick={() => void run(() => saveWorkspace({ archived: !row.archived }, row.workspace_id))}>{row.archived ? <ArchiveRestore size={14} /> : <Archive size={14} />}</button>}+ {custom && <Tooltip label={t('Rename workspace')} side="top">+ <button type="button" className={actionClass} aria-label={t('Rename workspace')} onClick={() => { setName(row.display_name); setEditing(!editing); setMoving(false) }}><Pencil size={14} /></button>+ </Tooltip>}+ <Tooltip label={t('Move folder')} side="top">+ <button type="button" className={actionClass} aria-label={t('Move folder')} onClick={() => { setMoving(!moving); setEditing(false); setDestination('') }}><FolderInput size={14} /></button>+ </Tooltip>+ {custom && <Tooltip label={row.archived ? t('Restore workspace') : t('Archive workspace')} side="top">+ <button type="button" className={actionClass} aria-label={row.archived ? t('Restore workspace') : t('Archive workspace')} onClick={() => void run(() => saveWorkspace({ archived: !row.archived }, row.workspace_id))}>{row.archived ? <ArchiveRestore size={14} /> : <Archive size={14} />}</button>+ </Tooltip>}</div></div><div className="mt-1.5 min-w-0 sm:pl-[30px]">