Skip to content

Commit 4f3acf7

Browse files
author
remotenwsshell
committed
fix: correct version tree filtering to exclude failed/vetoed proposal versions
1 parent 0e89a4d commit 4f3acf7

4 files changed

Lines changed: 3333 additions & 16 deletions

File tree

docs/dev_log.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,13 @@
7777
- 调整 Home 页面组件顺序,将 FeaturedDocuments 移到 LatestProposals 之前
7878
- 移除 Library 页面的 New Document 按钮
7979
- 创建完整的 FAQ 页面组件 (src/pages/FAQ/index.tsx)
80-
80+
* Frontend: 修复 Document 页面 Version Tree 过滤逻辑错误
81+
- **问题**: Version Tree 错误显示失败/否决提案版本
82+
- **根因**: 使用版本ID数字比较 (`id <= currentVersionIdNumber`) 而非祖先链追踪
83+
- **解决方案**:
84+
1. 修改 `versionDetails` 查询使用 `normalizedIds` 替代 `visibleVersionIds`
85+
2. 重写 `visibleVersionIds` 过滤逻辑,基于 `parentVersionId` 祖先链追踪
86+
3.`builtVersionNodes` 中添加安全过滤,确保只显示已执行版本
87+
- **验证**: TypeScript编译、ESLint、项目构建、37个单元测试全部通过
88+
- **文件**: 仅修改 `frontend/src/pages/Document/index.tsx`
89+

0 commit comments

Comments
 (0)