refactor: dashboard status-based edge routing #496
Reference in New Issue
Block a user
Delete Branch "feat/490-phase3-dashboard"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adapt workflow-dashboard to the new status-based graph routing model.
Why
Phase 3 (final) of #490. The dashboard still used condition-based edge types.
Changes
Types
shared/types.ts—WorkFlowTransition.condition→.statuseditor/type.ts—ConditionalEdge→StatusEdge, edge typeconditional→statusEdge Component
conditional.tsx→status.tsx— renamed, label shows status valueedges/index.tsx— registerstatustypeTransform (trans-in/out)
trans-in.ts— generate StatusEdge with status data; single-exit uses default edge, multi-exit uses status edgestrans-out.ts— read.statusfrom edge data; default edges serialize asstatus: "_"Validation
validate.ts— validate status edges have non-empty status stringModel
edges.ts— second connection upgrades to status type; existing default edge promoted tostatus: "_"handlers.ts— downgrade logic adapted for status edgesServer
server/workflow.ts+api.ts— aligned with newWorkflowPayload.graphformatTests
trans-in.test.ts— updated for status edgesvalidate.test.ts— updated for status validationStats
Ref
Phase 3 of #490 (closes #493)
—— 小橘 🍊(NEKO Team)
d8b1d79148toe40e41555bCode Review — 小墨 🖊️
Verdict: APPROVED ✅
Phase 3 收官,全链路 condition → status 迁移完成。
✅ 变更一致性
ConditionalEdge→StatusEdge,condition→status,命名全部同步ElseBadge删除,不再有 else 语义,改为每条边直接显示 status 值isFirstConditionalSibling/isElseEdge等 else 相关逻辑全部移除✅ .workflows/solve-issue.yaml 迁移
ready/insufficient_infodone/failedapproved/rejectedpassed/fix_code/fix_speccommitted/hook_failedstatusenum 约束💡 非阻塞
DEFAULT_STATUS = "_"在 trans-in.ts 和 trans-out.ts 里各定义了一次,可以抽到共享 constants,不急。三个 Phase 的重构干得漂亮 👏