From 677123b105cc218d085776f2565d5d75ba320161 Mon Sep 17 00:00:00 2001 From: Trae User Date: Thu, 17 Sep 2026 08:38:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E5=88=97=E8=A1=A8=E7=8A=B6=E6=80=81=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E5=B9=B6=E5=8A=A0=E9=80=9F=E4=BC=9A=E8=AF=9D=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 待回复改为主题色实底、白色常规字重,文案统一为「待回复」 - 运行中使用四个圆点的聚拢/分离动画,保留 reduced-motion 静态降级 - 已读/无需处理不再渲染空心圆,避免侧栏冗余视觉噪音 - 点击会话后立即切换主内容并读取磁盘历史,把耗时数秒的运行时恢复放到后台 - 恢复期间禁止建立实时连接,避免 daemon 未注册时反复出现 unknown session - 恢复成功后使用 resume 响应构造活动会话引用,并保留最新点击优先语义 测试:web 定向架构测试与 pnpm build 通过 --- web/src/App.jsx | 4 +- web/src/components/Sidebar.jsx | 106 ++++++++++++------ web/src/i18n/catalogs/en-US.js | 1 + web/src/i18n/catalogs/zh-CN.js | 1 + .../lib/permissionSidebarArchitecture.test.js | 19 ++++ web/src/lib/sessionTranscript.js | 9 +- web/src/lib/sessionTranscript.test.js | 2 + .../sidebarSessionLoadingArchitecture.test.js | 31 +++-- web/src/styles/globals.css | 60 +++++++++- 9 files changed, 177 insertions(+), 56 deletions(-) diff --git a/web/src/App.jsx b/web/src/App.jsx index 0dfb4af3..7aafb6b0 100644 --- a/web/src/App.jsx +++ b/web/src/App.jsx @@ -515,8 +515,8 @@ export function App() { setActiveRef(next); }, [resetSidebarSessionLoading]); - const navigateToRef = useCallback((nextRefOrUpdater) => { - resetSidebarSessionLoading(); + const navigateToRef = useCallback((nextRefOrUpdater, options = {}) => { + if (!options.preserveSidebarSessionLoading) resetSidebarSessionLoading(); const current = activeRefRef.current; const next = typeof nextRefOrUpdater === 'function' ? nextRefOrUpdater(current) diff --git a/web/src/components/Sidebar.jsx b/web/src/components/Sidebar.jsx index 3590df6c..61cc18f1 100644 --- a/web/src/components/Sidebar.jsx +++ b/web/src/components/Sidebar.jsx @@ -688,8 +688,22 @@ function SidebarSectionHeader({ sectionId, count, expanded, onToggle, actions = } function SessionAttentionIndicator({ attention, meta }) { + if (attention !== 'in_progress' && attention !== 'unread') return null; + return attention === 'in_progress' ? ( - + +