diff --git a/src/components/conversations/sidebar-conversation-list.tsx b/src/components/conversations/sidebar-conversation-list.tsx index 10a86fa..22aa83c 100644 --- a/src/components/conversations/sidebar-conversation-list.tsx +++ b/src/components/conversations/sidebar-conversation-list.tsx @@ -114,7 +114,6 @@ const FolderHeader = memo(function FolderHeader({ onFocus, onCloseFolderTabs, onRemoveFromWorkspace, - highlighted, t, }: { folderId: number @@ -126,7 +125,6 @@ const FolderHeader = memo(function FolderHeader({ onFocus: (folderId: number) => void onCloseFolderTabs: (folderId: number) => void onRemoveFromWorkspace: (folderId: number) => void - highlighted: boolean t: ReturnType }) { return ( @@ -140,8 +138,7 @@ const FolderHeader = memo(function FolderHeader({ "flex h-[1.9375rem] w-full items-center gap-[0.5rem] cursor-pointer outline-none", "rounded-[0.4375rem] px-2", "text-sidebar-foreground hover:bg-[color-mix(in_oklab,var(--sidebar-accent),var(--sidebar-foreground)_2%)]", - "transition-[background-color,color] duration-150", - highlighted && "ring-2 ring-sidebar-primary ring-offset-1" + "transition-[background-color,color] duration-150" )} > void expandAll: () => void collapseAll: () => void - revealFolder: (folderId: number) => void } export interface SidebarConversationListProps { @@ -266,9 +262,6 @@ export function SidebarConversationList({ const [folderExpanded, setFolderExpanded] = useState>( {} ) - const [highlightedFolder, setHighlightedFolder] = useState( - null - ) const [scrollOffset, setScrollOffset] = useState(0) const [removeConfirm, setRemoveConfirm] = useState<{ folderId: number @@ -284,7 +277,6 @@ export function SidebarConversationList({ const scrollToActiveRef = useRef<() => void>(() => {}) const pendingScrollRef = useRef(false) const virtualizerRef = useRef(null) - const highlightTimerRef = useRef(null) const filteredConversations = useMemo(() => { if (showCompleted) return conversations @@ -403,43 +395,8 @@ export function SidebarConversationList({ return next }) }, - revealFolder(folderId: number) { - setFolderExpanded((prev) => { - if (prev[folderId] === true) return prev - const next = { ...prev, [folderId]: true } - saveFolderExpanded(next) - return next - }) - setHighlightedFolder(folderId) - if (highlightTimerRef.current) { - window.clearTimeout(highlightTimerRef.current) - } - highlightTimerRef.current = window.setTimeout(() => { - setHighlightedFolder(null) - highlightTimerRef.current = null - }, 1200) - requestAnimationFrame(() => { - const idx = flatItems.findIndex( - (item) => item.type === "folder_header" && item.folderId === folderId - ) - if (idx >= 0) { - virtualizerRef.current?.scrollToIndex(idx, { - align: "start", - smooth: true, - }) - } - }) - }, })) - useEffect(() => { - return () => { - if (highlightTimerRef.current) { - window.clearTimeout(highlightTimerRef.current) - } - } - }, []) - useEffect(() => { scrollToActiveRef.current = () => { if (!selectedConversation) return @@ -728,9 +685,6 @@ export function SidebarConversationList({ onFocus={focusFolder} onCloseFolderTabs={handleCloseFolderTabs} onRemoveFromWorkspace={handleRemoveFolder} - highlighted={ - highlightedFolder === stickyFolderItem.folderId - } t={t} /> @@ -761,7 +715,6 @@ export function SidebarConversationList({ onFocus={focusFolder} onCloseFolderTabs={handleCloseFolderTabs} onRemoveFromWorkspace={handleRemoveFolder} - highlighted={highlightedFolder === item.folderId} t={t} /> ) diff --git a/src/components/layout/sidebar.tsx b/src/components/layout/sidebar.tsx index f40fcda..730462e 100644 --- a/src/components/layout/sidebar.tsx +++ b/src/components/layout/sidebar.tsx @@ -71,18 +71,6 @@ export function Sidebar() { } }, [allExpanded]) - useEffect(() => { - const onReveal = (e: Event) => { - const detail = (e as CustomEvent<{ folderId: number }>).detail - if (!detail) return - listRef.current?.revealFolder(detail.folderId) - } - window.addEventListener("sidebar:reveal-folder", onReveal) - return () => { - window.removeEventListener("sidebar:reveal-folder", onReveal) - } - }, []) - if (!isOpen) return null return ( diff --git a/src/components/tabs/tab-bar.tsx b/src/components/tabs/tab-bar.tsx index a96498c..321a218 100644 --- a/src/components/tabs/tab-bar.tsx +++ b/src/components/tabs/tab-bar.tsx @@ -19,7 +19,6 @@ export function TabBar() { closeTab, closeOtherTabs, closeAllTabs, - closeTabsByFolder, pinTab, toggleTileMode, reorderTabs, @@ -33,11 +32,6 @@ export function TabBar() { return map }, [allFolders]) - const handleRevealInSidebar = useCallback((folderId: number) => { - window.dispatchEvent( - new CustomEvent("sidebar:reveal-folder", { detail: { folderId } }) - ) - }, []) const { shortcuts } = useShortcutSettings() const scrollRef = useRef(null) const [isHovered, setIsHovered] = useState(false) @@ -115,8 +109,6 @@ export function TabBar() { onClose={closeTab} onCloseOthers={closeOtherTabs} onCloseAll={closeAllTabs} - onCloseFolderTabs={closeTabsByFolder} - onRevealInSidebar={handleRevealInSidebar} onPin={pinTab} onToggleTile={toggleTileMode} /> diff --git a/src/components/tabs/tab-item.tsx b/src/components/tabs/tab-item.tsx index 6f660f0..56d1a5d 100644 --- a/src/components/tabs/tab-item.tsx +++ b/src/components/tabs/tab-item.tsx @@ -26,8 +26,6 @@ interface TabItemProps { onClose: (tabId: string) => void onCloseOthers: (tabId: string) => void onCloseAll: () => void - onCloseFolderTabs: (folderId: number) => void - onRevealInSidebar: (folderId: number) => void onPin: (tabId: string) => void onToggleTile: () => void } @@ -42,8 +40,6 @@ export const TabItem = memo(function TabItem({ onClose, onCloseOthers, onCloseAll, - onCloseFolderTabs, - onRevealInSidebar, onPin, onToggleTile, }: TabItemProps) { @@ -56,14 +52,6 @@ export const TabItem = memo(function TabItem({ ? `${resolvedFolderName} · ${folderBranch} — ${tab.title}` : `${resolvedFolderName} — ${tab.title}` - const handleCloseFolderTabs = useCallback(() => { - onCloseFolderTabs(tab.folderId) - }, [onCloseFolderTabs, tab.folderId]) - - const handleRevealInSidebar = useCallback(() => { - onRevealInSidebar(tab.folderId) - }, [onRevealInSidebar, tab.folderId]) - const clearResidualStyles = useCallback(() => { const el = itemRef.current if (!el) return @@ -167,13 +155,7 @@ export const TabItem = memo(function TabItem({ {t("closeOthers")} - - {t("closeFolderTabs", { folder: resolvedFolderName })} - - - {t("revealInSidebar")} - {isTileMode ? t("untileDisplay") : t("tileDisplay")} diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.json index 0cb0b97..06d9c6b 100644 --- a/src/i18n/messages/ar.json +++ b/src/i18n/messages/ar.json @@ -981,9 +981,7 @@ "closeOthers": "إغلاق البقية", "closeAll": "إغلاق الكل", "tileDisplay": "عرض متجانب", - "untileDisplay": "إلغاء التجانب", - "closeFolderTabs": "إغلاق جميع علامات التبويب لـ {folder}", - "revealInSidebar": "إظهار في الشريط الجانبي" + "untileDisplay": "إلغاء التجانب" }, "fileWorkspace": { "files": "الملفات", diff --git a/src/i18n/messages/de.json b/src/i18n/messages/de.json index 7f7699f..24d2a66 100644 --- a/src/i18n/messages/de.json +++ b/src/i18n/messages/de.json @@ -981,9 +981,7 @@ "closeOthers": "Andere schließen", "closeAll": "Alle schließen", "tileDisplay": "Kachelansicht", - "untileDisplay": "Kachel beenden", - "closeFolderTabs": "Alle Tabs von {folder} schließen", - "revealInSidebar": "In Seitenleiste anzeigen" + "untileDisplay": "Kachel beenden" }, "fileWorkspace": { "files": "Dateien", diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index 9a3db15..559de30 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -981,9 +981,7 @@ "closeOthers": "Close Others", "closeAll": "Close All", "tileDisplay": "Tile Display", - "untileDisplay": "Exit Tile", - "closeFolderTabs": "Close all tabs of {folder}", - "revealInSidebar": "Reveal in sidebar" + "untileDisplay": "Exit Tile" }, "fileWorkspace": { "files": "Files", diff --git a/src/i18n/messages/es.json b/src/i18n/messages/es.json index b203f67..1adf5c7 100644 --- a/src/i18n/messages/es.json +++ b/src/i18n/messages/es.json @@ -981,9 +981,7 @@ "closeOthers": "Cerrar otros", "closeAll": "Cerrar todo", "tileDisplay": "Vista en mosaico", - "untileDisplay": "Salir de mosaico", - "closeFolderTabs": "Cerrar todas las pestañas de {folder}", - "revealInSidebar": "Mostrar en la barra lateral" + "untileDisplay": "Salir de mosaico" }, "fileWorkspace": { "files": "Archivos", diff --git a/src/i18n/messages/fr.json b/src/i18n/messages/fr.json index ef7d911..22f1469 100644 --- a/src/i18n/messages/fr.json +++ b/src/i18n/messages/fr.json @@ -981,9 +981,7 @@ "closeOthers": "Fermer les autres", "closeAll": "Tout fermer", "tileDisplay": "Affichage en mosaïque", - "untileDisplay": "Quitter la mosaïque", - "closeFolderTabs": "Fermer tous les onglets de {folder}", - "revealInSidebar": "Afficher dans la barre latérale" + "untileDisplay": "Quitter la mosaïque" }, "fileWorkspace": { "files": "Fichiers", diff --git a/src/i18n/messages/ja.json b/src/i18n/messages/ja.json index 202c924..b36fa37 100644 --- a/src/i18n/messages/ja.json +++ b/src/i18n/messages/ja.json @@ -981,9 +981,7 @@ "closeOthers": "他を閉じる", "closeAll": "すべて閉じる", "tileDisplay": "タイル表示", - "untileDisplay": "タイル解除", - "closeFolderTabs": "{folder} のすべてのタブを閉じる", - "revealInSidebar": "サイドバーで表示" + "untileDisplay": "タイル解除" }, "fileWorkspace": { "files": "ファイル", diff --git a/src/i18n/messages/ko.json b/src/i18n/messages/ko.json index 6b9b2e1..5d0d97c 100644 --- a/src/i18n/messages/ko.json +++ b/src/i18n/messages/ko.json @@ -981,9 +981,7 @@ "closeOthers": "다른 항목 닫기", "closeAll": "모두 닫기", "tileDisplay": "타일 표시", - "untileDisplay": "타일 해제", - "closeFolderTabs": "{folder}의 모든 탭 닫기", - "revealInSidebar": "사이드바에서 표시" + "untileDisplay": "타일 해제" }, "fileWorkspace": { "files": "파일", diff --git a/src/i18n/messages/pt.json b/src/i18n/messages/pt.json index 9339cae..c53cecf 100644 --- a/src/i18n/messages/pt.json +++ b/src/i18n/messages/pt.json @@ -981,9 +981,7 @@ "closeOthers": "Fechar outros", "closeAll": "Fechar tudo", "tileDisplay": "Exibição em mosaico", - "untileDisplay": "Sair do mosaico", - "closeFolderTabs": "Fechar todas as abas de {folder}", - "revealInSidebar": "Mostrar na barra lateral" + "untileDisplay": "Sair do mosaico" }, "fileWorkspace": { "files": "Arquivos", diff --git a/src/i18n/messages/zh-CN.json b/src/i18n/messages/zh-CN.json index 6bf71ea..8dd28e7 100644 --- a/src/i18n/messages/zh-CN.json +++ b/src/i18n/messages/zh-CN.json @@ -981,9 +981,7 @@ "closeOthers": "关闭其它", "closeAll": "关闭所有", "tileDisplay": "平铺显示", - "untileDisplay": "取消平铺", - "closeFolderTabs": "关闭 {folder} 的所有标签", - "revealInSidebar": "在侧边栏中定位" + "untileDisplay": "取消平铺" }, "fileWorkspace": { "files": "文件", diff --git a/src/i18n/messages/zh-TW.json b/src/i18n/messages/zh-TW.json index dfd374d..036ce29 100644 --- a/src/i18n/messages/zh-TW.json +++ b/src/i18n/messages/zh-TW.json @@ -981,9 +981,7 @@ "closeOthers": "關閉其它", "closeAll": "關閉所有", "tileDisplay": "平鋪顯示", - "untileDisplay": "取消平鋪", - "closeFolderTabs": "關閉 {folder} 的所有標籤", - "revealInSidebar": "在側邊欄中定位" + "untileDisplay": "取消平鋪" }, "fileWorkspace": { "files": "檔案",