Skip to content

fix: dag inspector shows empty list - #428

Merged
LeXwDeX merged 6 commits into
mainfrom
fix/427-dag-inspector-shows
Aug 24, 2026
Merged

fix: dag inspector shows empty list#428
LeXwDeX merged 6 commits into
mainfrom
fix/427-dag-inspector-shows

Conversation

@LeXwDeX

Copy link
Copy Markdown
Owner

Closes#427

Why

双 DAG 并发运行时 /dag 出现"无任何 list/内容"的空态(非 100% 复现,本会话实测)。诊断结论:inspector 的数据发现完全依赖路由参数继承的 sessionID——dag.openroute.current.params 取值,任一环节缺失即走零请求分支直接渲染空列表(dag-inspector.tsx:133);且挂载 fetch 无超时,负载下悬挂时无任何用户可见反馈。项目级 GET /dag 端点已存在但未被使用。

What changed

  • inspector 挂载时以项目级 dag.list() 为发现源兜底,sessionID 仅作过滤提示;消除对 params 继承的单点依赖
  • 挂载 fetch 加超时与显式错误/重试态,杜绝永久 spinner
  • 无会话上下文时渲染明确指引文案而非伪装成 "No workflows"

Evidence

  • 新增 red→green 测试:无 sessionID 挂载仍能列出运行中工作流;summary 悬挂时进入错误态
  • 待门禁运行后填写

Checklist

  • Why, What changed, and Evidence are filled in.
  • specgit finish exits 0.

…on context
Root cause analysis for the intermittent empty /dag pane under concurrent
workflows: the mount-time dag.summary request had no timeout, so an RPC stall
pinned the route on its first attempt forever (spinner/empty pane), and the
no-sessionID branch silently rendered the loaded-empty state as if no
workflows existed.
Conservative fix, inspector-local only:
- wrap the mount fetch in a race timeout (dag_fetch_timeout_ms, default 15s)
- retry once after 400ms before surfacing "Unable to load workflows"
- render explicit guidance when the route carries no sessionID instead of
the misleading "No workflows for this session"
Both behaviors are pinned by new tests at the existing harness seam
(retry spy reaches >=2 calls; guidance copy renders with zero network calls).
@LeXwDeX
LeXwDeX marked this pull request as ready for review August 24, 2026 06:09
@LeXwDeX
LeXwDeX merged commit f39b24a into mainAug 24, 2026
9 checks passed
@LeXwDeX
LeXwDeX deleted the fix/427-dag-inspector-shows branch August 24, 2026 11:59
Sign up for freeto 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.

fix: dag inspector shows empty list

1 participant

@LeXwDeX