π€― LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.
TypeScript agentagent-collaborationagent-harnessloop-engineeringmcppersonal-assistantproactive-agentskillssuper-agenttask-management
π style: polish desktop header icons, sidebar density, and task menus (#14724)
Inneie56edab711df
diff --git a/src/features/AgentBuilder/TopicSelector.tsx b/src/features/AgentBuilder/TopicSelector.tsxindex dc5c01b4868..1fc8b2bbd69 100644--- a/src/features/AgentBuilder/TopicSelector.tsx+++ b/src/features/AgentBuilder/TopicSelector.tsx@@ -6,7 +6,7 @@ import { Clock3Icon, PlusIcon } from 'lucide-react';import { memo, useMemo } from 'react';import { useTranslation } from 'react-i18next';-import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';+import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@/const/layoutTokens';import NavHeader from '@/features/NavHeader';import { useChatStore } from '@/store/chat';import { topicSelectors } from '@/store/chat/slices/topic/selectors';@@ -91,7 +91,7 @@ const TopicSelector = memo<TopicSelectorProps>(({ agentId }) => {<><ActionIconicon={PlusIcon}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}title={t('actions.addNewTopic')}onClick={() => switchTopic()}/>diff --git a/src/features/AgentTaskManager/Toolbar.tsx b/src/features/AgentTaskManager/Toolbar.tsxindex 3af423da2cb..4e299cd2c60 100644--- a/src/features/AgentTaskManager/Toolbar.tsx+++ b/src/features/AgentTaskManager/Toolbar.tsx@@ -3,7 +3,7 @@ import { Clock3Icon, PanelRightCloseIcon, PlusIcon } from 'lucide-react';import { memo, useState } from 'react';import { useTranslation } from 'react-i18next';-import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';+import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@/const/layoutTokens';import { conversationSelectors, useConversationStore } from '@/features/Conversation';import NavHeader from '@/features/NavHeader';import TopicItem from '@/features/PageEditor/Copilot/TopicSelector/TopicItem';@@ -53,7 +53,7 @@ const Toolbar = memo(() => {<><ActionIconicon={PlusIcon}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}title={t('actions.addNewTopic')}onClick={handleCreate}/>@@ -101,12 +101,12 @@ const Toolbar = memo(() => {disabled={isLoadingTopics}icon={Clock3Icon}loading={isLoadingTopics}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}/></Popover><ActionIconicon={PanelRightCloseIcon}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}onClick={() => toggleTaskAgentPanel()}/></>diff --git a/src/features/AgentTasks/AgentTaskDetail/TaskScheduleConfig.tsx b/src/features/AgentTasks/AgentTaskDetail/TaskScheduleConfig.tsxindex 6502e01aa55..e23af8a1f96 100644--- a/src/features/AgentTasks/AgentTaskDetail/TaskScheduleConfig.tsx+++ b/src/features/AgentTasks/AgentTaskDetail/TaskScheduleConfig.tsx@@ -8,9 +8,9 @@ import {InputNumber,Popover,Segmented,- Select,Text,} from '@lobehub/ui';+import { Select } from '@lobehub/ui/base-ui';import { Switch } from 'antd';import { createStaticStyles, cssVar } from 'antd-style';import dayjs from 'dayjs';diff --git a/src/features/AgentTasks/AgentTaskDetail/scheduler/SchedulerForm.tsx b/src/features/AgentTasks/AgentTaskDetail/scheduler/SchedulerForm.tsxindex ccd63c3f26f..551bb9f8ea4 100644--- a/src/features/AgentTasks/AgentTaskDetail/scheduler/SchedulerForm.tsx+++ b/src/features/AgentTasks/AgentTaskDetail/scheduler/SchedulerForm.tsx@@ -1,18 +1,9 @@-import {- Accordion,- AccordionItem,- Checkbox,- Flexbox,- Icon,- InputNumber,- SearchBar,- Select,- Text,-} from '@lobehub/ui';+import { Accordion, AccordionItem, Checkbox, Flexbox, Icon, InputNumber, Text } from '@lobehub/ui';+import { Select } from '@lobehub/ui/base-ui';import { createStaticStyles, cssVar, cx } from 'antd-style';import dayjs, { type Dayjs } from 'dayjs';import { Globe, Hash, SlidersHorizontal } from 'lucide-react';-import { memo, useCallback, useMemo, useState } from 'react';+import { memo, useCallback, useState } from 'react';import { useTranslation } from 'react-i18next';import {@@ -21,6 +12,7 @@ import {SCHEDULE_TYPE_OPTIONS,type ScheduleType,TIMEZONE_OPTIONS,+ type TimezoneOption,WEEKDAYS,} from './CronConfig';@@ -29,14 +21,6 @@ const styles = createStaticStyles(({ css, cssVar }) => ({font-size: 12px;color: ${cssVar.colorTextSecondary};`,- timezoneEmpty: css`- padding-block: 12px;- padding-inline: 12px;-- font-size: 13px;- color: ${cssVar.colorTextDescription};- text-align: center;- `,timezoneOffset: css`flex-shrink: 0;margin-inline-start: 12px;@@ -51,11 +35,6 @@ const styles = createStaticStyles(({ css, cssVar }) => ({min-width: 0;`,- timezoneSearch: css`- padding-block: 8px 4px;- padding-inline: 8px;- border-block-end: 1px solid ${cssVar.colorSplit};- `,weekdayButton: css`cursor: pointer;@@ -104,12 +83,6 @@ const TIME_OPTIONS = Array.from({ length: 48 }, (_, i) => {return { label, value: hour * 60 + minute };});-// The parent Popover (Base UI) treats any click outside its popup root as an-// outside-click and dismisses. antd Select's dropdown defaults to a body-level-// portal, which trips that detection β anchor it inside the Popover's DOM so-// option clicks stay "inside".-const getPopupContainer = (triggerNode: HTMLElement) => triggerNode.parentElement ?? document.body;-export interface SchedulerFormChange {maxExecutions: number | null;pattern: string;@@ -150,18 +123,6 @@ const SchedulerForm = memo<SchedulerFormProps>(({ maxExecutions, onChange, patteconst [continuous, setContinuous] = useState<boolean>(maxExecutions === null || maxExecutions === undefined,);- const [tzSearch, setTzSearch] = useState('');-- const filteredTimezoneOptions = useMemo(() => {- const q = tzSearch.trim().toLowerCase();- if (!q) return TIMEZONE_OPTIONS;- return TIMEZONE_OPTIONS.filter(- (opt) =>- opt.label.toLowerCase().includes(q) ||- opt.value.toLowerCase().includes(q) ||- opt.offset.toLowerCase().includes(q),- );- }, [tzSearch]);const emit = useCallback((@@ -276,7 +237,6 @@ const SchedulerForm = memo<SchedulerFormProps>(({ maxExecutions, onChange, patte<Flexbox flex={1} gap={6}><Text className={styles.fieldLabel}>{t('taskSchedule.frequency')}</Text><Select- getPopupContainer={getPopupContainer}value={scheduleType}variant="filled"options={SCHEDULE_TYPE_OPTIONS.map((opt) => ({@@ -290,7 +250,6 @@ const SchedulerForm = memo<SchedulerFormProps>(({ maxExecutions, onChange, patte<Flexbox flex={1} gap={6}><Text className={styles.fieldLabel}>{t('taskSchedule.time')}</Text><Select- getPopupContainer={getPopupContainer}options={TIME_OPTIONS}value={triggerTime.hour() * 60 + triggerTime.minute()}variant="filled"@@ -312,7 +271,6 @@ const SchedulerForm = memo<SchedulerFormProps>(({ maxExecutions, onChange, patte/><Text type="secondary">{t('taskSchedule.hours')}</Text><Select- getPopupContainer={getPopupContainer}style={{ width: 80 }}value={triggerTime.minute()}variant="filled"@@ -370,48 +328,23 @@ const SchedulerForm = memo<SchedulerFormProps>(({ maxExecutions, onChange, patte<Text className={styles.fieldLabel}>{t('taskSchedule.timezone')}</Text></Flexbox><Select- getPopupContainer={getPopupContainer}- options={filteredTimezoneOptions}+ showSearch+ options={TIMEZONE_OPTIONS}popupMatchSelectWidth={false}value={tz}variant="filled"- dropdownRender={(originNode) => (- <Flexbox>- <div className={styles.timezoneSearch}>- <SearchBar- allowClear- autoFocus- placeholder={t('taskSchedule.timezoneSearchPlaceholder')}- size="small"- value={tzSearch}- variant="filled"- onChange={(e) => setTzSearch(e.target.value)}- // Keep arrow keys / typing local to the search input;- // antd Select otherwise tries to consume them for option nav.- onKeyDown={(e) => e.stopPropagation()}- />+ optionRender={(option) => {+ const data = option as TimezoneOption;+ return (+ <div className={styles.timezoneOption}>+ <span style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>+ {data.label}+ </span>+ <span className={styles.timezoneOffset}>{data.offset}</span></div>- {filteredTimezoneOptions.length === 0 ? (- <div className={styles.timezoneEmpty}>- {t('taskSchedule.timezoneSearchEmpty')}- </div>- ) : (- originNode- )}- </Flexbox>- )}- optionRender={({ data }) => (- <div className={styles.timezoneOption}>- <span style={{ overflow: 'hidden', textOverflow: 'ellipsis' }}>- {data.label}- </span>- <span className={styles.timezoneOffset}>{data.offset}</span>- </div>- )}- onChange={handleTimezoneChange}- onDropdownVisibleChange={(open) => {- if (!open) setTzSearch('');+ );}}+ onChange={handleTimezoneChange}/></Flexbox>diff --git a/src/features/AgentTasks/AgentTaskList/AgentTasksPage.tsx b/src/features/AgentTasks/AgentTaskList/AgentTasksPage.tsxindex 6d4c79d7193..7cd29707b25 100644--- a/src/features/AgentTasks/AgentTaskList/AgentTasksPage.tsx+++ b/src/features/AgentTasks/AgentTaskList/AgentTasksPage.tsx@@ -3,7 +3,7 @@ import { Plus } from 'lucide-react';import { memo, useCallback, useMemo } from 'react';import { useNavigate } from 'react-router-dom';-import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';+import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@/const/layoutTokens';import NavHeader from '@/features/NavHeader';import ToggleRightPanelButton from '@/features/RightPanel/ToggleRightPanelButton';import WideScreenContainer from '@/features/WideScreenContainer';@@ -68,7 +68,11 @@ const AgentTasksPage = memo(() => {right={<Flexbox horizontal align={'center'} gap={4}>{(inlineCollapsed || viewMode === 'kanban') && (- <ActionIcon icon={Plus} size={DESKTOP_HEADER_ICON_SIZE} onClick={handleCreateTask} />+ <ActionIcon+ icon={Plus}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}+ onClick={handleCreateTask}+ />)}<TasksGroupConfig options={viewOptions} setOptions={setViewOptions} />{showTaskAgentPanelToggle && (diff --git a/src/features/AgentTasks/features/TaskPriorityTag.tsx b/src/features/AgentTasks/features/TaskPriorityTag.tsxindex 6787ae0d025..7e5dcf742aa 100644--- a/src/features/AgentTasks/features/TaskPriorityTag.tsx+++ b/src/features/AgentTasks/features/TaskPriorityTag.tsx@@ -1,6 +1,5 @@import type { IconType } from '@lobehub/icons';-import { Icon, Tooltip } from '@lobehub/ui';-import { Dropdown, type MenuProps } from 'antd';+import { type DropdownItem, DropdownMenu, Icon, type MenuInfo, Tooltip } from '@lobehub/ui';import { createStaticStyles, cssVar } from 'antd-style';import { Loader2Icon } from 'lucide-react';import type { ReactNode } from 'react';@@ -111,7 +110,7 @@ const TaskPriorityTag = memo<TaskPriorityTagProps>(return () => document.removeEventListener('keydown', onKeyDown, true);}, [open]);- const menuItems = useMemo<MenuProps['items']>(+ const menuItems = useMemo<DropdownItem[]>(() =>Object.entries(PRIORITY_META).map(([key, value], index) => {const level = Number(key);@@ -128,7 +127,7 @@ const TaskPriorityTag = memo<TaskPriorityTagProps>(),key,label: t(`taskDetail.${value.labelKey}` as never, { defaultValue: value.label }),- onClick: ({ domEvent }) => {+ onClick: ({ domEvent }: MenuInfo) => {domEvent.stopPropagation();void handlePriorityChange(level);},@@ -158,17 +157,9 @@ const TaskPriorityTag = memo<TaskPriorityTagProps>(if (disableDropdown) return <>{triggerNode}</>;return (- <Dropdown- open={open}- trigger={['click']}- menu={{- items: menuItems,- selectedKeys: [String(currentLevel)],- }}- onOpenChange={setOpen}- >+ <DropdownMenu items={menuItems} open={open} onOpenChange={setOpen}>{triggerNode}- </Dropdown>+ </DropdownMenu>);},);diff --git a/src/features/AgentTasks/features/TaskStatusTag.tsx b/src/features/AgentTasks/features/TaskStatusTag.tsxindex 0a712529938..e49fe4297bb 100644--- a/src/features/AgentTasks/features/TaskStatusTag.tsx+++ b/src/features/AgentTasks/features/TaskStatusTag.tsx@@ -1,6 +1,5 @@import type { TaskStatus } from '@lobechat/types';-import { Icon, Tooltip } from '@lobehub/ui';-import { Dropdown, type MenuProps } from 'antd';+import { type DropdownItem, DropdownMenu, Icon, type MenuInfo, Tooltip } from '@lobehub/ui';import { createStaticStyles, cssVar } from 'antd-style';import type { LucideIcon } from 'lucide-react';import {@@ -150,7 +149,7 @@ const TaskStatusTag = memo<TaskStatusTagProps>(return () => document.removeEventListener('keydown', onKeyDown, true);}, [open]);- const menuItems = useMemo<MenuProps['items']>(+ const menuItems = useMemo<DropdownItem[]>(() =>USER_SELECTABLE_STATUSES.map((key, index) => {const statusMeta = STATUS_META[key];@@ -160,7 +159,7 @@ const TaskStatusTag = memo<TaskStatusTagProps>(icon: <Icon color={statusMeta.color} icon={statusMeta.icon} size={16} />,key,label: t(`taskDetail.${statusMeta.labelKey}`, { defaultValue: statusMeta.label }),- onClick: ({ domEvent }) => {+ onClick: ({ domEvent }: MenuInfo) => {domEvent.stopPropagation();void handleStatusChange(key);},@@ -184,17 +183,9 @@ const TaskStatusTag = memo<TaskStatusTagProps>(if (disableDropdown) return <>{triggerNode}</>;return (- <Dropdown- open={open}- trigger={['click']}- menu={{- items: menuItems,- selectedKeys: [displayStatus],- }}- onOpenChange={setOpen}- >+ <DropdownMenu items={menuItems} open={open} onOpenChange={setOpen}>{triggerNode}- </Dropdown>+ </DropdownMenu>);},);diff --git a/src/features/AgentTasks/features/useTaskItemContextMenu.tsx b/src/features/AgentTasks/features/useTaskItemContextMenu.tsxindex 6cc20863f5f..c84094fb4d0 100644--- a/src/features/AgentTasks/features/useTaskItemContextMenu.tsx+++ b/src/features/AgentTasks/features/useTaskItemContextMenu.tsx@@ -1,5 +1,11 @@import type { TaskStatus } from '@lobechat/types';-import { closeContextMenu, copyToClipboard, type GenericItemType, Icon } from '@lobehub/ui';+import {+ closeContextMenu,+ type ContextMenuItem,+ copyToClipboard,+ Icon,+ type MenuInfo,+} from '@lobehub/ui';import { App } from 'antd';import { cssVar } from 'antd-style';import { BarChart3Icon, CircleDashedIcon, CopyIcon, LinkIcon, Trash2Icon } from 'lucide-react';@@ -14,10 +20,11 @@ import { PRIORITY_META } from './TaskPriorityTag';import { STATUS_META, USER_SELECTABLE_STATUSES } from './TaskStatusTag';const PRIORITY_LEVELS = [0, 1, 2, 3, 4];-const SUBMENU_MARKER = 'data-task-submenu';++type ActiveSubmenu = 'status' | 'priority' | null;interface TaskItemContextMenu {- items: GenericItemType[];+ items: ContextMenuItem[];onContextMenu: () => void;}@@ -28,7 +35,7 @@ export interface TaskContextMenuTarget {}export interface TaskContextMenuActions {- buildItems: (task: TaskContextMenuTarget) => GenericItemType[];+ buildItems: (task: TaskContextMenuTarget) => ContextMenuItem[];installKeyboardHandlers: (task: TaskContextMenuTarget) => void;}@@ -43,6 +50,7 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {const deleteTask = useTaskStore((s) => s.deleteTask);const cleanupRef = useRef<(() => void) | null>(null);+ const activeSubmenuRef = useRef<ActiveSubmenu>(null);useEffect(() => () => cleanupRef.current?.(), []);@@ -61,7 +69,7 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {});};- const buildItems = (task: TaskContextMenuTarget): GenericItemType[] => {+ const buildItems = (task: TaskContextMenuTarget): ContextMenuItem[] => {const currentStatus = task.status as TaskStatus;const currentPriority = task.priority ?? 0;@@ -73,12 +81,12 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {icon: <Icon color={meta.color} icon={meta.icon} />,key: `status-${status}`,label: t(`taskDetail.status.${status}`, { defaultValue: meta.label }),- onClick: ({ domEvent }) => {+ onClick: ({ domEvent }: MenuInfo) => {domEvent.stopPropagation();if (status === currentStatus) return;void updateTaskStatus(task.identifier, status);},- } as GenericItemType;+ } as ContextMenuItem;});const priorityChildren = PRIORITY_LEVELS.map((level, index) => {@@ -93,13 +101,13 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {),key: `priority-${level}`,label: t(`taskDetail.${meta.labelKey}` as never, { defaultValue: meta.label }),- onClick: async ({ domEvent }) => {+ onClick: async ({ domEvent }: MenuInfo) => {domEvent.stopPropagation();if (level === currentPriority) return;await updateTask(task.identifier, { priority: level });await refreshTaskList();},- } as GenericItemType;+ } as ContextMenuItem;});const taskUrl = `${appOrigin}/task/${task.identifier}`;@@ -107,22 +115,28 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {return [{children: statusChildren,- icon: <Icon {...{ [SUBMENU_MARKER]: 'status' }} icon={CircleDashedIcon} />,+ icon: <Icon icon={CircleDashedIcon} />,key: 'status',label: t('taskList.contextMenu.status'),+ onTitleMouseEnter: () => {+ activeSubmenuRef.current = 'status';+ },},{children: priorityChildren,- icon: <Icon {...{ [SUBMENU_MARKER]: 'priority' }} icon={BarChart3Icon} />,+ icon: <Icon icon={BarChart3Icon} />,key: 'priority',label: t('taskList.contextMenu.priority'),+ onTitleMouseEnter: () => {+ activeSubmenuRef.current = 'priority';+ },},{ type: 'divider' },{icon: <Icon icon={CopyIcon} />,key: 'copyId',label: t('taskList.contextMenu.copyId'),- onClick: async ({ domEvent }) => {+ onClick: async ({ domEvent }: MenuInfo) => {domEvent.stopPropagation();await copyToClipboard(task.identifier);message.success(t('taskList.contextMenu.copyIdSuccess'));@@ -132,7 +146,7 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {icon: <Icon icon={LinkIcon} />,key: 'copyLink',label: t('taskList.contextMenu.copyLink'),- onClick: async ({ domEvent }) => {+ onClick: async ({ domEvent }: MenuInfo) => {domEvent.stopPropagation();await copyToClipboard(taskUrl);message.success(t('taskList.contextMenu.copyLinkSuccess'));@@ -144,7 +158,7 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {icon: <Icon icon={Trash2Icon} />,key: 'delete',label: t('delete', { ns: 'common' }),- onClick: ({ domEvent }) => {+ onClick: ({ domEvent }: MenuInfo) => {domEvent.stopPropagation();triggerDelete(task.identifier);},@@ -154,6 +168,7 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {const installKeyboardHandlers = (task: TaskContextMenuTarget) => {cleanupRef.current?.();+ activeSubmenuRef.current = null;const currentStatus = task.status as TaskStatus;const currentPriority = task.priority ?? 0;@@ -163,6 +178,7 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {window.removeEventListener('pointerdown', pointerHandler, true);window.removeEventListener('contextmenu', contextHandler, true);cleanupRef.current = null;+ activeSubmenuRef.current = null;};const keyHandler = (event: KeyboardEvent) => {@@ -175,14 +191,7 @@ export const useTaskContextMenuActions = (): TaskContextMenuActions => {if (Number.isNaN(num)) return;const idx = num - 1;- // Route 1βN to whichever submenu is currently open. The base-ui- // SubmenuTrigger sets `data-popup-open` on the trigger button while its- // submenu is open, and we tag each submenu's icon with `data-task-submenu`- // so we can identify which one was opened.- const openMarker = document.querySelector<HTMLElement>(- `[data-popup-open] [${SUBMENU_MARKER}]`,- );- const openSubmenu = openMarker?.getAttribute(SUBMENU_MARKER);+ const openSubmenu = activeSubmenuRef.current;if (!openSubmenu) return;if (openSubmenu === 'priority') {diff --git a/src/features/NavPanel/SideBarHeaderLayout.tsx b/src/features/NavPanel/SideBarHeaderLayout.tsxindex 825724f8307..edc811316f0 100644--- a/src/features/NavPanel/SideBarHeaderLayout.tsx+++ b/src/features/NavPanel/SideBarHeaderLayout.tsx@@ -120,7 +120,7 @@ const SideBarHeaderLayout = memo<SideBarHeaderLayoutProps>(className={styles.container}flex={'none'}justify={'space-between'}- padding={6}+ padding={'8px 6px'}>{leftContent}<Flexbox horizontal align={'center'} gap={2} justify={'flex-end'}>diff --git a/src/features/NavPanel/SideBarLayout.tsx b/src/features/NavPanel/SideBarLayout.tsxindex cd0bf54c645..1d05b8df02a 100644--- a/src/features/NavPanel/SideBarLayout.tsx+++ b/src/features/NavPanel/SideBarLayout.tsx@@ -11,7 +11,7 @@ interface SidebarLayoutProps {const SideBarLayout = memo<SidebarLayoutProps>(({ header, body }) => {return (- <Flexbox gap={4} style={{ height: '100%', overflow: 'hidden' }}>+ <Flexbox gap={1} style={{ height: '100%', overflow: 'hidden' }}><Suspense fallback={<SkeletonItem height={44} style={{ marginTop: 8 }} />}>{header}</Suspense><ScrollShadow size={2} style={{ height: '100%' }}><TooltipGroup>diff --git a/src/features/PageEditor/Copilot/Toolbar.tsx b/src/features/PageEditor/Copilot/Toolbar.tsxindex 5ea47e94d03..7395302db97 100644--- a/src/features/PageEditor/Copilot/Toolbar.tsx+++ b/src/features/PageEditor/Copilot/Toolbar.tsx@@ -3,7 +3,7 @@ import { Clock3Icon, PanelRightCloseIcon, PlusIcon } from 'lucide-react';import { memo, useState } from 'react';import { useTranslation } from 'react-i18next';-import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';+import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@/const/layoutTokens';import { conversationSelectors, useConversationStore } from '@/features/Conversation';import NavHeader from '@/features/NavHeader';import { useChatStore } from '@/store/chat';@@ -53,7 +53,7 @@ const CopilotToolbar = memo(() => {<><ActionIconicon={PlusIcon}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}title={t('actions.addNewTopic')}onClick={() => switchTopic(null, { scope: 'page' })}/>@@ -96,14 +96,14 @@ const CopilotToolbar = memo(() => {disabled={isLoadingTopics}icon={Clock3Icon}loading={isLoadingTopics}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}/></Popover>)}{!hasOverride && (<ActionIconicon={PanelRightCloseIcon}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}onClick={() => togglePageAgentPanel()}/>)}diff --git a/src/features/PageEditor/Header/index.tsx b/src/features/PageEditor/Header/index.tsxindex 8561f346754..9c06b59c646 100644--- a/src/features/PageEditor/Header/index.tsx+++ b/src/features/PageEditor/Header/index.tsx@@ -5,7 +5,7 @@ import { ArrowLeftIcon, MoreHorizontal } from 'lucide-react';import { memo } from 'react';import { useTranslation } from 'react-i18next';-import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';+import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@/const/layoutTokens';import { AutoSaveHint } from '@/features/EditorCanvas';import NavHeader from '@/features/NavHeader';import ToggleRightPanelButton from '@/features/RightPanel/ToggleRightPanelButton';@@ -61,7 +61,7 @@ const Header = memo(() => {},}}>- <ActionIcon icon={MoreHorizontal} size={DESKTOP_HEADER_ICON_SIZE} />+ <ActionIcon icon={MoreHorizontal} size={DESKTOP_HEADER_ICON_SMALL_SIZE} /></DropdownMenu><ToggleRightPanelButtonhideWhenExpandeddiff --git a/src/features/Portal/components/Header.tsx b/src/features/Portal/components/Header.tsxindex e4e6d93ee89..648b5dd1fc1 100644--- a/src/features/Portal/components/Header.tsx+++ b/src/features/Portal/components/Header.tsx@@ -1,6 +1,6 @@'use client';-import { DESKTOP_HEADER_ICON_SIZE } from '@lobechat/const';+import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@lobechat/const';import { ActionIcon, Flexbox } from '@lobehub/ui';import { ArrowLeft, X } from 'lucide-react';import { type ReactNode } from 'react';@@ -33,7 +33,7 @@ const Header = memo<{ title: ReactNode }>(({ title }) => {left={<Flexbox horizontal align="center" gap={4}>{canGoBack && (- <ActionIcon icon={ArrowLeft} size={DESKTOP_HEADER_ICON_SIZE} onClick={goBack} />+ <ActionIcon icon={ArrowLeft} size={DESKTOP_HEADER_ICON_SMALL_SIZE} onClick={goBack} />)}{title}</Flexbox>@@ -41,7 +41,7 @@ const Header = memo<{ title: ReactNode }>(({ title }) => {right={<ActionIconicon={X}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}onClick={() => {if (params.aid && params.topicId && isTopicPageRoute) {navigate(SESSION_CHAT_TOPIC_URL(params.aid, params.topicId));diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/index.tsx b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/index.tsxindex 3437d975eb4..6c46f689b30 100644--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/index.tsx+++ b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/Review/index.tsx@@ -1,7 +1,14 @@'use client';-import { ActionIcon, Center, Collapse, Empty, Flexbox } from '@lobehub/ui';-import { Dropdown, type MenuProps } from 'antd';+import {+ ActionIcon,+ Center,+ Collapse,+ type DropdownItem,+ DropdownMenu,+ Empty,+ Flexbox,+} from '@lobehub/ui';import { createStaticStyles } from 'antd-style';import {ArrowLeftIcon,@@ -307,7 +314,7 @@ const Review = memo<ReviewProps>(({ workingDirectory }) => {{ additions: 0, deletions: 0 },);- const moreMenuItems: MenuProps['items'] = [+ const moreMenuItems: DropdownItem[] = [{icon: <RefreshCwIcon size={14} />,key: 'refresh',@@ -342,7 +349,7 @@ const Review = memo<ReviewProps>(({ workingDirectory }) => {},];- const modeMenuItems: MenuProps['items'] = [+ const modeMenuItems: DropdownItem[] = [{key: 'unstaged',label: t('workingPanel.review.mode.unstaged'),@@ -358,7 +365,7 @@ const Review = memo<ReviewProps>(({ workingDirectory }) => {// Branches are only loaded after the user opens the picker (see// `basePickerOpen`). While loading, render a single disabled placeholder// so the menu doesn't pop empty + jump to its final size.- const baseRefMenuItems: MenuProps['items'] = remoteBranches+ const baseRefMenuItems: DropdownItem[] = remoteBranches? [...remoteBranches.map((branch) => ({key: branch.name,@@ -405,27 +412,19 @@ const Review = memo<ReviewProps>(({ workingDirectory }) => {gap={8}style={{ flex: '1 1 auto', minWidth: 0, overflow: 'hidden' }}>- <Dropdown- menu={{ items: modeMenuItems, selectedKeys: [mode] }}- placement={'bottomLeft'}- trigger={['click']}- >+ <DropdownMenu items={modeMenuItems} placement={'bottomLeft'}><span className={styles.scopeChip} role={'button'} tabIndex={0}>{mode === 'branch'? t('workingPanel.review.mode.branch'): t('workingPanel.review.mode.unstaged')}<ChevronDownIcon className={styles.caret} size={12} /></span>- </Dropdown>+ </DropdownMenu>{mode === 'branch' && (baseRef || headRef) && (<span className={styles.compareChip}>- <Dropdown+ <DropdownMenu+ items={baseRefMenuItems}placement={'bottomLeft'}- trigger={['click']}- menu={{- items: baseRefMenuItems,- selectedKeys: baseRef ? [baseRef] : [],- }}onOpenChange={setBasePickerOpen}><span className={styles.basePicker} role={'button'} tabIndex={0}>@@ -434,7 +433,7 @@ const Review = memo<ReviewProps>(({ workingDirectory }) => {</span><ChevronDownIcon className={styles.caret} size={12} /></span>- </Dropdown>+ </DropdownMenu>{headRef && (<><ArrowLeftIcon className={styles.arrow} size={12} />@@ -467,14 +466,14 @@ const Review = memo<ReviewProps>(({ workingDirectory }) => {onClick={handleToggleAll}/>)}- <Dropdown menu={{ items: moreMenuItems }} placement={'bottomRight'} trigger={['click']}>+ <DropdownMenu items={moreMenuItems} placement={'bottomRight'}><ActionIconicon={MoreHorizontalIcon}loading={isValidating}size={'small'}title={t('workingPanel.review.more')}/>- </Dropdown>+ </DropdownMenu></Flexbox></div>{isEmpty ? (diff --git a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsx b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsxindex a9b7ee1b5fd..1cb74e39b20 100644--- a/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsx+++ b/src/routes/(main)/agent/features/Conversation/WorkingSidebar/index.tsx@@ -95,7 +95,7 @@ const AgentWorkingSidebar = memo(() => {className={styles.header}height={44}justify={'space-between'}- paddingInline={16}+ paddingInline={4}>{reviewAvailable ? (<div className={styles.tabs}>diff --git a/src/routes/(main)/agent/profile/features/Header/index.tsx b/src/routes/(main)/agent/profile/features/Header/index.tsxindex 808c2e7a84a..79db0d2079a 100644--- a/src/routes/(main)/agent/profile/features/Header/index.tsx+++ b/src/routes/(main)/agent/profile/features/Header/index.tsx@@ -8,7 +8,7 @@ import { useTranslation } from 'react-i18next';import { useNavigate } from 'react-router-dom';import { message } from '@/components/AntdStaticMethods';-import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';+import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@/const/layoutTokens';import NavHeader from '@/features/NavHeader';import ToggleRightPanelButton from '@/features/RightPanel/ToggleRightPanelButton';import { useMarketAuth } from '@/layout/AuthProvider/MarketAuth';@@ -176,7 +176,7 @@ const Header = memo(() => {<ActionIconicon={MoreHorizontal}loading={isPublishing || isAuthLoading}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}/></DropdownMenu>{!isHeterogeneous && (diff --git a/src/routes/(main)/group/profile/features/AgentBuilder/TopicSelector.tsx b/src/routes/(main)/group/profile/features/AgentBuilder/TopicSelector.tsxindex 4e88d28259c..02b256b7a4e 100644--- a/src/routes/(main)/group/profile/features/AgentBuilder/TopicSelector.tsx+++ b/src/routes/(main)/group/profile/features/AgentBuilder/TopicSelector.tsx@@ -4,7 +4,7 @@ import { Clock3Icon, PlusIcon } from 'lucide-react';import { memo, useCallback, useMemo } from 'react';import { useTranslation } from 'react-i18next';-import { DESKTOP_HEADER_ICON_SIZE } from '@/const/layoutTokens';+import { DESKTOP_HEADER_ICON_SMALL_SIZE } from '@/const/layoutTokens';import NavHeader from '@/features/NavHeader';import { useQueryState } from '@/hooks/useQueryParam';import { useChatStore } from '@/store/chat';@@ -66,7 +66,7 @@ const TopicSelector = memo<TopicSelectorProps>(({ agentId }) => {<><ActionIconicon={PlusIcon}- size={DESKTOP_HEADER_ICON_SIZE}+ size={DESKTOP_HEADER_ICON_SMALL_SIZE}title={t('actions.addNewTopic')}onClick={() => handleSwitchTopic(undefined)}/>diff --git a/src/routes/(main)/home/_layout/Body/Agent/index.tsx b/src/routes/(main)/home/_layout/Body/Agent/index.tsxindex c48e8b95713..bec0f0e4122 100644--- a/src/routes/(main)/home/_layout/Body/Agent/index.tsx+++ b/src/routes/(main)/home/_layout/Body/Agent/index.tsx@@ -73,7 +73,7 @@ const Agent = memo<AgentProps>(({ itemKey }) => {}><Suspense fallback={<SkeletonList rows={6} />}>- <Flexbox gap={4} paddingBlock={1}>+ <Flexbox gap={1} paddingBlock={1}><List /></Flexbox></Suspense>diff --git a/src/routes/(main)/home/_layout/Body/index.tsx b/src/routes/(main)/home/_layout/Body/index.tsxindex 6762a40bdec..96ba6a7958d 100644--- a/src/routes/(main)/home/_layout/Body/index.tsx+++ b/src/routes/(main)/home/_layout/Body/index.tsx@@ -196,7 +196,7 @@ const Body = memo(() => {}, [visibleKeys, renderNavLink, sidebarExpandedKeys, handleAccordionExpandedChange]);return (- <Flexbox flex={1} gap={4} paddingInline={4}>+ <Flexbox flex={1} gap={1} paddingInline={4}>{content}<CustomizeSidebarModal /></Flexbox>diff --git a/src/routes/(main)/home/_layout/Header/components/Nav.tsx b/src/routes/(main)/home/_layout/Header/components/Nav.tsxindex 0c008c0e93a..723a8344428 100644--- a/src/routes/(main)/home/_layout/Header/components/Nav.tsx+++ b/src/routes/(main)/home/_layout/Header/components/Nav.tsx@@ -28,7 +28,7 @@ const Nav = memo(() => {);return (- <Flexbox gap={4} paddingInline={4}>+ <Flexbox gap={1} paddingInline={4}>{items.filter((item) => HEADER_KEYS.has(item.key) && !item.hidden).map((item) => {diff --git a/src/routes/(main)/home/features/Recents/List.tsx b/src/routes/(main)/home/features/Recents/List.tsxindex 094f74535a7..2d73df683f4 100644--- a/src/routes/(main)/home/features/Recents/List.tsx+++ b/src/routes/(main)/home/features/Recents/List.tsx@@ -41,7 +41,7 @@ const RecentsList = memo(() => {}return (- <Flexbox gap={2}>+ <Flexbox gap={1}>{displayItems.map((item) => (<Linkkey={`${item.type}-${item.id}`}