
sswandClaude
9822219169
fix(menu): T7 critical — flatten tree, fetch formEnCode, pass urlAddress
修复 a9116a4 中 reviewer 识别的 2 个 critical production bug:
C1. 真实菜单树节点不带 formId 字段 (system/Menu/ModuleBySystem schema 无此
字段), 旧实现 formId 分支永远不命中 + 树未 flatten 叶节点也找不到
→ 调用方必须 flatten 树 (B-19 模式: nodes.flatMap([n, ...flatten(n.children)]))
C2. 旧实现传 requestedEnCode: opts.fullName (display name '申领单'), 真实
enCode 是 hash 后缀 ('tdd5supplyrequestd89a7'), 永远命中不了
→ 先 c.get('/visualdev/Base/{formId}') 拉 formEnCode, 用 formEnCode 反查
附加改进:
- requestedUrl: opts.urlAddress 接入, drift 检测生效 (I1)
- 树 flatten 在 webapiShim 里 (I2)
- 新增 3 集成测试覆盖生产路径 (I3):
* integration: 菜单树 + flatten + formEnCode 反查命中 (镜像 create.ts)
* integration: 没 flatten 的嵌套菜单节点 + enCode 反查 → 找不到
* integration: urlAddress drift 检测
- payload 加 requestedEnCode (I4)
- urlMatch: ?? false 默认 false (M1)
lookupByFormOrModule 自身不变 (已正确, 它只负责在扁平 list 里匹配)
Co-Authored-By: Claude <[email protected]>
2026-07-28 19:44:33 +08:00
..
2026-07-27 12:49:44 +08:00
2026-07-26 10:04:16 +08:00
2026-06-24 10:16:50 +08:00
2026-07-27 12:49:44 +08:00
2026-07-24 22:29:54 +08:00
2026-07-24 09:47:46 +08:00
2026-07-24 13:45:48 +08:00
2026-07-27 12:49:44 +08:00
2026-07-24 09:47:46 +08:00
2026-07-27 12:49:44 +08:00
2026-06-24 10:16:50 +08:00
2026-06-12 18:26:39 +08:00
2026-06-12 18:26:39 +08:00
2026-07-24 09:47:46 +08:00
2026-06-23 08:26:11 +08:00
2026-07-24 09:47:46 +08:00
2026-07-23 13:59:11 +08:00
2026-07-23 13:59:11 +08:00
2026-07-24 22:29:54 +08:00
2026-07-22 16:51:06 +08:00
2026-07-22 16:51:06 +08:00
2026-06-29 13:28:52 +08:00
2026-06-24 14:36:23 +08:00
2026-06-12 18:26:39 +08:00
2026-07-22 16:51:06 +08:00
2026-07-23 13:59:11 +08:00
2026-07-28 16:51:44 +08:00
2026-07-24 18:26:45 +08:00
2026-07-23 13:59:11 +08:00
2026-07-27 16:55:39 +08:00
2026-07-23 13:59:11 +08:00
2026-07-27 12:49:44 +08:00
2026-07-28 15:48:37 +08:00
2026-07-28 15:31:30 +08:00
2026-07-24 22:29:54 +08:00
2026-07-22 16:51:06 +08:00
2026-07-28 15:48:37 +08:00
2026-06-23 01:06:31 +08:00
2026-07-28 19:44:33 +08:00
2026-06-23 00:41:27 +08:00
2026-07-26 10:04:16 +08:00
2026-07-24 09:47:46 +08:00
2026-07-27 10:43:30 +08:00
2026-07-24 22:29:54 +08:00
2026-07-26 10:04:16 +08:00
2026-07-21 20:16:59 +08:00
2026-07-24 19:53:27 +08:00
2026-07-26 10:04:16 +08:00
2026-07-26 10:04:16 +08:00
2026-07-26 10:04:16 +08:00
2026-07-23 13:59:11 +08:00
2026-07-26 10:04:16 +08:00
2026-06-15 10:50:05 +08:00
2026-07-24 09:47:46 +08:00
2026-06-16 11:39:21 +08:00
2026-07-28 18:23:49 +08:00
2026-07-28 19:23:03 +08:00
2026-07-26 10:04:16 +08:00
2026-07-28 18:23:49 +08:00