Skip to content

vortex_act 的 kind 参数是死参——静默忽略而非路由 commit driver 或拒绝 #41

@benbergg

Description

@benbergg

现象

vortex_act({ action: "fill", target, kind: "time", value })kind 参数被静默忽略——不路由到 commit driver,也不报错。调用走 plain fill 路径,对 Element Plus time-picker / cascader / select 等 widget 不生效。

根因

kind → commit driver 的路由只存在于 vortex_fill 工具:

  • vortex_fill({ kind: "time", ... }) → dispatch 到 dom.commit(COMMIT handler,element-plus-time 等 driver)✅
  • vortex_act({ action: "fill", kind: "time", ... }) → dispatch 到 dom.fill(FILL handler,不读 kind)→ plain fill ❌

vortex_act 的 public schema 本就没有 kind 字段,client 传入后被当作额外参数静默吞掉(既不路由也不拒绝)。

为何现在浮现

CDP-first 输入转正(#40)暴露:bench el-time-picker case 一直误用 vortex_act(fill, kind=time)

  • 转正前:plain fill 走 value-setter,碰巧把 14:30:45 写进 time-picker 的 <input> value,result 显示正确 → 假 pass
  • 转正后:plain fill 走 CDP Input.insertText,触发 spinner panel 真实交互 → 落当前时间 → fail

case 已改走 vortex_fill(kind=time)(正确的 commit driver,与 el-select/daterange 等一致)。但产品面的死参问题仍在:用户同样可能误用 vortex_act(fill, kind) 而得不到任何提示。

期望(二选一,需产品决策)

  • 选项 A:vortex_act(action=fill, kind) 也路由 kind → commit driver,与 vortex_fill(kind) 行为对齐(act 作为 fill 的超集)
  • 选项 B(倾向,显式优于静默):vortex_act 遇到 kind 时显式 INVALID_PARAMS 报错,指引改用 vortex_fill——不静默吞参数

dead-param 族(参数被静默忽略而非路由或拒绝)。

参考

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions