Skip to content

fix: count skipped stages in parsing progress - #2500

Merged
lyingbug merged 1 commit into
Tencent:mainfrom
ttommybot:fix/knowledge-stage-progress-count
Aug 3, 2026
Merged

fix: count skipped stages in parsing progress#2500
lyingbug merged 1 commit into
Tencent:mainfrom
ttommybot:fix/knowledge-stage-progress-count

Conversation

@ttommybot

Copy link
Copy Markdown
Contributor

Description

修复文件解析主流程阶段数字未计入 skipped 状态的问题。

问题

解析进度使用“当前阶段”口径,但原来的后备计算只统计 done + 1

当中间阶段因为不适用而变成 skipped 时,当前阶段数字会少算;流程结束后的阶段总数也只统计 done,可能无法正确显示为 5/5

根因

进行过程中和流程结束后的两处统计都遗漏了 skipped 状态。

修改内容

  • 进行过程中改为使用 done + skipped + 1 计算当前阶段。
  • 当前阶段数字继续限制为不超过阶段总数。
  • 流程结束后改为使用 done + skipped 计算已处理阶段总数。
  • 保留 runningfailed 阶段的优先定位逻辑。
  • 保留“当前阶段”文案,不修改界面布局或样式。
  • 增加回归测试,覆盖进行中和流程结束后的两处统计规则。

Type of Change

  • 🐛 Bug fix
  • ✨ New feature
  • 💥 Breaking change
  • 📚 Documentation update
  • 🎨 Refactor
  • ⚡ Performance improvement
  • 🧪 Test
  • 🔧 Configuration / Build / CI

Related Issue

N/A

Testing

已完成:

  • git diff --check
  • 静态检查进行过程中使用 done + skipped + 1
  • 静态检查流程结束后使用 done + skipped
  • 增加对应回归测试
  • 前端单元测试
  • 前端类型检查

Checklist

  • make fmt && make lint && make test pass locally
  • Self-reviewed the code
  • Added/updated tests covering the change
  • Updated related documentation (README, docs/, Swagger annotations, etc.)
  • Breaking changes are clearly called out in the description above

@ttommybot
ttommybot marked this pull request as ready for review August 3, 2026 07:03
@lyingbug
lyingbug merged commit d3055ae into Tencent:main Aug 3, 2026
2 checks passed
@ttommybot
ttommybot deleted the fix/knowledge-stage-progress-count branch August 3, 2026 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants