Commit Graph

3 Commits

Author SHA1 Message Date
768ffa8551 refactor(web): isAdmin 收口到 isAdminProfile(B4)
5 处逐字硬编码 profile?.account==='admin'||userId==='ADMIN'(Topbar/ModelerPage/NewFeatureShell/AiFeatureForm/DesignCenterPage)收口到 auth/token.ts 纯函数 isAdminProfile,口径不变。
顺带:5 个页面测试的 vi.mock('../auth/token') 从整模块替换改为 importOriginal 只覆盖 getProfile(不再 mock 纯函数,修复 mock 漏 isAdminProfile 致的 render 崩)。
验证:新增 token.test.ts 4 测试 + tsc -b 干净 + vitest 18 文件/77 测试全绿。见总览 §10 B4。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-24 11:20:16 +08:00
5b117df4d1 feat(P1④/P1⑤): 改表加列UI + 审批列表入口e2e
- P1④ 改表加列: meta.ts alterEntity(POST /api/meta/entity/{table}/attributes)
  + ModelerPage 行内「加字段」Dialog(复用FieldTable),打破"v1只建新不改表"
  + five-ring.spec.ts 新增"改已有表加列(建模器加字段→元数据落库)"浏览器e2e
- P1⑤ 审批列表入口: 新增 approval-list-entry.spec.ts(纯mock)验生产主路径
  转换列表页按钮→选中行(checkOnItemClick)→openApprovalDrawer→AppShell→ApprovalDrawer抽屉打开
- build绿+vitest73;fivering 5/5 + 审批入口 1/1 全绿

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-21 13:56:27 +08:00
915443f585 feat(modeler): ModelerPage shell + /modeler route + entity list + new-entity dialog
canSubmit 去掉 rows.length>0 约束以满足 Task 15 测试(有效表名即可提交);字段表 Task 16 补。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 09:37:15 +08:00