🤯 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
♻️ refactor(topic): remove legacy paused status and hash icon (#18036)
Arvin Xu03342436901c
diff --git a/docs/usage/agent/topic.mdx b/docs/usage/agent/topic.mdxindex 494f481e723..0cc255c4944 100644--- a/docs/usage/agent/topic.mdx+++ b/docs/usage/agent/topic.mdx@@ -48,7 +48,7 @@ Find the Topic you want to remove, click **Delete**, and confirm. The Topic is rTopics can be organized in whichever way helps you find things fastest. Use the grouping control above the list to switch modes:-- **By status** — Groups Topics by their run state (e.g. running, waiting for human, completed, failed, paused, archived) so you can quickly spot what needs attention.+- **By status** — Groups Topics by their run state (e.g. running, waiting for human, completed, failed, archived) so you can quickly spot what needs attention.- **By time** — Groups Topics by creation time (today, this week, this month, and so on). Expand a group to see all Topics from that period.- **By project** — Groups Topics under the project or directory they belong to, with a catch-all group for Topics that aren't attached to one.- **Flat** — Skips grouping entirely and shows every Topic in a single flat list.diff --git a/docs/usage/agent/topic.zh-CN.mdx b/docs/usage/agent/topic.zh-CN.mdxindex 87f8d2709e9..ac6c6b67657 100644--- a/docs/usage/agent/topic.zh-CN.mdx+++ b/docs/usage/agent/topic.zh-CN.mdx@@ -46,7 +46,7 @@ tags:话题可以按最适合你查找的方式组织。在列表上方的分组控件中切换分组方式:-- **按状态** — 按话题的运行状态分组(如进行中、等待处理、已完成、已失败、已暂停、已归档等),方便快速找到需要关注的话题。+- **按状态** — 按话题的运行状态分组(如进行中、等待处理、已完成、已失败、已归档等),方便快速找到需要关注的话题。- **按时间阶段** — 按创建时间分组(今天、本周、本月等)。展开对应时间段,查看该时期的所有话题。- **按项目** — 按话题所属的项目或目录分组,未关联项目的话题会归入统一的分组。- **平铺** — 不进行任何分组,将所有话题显示在同一个列表中。diff --git a/locales/en-US/topic.json b/locales/en-US/topic.jsonindex 3e3162936b7..8d7c7273808 100644--- a/locales/en-US/topic.json+++ b/locales/en-US/topic.json@@ -82,7 +82,6 @@"groupTitle.byStatus.archived": "Archived","groupTitle.byStatus.completed": "Archived","groupTitle.byStatus.failed": "Failed",- "groupTitle.byStatus.paused": "Paused","groupTitle.byStatus.pending": "Needs attention","groupTitle.byStatus.running": "Running","groupTitle.byStatus.scheduled": "Scheduled",@@ -222,7 +221,6 @@"management.status.completed": "Archived","management.status.failed": "Failed","management.status.idle": "Idle",- "management.status.paused": "Paused","management.status.running": "Running","management.status.scheduled": "Scheduled","management.status.waitingForHuman": "Awaiting input",diff --git a/locales/zh-CN/topic.json b/locales/zh-CN/topic.jsonindex 8ff3205ecbc..ddfb4f6e6c4 100644--- a/locales/zh-CN/topic.json+++ b/locales/zh-CN/topic.json@@ -82,7 +82,6 @@"groupTitle.byStatus.archived": "已归档","groupTitle.byStatus.completed": "已归档","groupTitle.byStatus.failed": "已失败",- "groupTitle.byStatus.paused": "已暂停","groupTitle.byStatus.pending": "待处理","groupTitle.byStatus.running": "进行中","groupTitle.byStatus.scheduled": "已排期",@@ -222,7 +221,6 @@"management.status.completed": "已归档","management.status.failed": "已失败","management.status.idle": "空闲中",- "management.status.paused": "已暂停","management.status.running": "运行中","management.status.scheduled": "已排期","management.status.waitingForHuman": "等待响应",diff --git a/packages/database/src/models/topic.ts b/packages/database/src/models/topic.tsindex 8052898074d..21d22575050 100644--- a/packages/database/src/models/topic.ts+++ b/packages/database/src/models/topic.ts@@ -186,9 +186,8 @@ const STATUS_SORT_RANK = sql`CASE ${topics.status}WHEN 'running' THEN 3WHEN 'scheduled' THEN 4WHEN 'active' THEN 5- WHEN 'paused' THEN 6- WHEN 'completed' THEN 7- WHEN 'archived' THEN 8+ WHEN 'completed' THEN 6+ WHEN 'archived' THEN 7ELSE 5 END`;// Favorites always float to the top; the rest are ordered by the requesteddiff --git a/packages/database/src/schemas/topic.ts b/packages/database/src/schemas/topic.tsindex 64bb9cd87c7..2ce8a4a7db8 100644--- a/packages/database/src/schemas/topic.ts+++ b/packages/database/src/schemas/topic.ts@@ -48,7 +48,6 @@ export const topics = pgTable(enum: ['active','running',- 'paused','waitingForHuman','scheduled','failed',diff --git a/packages/locales/src/default/topic.ts b/packages/locales/src/default/topic.tsindex 13461712d6e..5cdae9fff6d 100644--- a/packages/locales/src/default/topic.ts+++ b/packages/locales/src/default/topic.ts@@ -103,7 +103,6 @@ export default {'groupTitle.byStatus.archived': 'Archived','groupTitle.byStatus.completed': 'Archived','groupTitle.byStatus.failed': 'Failed',- 'groupTitle.byStatus.paused': 'Paused','groupTitle.byStatus.pending': 'Needs attention','groupTitle.byStatus.running': 'Running','groupTitle.byStatus.scheduled': 'Scheduled',@@ -264,7 +263,6 @@ export default {'management.status.completed': 'Archived','management.status.failed': 'Failed','management.status.idle': 'Idle',- 'management.status.paused': 'Paused','management.status.running': 'Running','management.status.scheduled': 'Scheduled','management.status.waitingForHuman': 'Awaiting input',diff --git a/packages/types/src/topic/topic.ts b/packages/types/src/topic/topic.tsindex 8d72d51896e..57a24fd3981 100644--- a/packages/types/src/topic/topic.ts+++ b/packages/types/src/topic/topic.ts@@ -21,7 +21,7 @@ export type TopicSortBy = 'createdAt' | 'updatedAt';* Server-side ordering for the topic list query.* - `updatedAt` (default): favorites first, then most-recently-updated.* - `status`: favorites first, then by status priority- * (waitingForHuman → running → active → paused → failed → completed →+ * (waitingForHuman → running → active → failed → completed →* archived), then most-recently-updated within each status. Backs the* sidebar "group by status" mode so the highest-priority topics stay on the* first page regardless of pagination.@@ -477,7 +477,6 @@ export interface ChatTopicSummary {export const TOPIC_STATUSES = ['active','running',- 'paused','waitingForHuman','scheduled','failed',diff --git a/packages/utils/src/client/topic.test.ts b/packages/utils/src/client/topic.test.tsindex 03f6efc9b97..dabe14927e4 100644--- a/packages/utils/src/client/topic.test.ts+++ b/packages/utils/src/client/topic.test.ts@@ -226,7 +226,7 @@ describe('groupTopicsByUpdatedTime', () => {const today = dayjs().valueOf();// Row was edited last year (updatedAt) but had message activity today- // (sortUpdatedAt) — the sidebar must group it under "today".+ // (sortUpdatedAt) — the sidebar must group it under "today".const topic: ChatTopic = {id: 'active',title: 'Recently active',@@ -400,12 +400,12 @@ describe('groupTopicsByStatus', () => {const topics = [createTopic('c', 'completed'),createTopic('w', 'waitingForHuman'),- createTopic('p', 'paused'),+ createTopic('a', 'archived'),];const result = groupTopicsByStatus(topics, 'updatedAt');- expect(result.map((g) => g.id)).toEqual(['pending', 'paused', 'completed']);+ expect(result.map((g) => g.id)).toEqual(['pending', 'completed', 'archived']);});it('should sort topics inside a group by the chosen field desc', () => {diff --git a/packages/utils/src/client/topic.ts b/packages/utils/src/client/topic.tsindex 9182df4520c..22c69230fa3 100644--- a/packages/utils/src/client/topic.ts+++ b/packages/utils/src/client/topic.ts@@ -75,7 +75,7 @@ const sortGroups = (groups: GroupedTopic[]): GroupedTopic[] => {* Resolve the timestamp a topic sorts/groups by for the given field. For* `updatedAt` this is the server-provided `sortUpdatedAt` (latest message* activity), falling back to the raw `updatedAt` when absent — so the sidebar- * order matches the server ORDER BY and doesn't jump.+ * order matches the server ORDER BY and doesn't jump.*/export const getTopicSortTime = (topic: ChatTopic, field: 'createdAt' | 'updatedAt'): number =>field === 'updatedAt' ? (topic.sortUpdatedAt ?? topic.updatedAt) : topic.createdAt;@@ -206,7 +206,7 @@ export const groupTopicsByProject = (// the sidebar surfaces "needs attention" in one place. The remaining buckets map// 1:1 to a status. The group `id` resolves its title via `groupTitle.byStatus.<id>`.export type TopicStatusBucket =- 'pending' | 'running' | 'scheduled' | 'active' | 'paused' | 'completed' | 'archived';+ 'pending' | 'running' | 'scheduled' | 'active' | 'completed' | 'archived';// Fixed priority order: `pending` (needs attention) comes first, then running,// then active; the remaining states fall below. Topics without a status are@@ -223,7 +223,6 @@ export const STATUS_GROUP_ORDER: TopicStatusBucket[] = ['running','scheduled','active',- 'paused','completed','archived',];@@ -248,7 +247,7 @@ const resolveStatusBucket = (// into `pending`, so users don't read it as "needs manual action".if (topic.status === 'scheduled') return 'scheduled';const status: ChatTopicStatus = topic.status ?? 'active';- if (status === 'paused' || status === 'completed' || status === 'archived') return status;+ if (status === 'completed' || status === 'archived') return status;return 'active';};diff --git a/src/components/ExecutionStatus.ts b/src/components/ExecutionStatus.tsindex a8c1acff212..04ba1ead37b 100644--- a/src/components/ExecutionStatus.ts+++ b/src/components/ExecutionStatus.ts@@ -7,7 +7,6 @@ import {CircleCheck,CircleDashed,CircleDot,- CirclePause,CircleSlash,CircleX,Clock,@@ -36,7 +35,6 @@ const VISUALS = {completed: { color: cssVar.colorSuccess, icon: CircleCheck },failed: { color: cssVar.colorError, icon: CircleX },idle: { color: cssVar.colorTextTertiary, icon: Circle },- paused: { color: cssVar.colorTextDescription, icon: CirclePause },running: { color: cssVar.colorWarning, icon: CircleDot },scheduled: { color: cssVar.colorWarning, icon: Clock },waitingForHuman: { color: cssVar.colorInfo, icon: HandIcon },@@ -64,7 +62,6 @@ export const TOPIC_STATUS_VISUALS: Record<ChatTopicStatus, ExecutionStatusVisual// like a failed task run — the warning triangle reads that way, the circled X// reads as "closed/rejected".failed: { ...VISUALS.failed, icon: TriangleAlert },- paused: VISUALS.paused,running: VISUALS.running,scheduled: VISUALS.scheduled,// `unread` rows render a custom ripple dot; this is the fallback glyph.diff --git a/src/features/AgentSidebar/Topic/List/Item/index.test.tsx b/src/features/AgentSidebar/Topic/List/Item/index.test.tsxindex 48c3a3abf62..d3280a44410 100644--- a/src/features/AgentSidebar/Topic/List/Item/index.test.tsx+++ b/src/features/AgentSidebar/Topic/List/Item/index.test.tsx@@ -109,8 +109,7 @@ vi.mock('@/routes/(main)/agent/channel/const', () => ({getPlatformIcon: () => null,}));vi.mock('@/store/agent', () => ({- // `agentMap` is read by `agentSelectors.isCurrentAgentHeterogeneous` →- // `currentAgentConfig`, which would otherwise throw on `undefined.agentMap`.+ // `agentMap` is read by `agentSelectors.currentAgentVisibility`.useAgentStore: (selector: (state: { activeAgentId: string; agentMap: Record<string, unknown> }) => unknown,) => selector({ activeAgentId: 'agt_test', agentMap: {} }),@@ -254,7 +253,20 @@ describe('TopicItem active state', () => {render(<TopicItem id="tpc_test" status="running" title="Topic" />);expect(screen.queryByTestId('ring-loading')).not.toBeInTheDocument();- expect(screen.getByTestId('topic-item-icon')).toHaveAttribute('data-icon', 'Hash');+ expect(screen.queryByTestId('topic-item-icon')).not.toBeInTheDocument();+ });++ it('keeps idle topics iconless', () => {+ useTopicNavigationMock.mockReturnValue({+ isInAgentSubRoute: false,+ isInTopicContextRoute: false,+ navigateToTopic: vi.fn(),+ routeTopicId: undefined,+ });++ render(<TopicItem id="tpc_test" title="Topic" />);++ expect(screen.queryByTestId('topic-item-icon')).not.toBeInTheDocument();});it('prefetches messages when a topic is an unread completion', async () => {@@ -364,7 +376,6 @@ describe('TopicItem active state', () => {it.each([['scheduled', 'Clock'],- ['paused', 'CirclePause'],['completed', 'CircleCheck'],] as const)('keeps the %s status above linked pull request metadata', (status, icon) => {topicMetaCardMock.value = { pullRequest: { state: 'open' } };diff --git a/src/features/AgentSidebar/Topic/List/Item/index.tsx b/src/features/AgentSidebar/Topic/List/Item/index.tsxindex 01a381eccbd..36b58a1a735 100644--- a/src/features/AgentSidebar/Topic/List/Item/index.tsx+++ b/src/features/AgentSidebar/Topic/List/Item/index.tsx@@ -9,7 +9,7 @@ import { Flexbox, Icon, Popover, Skeleton, Tag, Text, Tooltip } from '@lobehub/uimport { createStaticStyles, cssVar, useTheme } from 'antd-style';import dayjs from 'dayjs';import isEqual from 'fast-deep-equal';-import { HashIcon, MessageSquareDashed } from 'lucide-react';+import { MessageSquareDashed } from 'lucide-react';import type { CSSProperties, DragEvent, RefObject } from 'react';import { memo, Suspense, useCallback, useEffect, useMemo, useRef, useState } from 'react';import { useTranslation } from 'react-i18next';@@ -177,14 +177,11 @@ const TopicItemRow = memo<TopicItemRowProps>(}) => {const { t } = useTranslation('topic');const { isDarkMode } = useTheme();- // Rows render by the dozen, so agent-level reads share ONE subscription:- // - heterogeneous agents (Claude Code, Codex, …) don't have chat-style- // topic semantics, so their rows skip the default `#` placeholder icon;- // - only workspace-shared (`public`) agents get the creator avatar — a- // workspace-private agent's topics all belong to the viewer.- const [activeAgentId, isHeterogeneousAgent, isSharedAgent] = useAgentStore((s) => [+ // Rows render by the dozen, so agent-level reads share ONE subscription.+ // Only workspace-shared (`public`) agents get the creator avatar — a+ // workspace-private agent's topics all belong to the viewer.+ const [activeAgentId, isSharedAgent] = useAgentStore((s) => [s.activeAgentId,- agentSelectors.isCurrentAgentHeterogeneous(s),agentSelectors.currentAgentVisibility(s) === 'public',]);const activeWorkspaceSlug = useActiveWorkspaceSlug();@@ -398,7 +395,7 @@ const TopicItemRow = memo<TopicItemRowProps>(// above — and above the PR marker, which shares this single icon slot.if (hasUnread) return <UnreadDot />;// Persisted execution state is the topic's primary status. Keep every- // non-idle state above git metadata so scheduled / paused / completed+ // non-idle state above git metadata so scheduled / completed// topics cannot be mistaken for merely open / merged / closed PRs.// `running` is handled exclusively by shouldShowRunningIcon above so// the masked post-output tail cannot fall back to a static running icon.@@ -433,19 +430,7 @@ const TopicItemRow = memo<TopicItemRowProps>(return null;})();- const hashIconNode = (- <Icon- icon={HashIcon}- size={'small'}- style={{- color: cssVar.colorTextDescription,- // Heterogeneous agents (Claude Code, Codex, …) have no chat-style- // topic semantics, so suppress the `#` glyph while keeping its- // box so the title stays aligned with sibling rows.- visibility: isHeterogeneousAgent ? 'hidden' : undefined,- }}- />- );+ const idleIconPlaceholder = <span aria-hidden style={{ flex: 'none', width: 16 }} />;// Workspace mode (creator resolvable): the creator's round avatar is the// primary visual and always leads the row; the row's own icon — execution@@ -456,7 +441,7 @@ const TopicItemRow = memo<TopicItemRowProps>(const leadingIconNode = author ? (<TopicCreatorAvatar corner={ownIconNode} userId={userId} />) : (- (ownIconNode ?? hashIconNode)+ (ownIconNode ?? idleIconPlaceholder));const navItem = (