Skip to content

Kanban:补齐任务操作链路,明确能力边界#615

Merged
EKKOLearnAI merged 3 commits into
EKKOLearnAI:mainfrom
hanzckernel:wui-kanban-parity-gap-fill
May 11, 2026
Merged

Kanban:补齐任务操作链路,明确能力边界#615
EKKOLearnAI merged 3 commits into
EKKOLearnAI:mainfrom
hanzckernel:wui-kanban-parity-gap-fill

Conversation

@hanzckernel
Copy link
Copy Markdown
Collaborator

@hanzckernel hanzckernel commented May 10, 2026

相关:#594

Kanban 模块这次先把 comments、task log、reassign/specify/dispatch 这些已接入动作打通到 client/server 两侧,并把能力状态拆清楚。已经可用的显示可用,只接了一部分的显示部分支持;还没接好的 realtime、批量关系、外部通知和 adapter 迁移继续显示未完成,避免 UI 看起来能点,实际后端还没准备好。

为什么

当前的问题是:看板已经能把任务列出来,但“能看到任务”和“能安全操作任务”不是一回事。comments、task log、reassign/specify/dispatch 这些路径都会从 UI 经过 server route,再落到 Hermes Agent;如果 board 没传准,或者 UI 把还没完全接好的能力显示成可用,用户点下去就会得到一个看起来能操作、实际边界不清的结果。

所以这次需要先把中间这层理清楚:已接的动作都带 board,请求格式不对先在 server 拦住,能力状态也不再只有简单的“能/不能”,而是区分已支持、部分支持、还没接。后续再接 realtime / bulk / notify 时,就不用每个入口重新猜后端到底支持到哪一步。

完整形态是一个能真正操作 Kanban 的页面:按 board 看任务、改任务、查日志、加评论;UI 只展示后端已经支持到位的动作;后续 realtime、links/bulk、notify/subscription 都沿着同一套请求和能力状态接进来。

图景

flowchart TD
  User[用户] --> UI[Kanban UI]
  UI --> Client[API / Store]
  Client --> Server[Server routes]
  Server --> Guard[校验请求 + 规范 board]
  Guard --> Agent[Hermes Agent Kanban]

  Server --> Cap[能力状态:已支持 / 部分支持 / 未接入]
  Cap --> UI

  Agent -. 后续接入 .-> Watch[realtime watch]
  Agent -. 后续接入 .-> Relations[links / bulk operations]
  Agent -. 后续接入 .-> Notify[home notify / subscriptions]
  Agent -. 后续接入 .-> Adapter[canonical adapter]
Loading

边界

这次固定的边界是中间这层:已有动作要带 board、输入要先校验、能力状态要诚实返回、task log 不能吞掉真实 CLI 错误。图里虚线部分仍是后续工作,当前只保留明确的未接入 / 部分支持状态。

改动

  • 补全 comments、task log、diagnostics、reclaim、reassign、specify、dispatch 的 client/server 链路,统一带上 board 参数。
  • 能力状态改为 supported / partial / missing,补 commentsRead;还没接完整的能力不再只用一个可用开关表示。
  • 规范 board slug:对齐后端行为,支持大小写归一、_ 和 64 字符 slug;省略 board 仍走 default,显式空 board 拒绝。
  • controller 在 shell-out 前校验 request body / query,数组、非对象、错误 primitive、过大 tail / dispatch 参数直接 400。
  • task log 只把明确的 canonical no-log 文案映射成空日志;permission / CLI 失败继续暴露。
  • archived 任务详情保留结果/session 可读性,但不展示 complete/block/assign 这类可变更动作。
  • 补 client/server regression tests,覆盖 board propagation、能力状态、slug 兼容、no-log 分类、输入校验和 route 注册。

验证

已通过:

git diff --check
npm test -- tests/client/kanban-api.test.ts tests/client/kanban-store.test.ts tests/client/kanban-view.test.ts tests/client/kanban-task-drawer.test.ts tests/server/hermes-kanban-service.test.ts tests/server/kanban-controller.test.ts tests/server/kanban-routes.test.ts
npm run build

结果:

  • targeted Kanban tests:7 files / 51 tests passed
  • build / typecheck:passed
  • diff whitespace check:passed

已知:

  • 本地全量 npm test 目前仍会在 tests/server/session-sync.test.tsno such table: sessions;单独跑该文件也失败,且不在这个 PR 的 diff 里。这里先不把 session DB fixture 问题混进 Kanban 改动。

说明

  • 本 PR 不代表看板已经完成所有后端对接,主要是把已有 action 和能力边界规范化,为后续接 realtime、links/bulk、notify/subscription 打底。
  • review 重点看四块:board propagation、能力状态、controller input boundary、task log error classification。

- Align board slug normalization with canonical underscore/lowercase/64-char rules
- Validate malformed Kanban action bodies before CLI shell-out
- Narrow task log no-log handling and expose phase-1 capabilities
- Extend client/server regression coverage for parity actions
@hanzckernel hanzckernel changed the title WUI Kanban 第一阶段 parity 补齐与兼容加固 Kanban:补齐任务操作链路,明确能力边界 May 10, 2026
@hanzckernel hanzckernel changed the title Kanban:补齐任务操作链路,明确能力边界 Kanban:补齐 canonical action bridge 兼容行为 May 10, 2026
@hanzckernel hanzckernel changed the title Kanban:补齐 canonical action bridge 兼容行为 Kanban:补齐任务操作链路,明确能力边界 May 10, 2026
@hanzckernel
Copy link
Copy Markdown
Collaborator Author

补充验证:

  • 本地启动 Web UI build,使用临时 Hermes kanban CLI harness 覆盖看板 bridge 行为。
  • 通过浏览器检查 Kanban 页面加载、任务创建、board-scoped 请求、home channel 查询、订阅 / 取消订阅、links、bulk 等路径。
  • Playwright smoke 通过:2 tests passed。
  • focused Kanban tests 与 build 仍通过。
  • 人工浏览器测试未发现 blocker。

这次补充验证主要覆盖 Web UI → server route → Hermes kanban bridge 的端到端 wiring;真实外部通知投递、plugin-native canonical proxy 仍不在本 PR 范围内。

@EKKOLearnAI EKKOLearnAI merged commit 6ff1c18 into EKKOLearnAI:main May 11, 2026
1 check passed
@hanzckernel hanzckernel deleted the wui-kanban-parity-gap-fill branch May 11, 2026 20:57
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