diff --git a/desktop/src/components/layout/Sidebar.test.tsx b/desktop/src/components/layout/Sidebar.test.tsx index 9e831ba0..791d7064 100644 --- a/desktop/src/components/layout/Sidebar.test.tsx +++ b/desktop/src/components/layout/Sidebar.test.tsx @@ -37,8 +37,6 @@ vi.mock('../../i18n', () => ({ 'sidebar.batchDeleteConfirm': 'Delete {count} sessions? This cannot be undone.', 'sidebar.batchDeleteConfirmBody': 'The following sessions will be deleted:', 'sidebar.batchDeleteMore': '...and {count} more', - 'sidebar.batchClearOlderThan30': 'Clear >30d', - 'sidebar.batchClearOlderThan7': 'Clear >7d', 'sidebar.batchExit': 'Cancel batch mode', 'sidebar.batchDeleteSucceeded': 'Deleted {count} sessions.', 'sidebar.batchDeleteFailed': '{count} sessions could not be deleted.', diff --git a/desktop/src/components/layout/Sidebar.tsx b/desktop/src/components/layout/Sidebar.tsx index b370a785..4df8aa2b 100644 --- a/desktop/src/components/layout/Sidebar.tsx +++ b/desktop/src/components/layout/Sidebar.tsx @@ -186,12 +186,6 @@ export function Sidebar({ isMobile = false, onRequestClose }: SidebarProps) { } }, [deselectSessions, selectSessions, selectedSessionIds]) - const selectOlderThan = useCallback((days: number) => { - const ids = getSessionsOlderThan(filteredSessions, days) - selectSessions(ids) - requestBatchDelete(ids) - }, [filteredSessions, requestBatchDelete, selectSessions]) - const handleStartRename = useCallback((id: string, currentTitle: string) => { setContextMenu(null) setRenamingId(id) @@ -445,22 +439,6 @@ export function Sidebar({ isMobile = false, onRequestClose }: SidebarProps) { > {t('sidebar.batchDeleteSelected', { count: selectedCount })} - - )} @@ -719,13 +697,6 @@ function groupByTime(sessions: SessionListItem[]): Map new Date(session.modifiedAt).getTime() < threshold) - .map((session) => session.id) -} - function NavItem({ active, collapsed, diff --git a/desktop/src/i18n/locales/en.ts b/desktop/src/i18n/locales/en.ts index 4828ae45..69907aaf 100644 --- a/desktop/src/i18n/locales/en.ts +++ b/desktop/src/i18n/locales/en.ts @@ -35,8 +35,6 @@ export const en = { 'sidebar.batchDeleteConfirm': 'Delete {count} sessions? This cannot be undone.', 'sidebar.batchDeleteConfirmBody': 'The following sessions will be deleted:', 'sidebar.batchDeleteMore': '...and {count} more', - 'sidebar.batchClearOlderThan30': 'Clear >30d', - 'sidebar.batchClearOlderThan7': 'Clear >7d', 'sidebar.batchExit': 'Cancel batch mode', 'sidebar.batchDeleteSucceeded': 'Deleted {count} sessions.', 'sidebar.batchDeleteFailed': '{count} sessions could not be deleted.', diff --git a/desktop/src/i18n/locales/zh.ts b/desktop/src/i18n/locales/zh.ts index 989ce016..a1d97761 100644 --- a/desktop/src/i18n/locales/zh.ts +++ b/desktop/src/i18n/locales/zh.ts @@ -37,8 +37,6 @@ export const zh: Record = { 'sidebar.batchDeleteConfirm': '确定要删除 {count} 个会话吗?此操作不可撤销。', 'sidebar.batchDeleteConfirmBody': '以下会话将被删除:', 'sidebar.batchDeleteMore': '...还有 {count} 条', - 'sidebar.batchClearOlderThan30': '清空 30 天前', - 'sidebar.batchClearOlderThan7': '清空 7 天前', 'sidebar.batchExit': '退出批量管理', 'sidebar.batchDeleteSucceeded': '已删除 {count} 个会话。', 'sidebar.batchDeleteFailed': '有 {count} 个会话删除失败。',