feat(dashboard): workflow dashboard #127
Reference in New Issue
Block a user
Delete Branch "feat/118-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
Adds @uncaged/workflow-dashboard.
Why
RFC #118 Phase 3.
Changes
Ref
Part of #118. 261 tests pass.
e2451b259ctoce0d0a962cReview: feat(dashboard) — workflow dashboard
15 files, +476 lines,纯新增,无修改已有代码。整体结构清晰,初版 MVP 合格。
✅ 做得好的
api.ts):类型定义用| null而非?:,符合项目规范useFetchhook:正确用cancelledflag 防止 unmount 后 setState,discriminated union 状态设计干净⚠️ 需要处理
Sidebar
onBackprop 未使用(sidebar.tsx)onBack但解构时没用到:({ view, onViewChange }: Props)零测试
api.ts的类型和useFetchhook 值得单测无路由
💡 Nits
ThreadRecord的[key: string]: unknown:index signature 让类型安全打折扣,后续可以定义具体的 record union typesuseFetch用了.then()链(hooks.ts:19):CLAUDE.md 要求 async/await。虽然 dashboard 是独立前端包不受 BiomenoConsole约束,但建议统一风格健康检查无自动重连:StatusBar 只在 mount 时查一次
/healthz,如果先开 dashboard 后开 serve,会一直显示 Offline。建议加 polling 或 retryVerdict
⚠️ Comment — #1 (unused prop) 应该修掉,#2-3 开 issue 跟踪即可,其余 nit 不阻塞合并。修完 #1 后我 approve。
@@ -0,0 +4,4 @@onBack: () => void;};export function Sidebar({ view, onViewChange }: Props) {onBack在 Props 里定义了但解构时被忽略了。要么用上(比如某个返回按钮),要么从 Props 中移除。@@ -0,0 +16,4 @@let cancelled = false;setState({ status: "loading", data: null, error: null });fetcher().then((data) => {Nit:
.then()链 → 建议改 async/await 统一风格(CLAUDE.md 约定)✅
onBack已清理,Issue #128 跟踪后续。LGTM,合并。