fix(orchestrator): 运行历史抽屉按画布工作流隔离(#79) - #81
Merged
Conversation
问题:画布运行面板「历史」抽屉拉取 GET /wf1/api/runs 时不带过滤参数, 展示的是工作区内全部工作流的运行记录,还会把别的工作流的节点状态 投影回当前画布。 修复: - sqlite-store listRuns 增加可选 workflowId 参数(命中既有 runs_workflow_started_at 索引),缺省维持全量行为 - /wf1/api/runs 接受可选 workflowId query 参数并透传 store; 草稿画布与 RunSwitcher 等既有全量消费方不受影响 - RunHistory 接收当前画布 workflowId prop(App.jsx 传 currentWf?.id),fetch 时带上;草稿(无 id)不传参维持全量 测试:sqlite-store 过滤用例(含 limit/无匹配/缺省回归)+ schedule-api 集成用例(两工作流 + 草稿混合记录的过滤断言)。 全量单测 + build-web.sh 双构建通过。
Merged
chumingjun
added a commit
that referenced
this pull request
Aug 28, 2026
v0.5.1 以来 main 已合四个用户可见改动: - 定时任务 per-schedule 时区支持(#58/#78) - 运行中节点详情弹窗实时显示执行轨迹(#52/#80) - 运行历史抽屉按画布工作流隔离(#79/#81) - token 用量可视化:节点/运行级汇总 + cache 口径防误读(#64/#82) 两 feat 一 feat 一 fix → minor 0.6.0。8 个插件 package.json 与 dsh-ccpg-one 内部依赖表同步 bump;升级器测试的 npm latest mock 0.5.1 → 0.6.0(保持 latest 领先已装的语义)。 验证:全量单测绿;build-web.sh 双构建通过;assemble-one + publish-npm --dry-run 通过(dsh-harness-one@0.6.0,117 files)。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
fix #79。画布运行面板「历史」抽屉拉取
GET /wf1/api/runs不带过滤参数,展示工作区内全部工作流的运行记录,点选还会把别的工作流的节点状态投影回当前画布(onSelect 恢复路径与画布图不匹配)。方案
后端过滤为主、口径与
workflow_runs助手工具族对齐:listRuns(limit, workflowId?)新增可选过滤,WHERE workflow_id = ?命中既有runs_workflow_started_at索引;缺省(含 null/空串/草稿)语句与行为完全不变recentRuns透传 workflowId;GET /wf1/api/runs接受可选workflowIdquery 参数,缺省维持工作区级全量(RunSwitcher 等既有调用不受影响)RunHistory接workflowIdprop(拉取时带 query,useEffect依赖变更即重拉);App.jsx挂载点传currentWf?.id || null——草稿画布无 workflowId,自然走全量,符合 issue 期望行为验证
sqlite-store.test.mjs新增过滤用例(命中/limit/无匹配/缺省全量四态);schedule-api.integration.test.mjs新增 API 用例(两工作流 + 草稿混合记录:过滤只含本工作流、无匹配空列表、缺省全量)build-web.sh双构建通过?workflowId=wf_mt14cem3→ 5 条;?workflowId=wf_sqlite...→ 1 条;无参 → 15 条