diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index dd5746e4..7ff1f30a 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -1564,6 +1564,7 @@ export const en = { summary: 'Summary', core_entities: 'Core Entities', communityDetailEmptyDesc: 'Click on a community in the chart on the left to view details', + communityLoadingTip: 'Generating community graph', }, space: { createSpace: 'Create Space', diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index f7a84f00..49a1b803 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -1562,6 +1562,7 @@ export const zh = { summary: '摘要', core_entities: '核心实体', communityDetailEmptyDesc: '点击左侧图表中的社区查看详情', + communityLoadingTip: '社区图谱生成中', }, space: { createSpace: '创建空间', diff --git a/web/src/views/ApplicationConfig/components/ConfigHeader.tsx b/web/src/views/ApplicationConfig/components/ConfigHeader.tsx index e2e1cf6f..77977a82 100644 --- a/web/src/views/ApplicationConfig/components/ConfigHeader.tsx +++ b/web/src/views/ApplicationConfig/components/ConfigHeader.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:27:52 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-18 21:25:23 + * @Last Modified time: 2026-03-19 17:13:54 */ import { type FC, useRef, useMemo, useCallback } from 'react'; import { useNavigate, useParams } from 'react-router-dom'; @@ -212,7 +212,7 @@ const ConfigHeader: FC = ({ className={styles.tabs} /> - {application?.type === 'workflow' && source !== 'sharing' + {application?.type === 'workflow' && source !== 'sharing' && activeTab === 'arrangement' ?
diff --git a/web/src/views/UserMemoryDetail/components/CommunityNetwork.tsx b/web/src/views/UserMemoryDetail/components/CommunityNetwork.tsx index 2757498d..75316693 100644 --- a/web/src/views/UserMemoryDetail/components/CommunityNetwork.tsx +++ b/web/src/views/UserMemoryDetail/components/CommunityNetwork.tsx @@ -1,6 +1,8 @@ import React, { useState, type FC, useEffect } from 'react' import { useParams } from 'react-router-dom' import { useTranslation } from 'react-i18next' +import { Spin, Flex } from 'antd'; + import type { CommunityD3Node, CommunityGraphData, RawCommunityGraphData, RawCommunityNode } from '@/components/D3Graph/types' import { buildCommunityGraphData } from '@/components/D3Graph/utils' import CommunityGraph from '@/components/D3Graph/CommunityGraph' @@ -40,14 +42,17 @@ const NodeTooltip: FC<{ node: CommunityD3Node }> = ({ node }) => { const CommunityNetwork: FC<{ onSelectCommunity?: (node: RawCommunityNode) => void }> = ({ onSelectCommunity }) => { const { id } = useParams() + const { t } = useTranslation() const [graphData, setGraphData] = useState(null) const [empty, setEmpty] = useState(false) + const [loading, setLoading] = useState(false) useEffect(() => { if (!id) return const controller = new AbortController() setEmpty(false) setGraphData(null) + setLoading(true) getMemoryCommunityGraph(id, { signal: controller.signal }).then(res => { const raw = res as RawCommunityGraphData if (!raw.nodes?.length) { setEmpty(true); return } @@ -55,9 +60,18 @@ const CommunityNetwork: FC<{ onSelectCommunity?: (node: RawCommunityNode) => voi if (!built) { setEmpty(true); return } setGraphData(built) }).catch((e) => { if (e?.code !== 'ERR_CANCELED') setEmpty(true) }) + .finally(() => setLoading(false)) return () => controller.abort() }, [id]) + if (loading) { + return + +
+ + + } + return (