--- fe_id: FE-02 date: 2026-05-15 round: 2 reviewer: fe-code-reviewer --- # Review: FE-02 — round 2 ## 结论 approve ## Round 1 修复落地核对 | # | 项目 | 状态 | |---|------|-----| | H1 | UserFormPage edit prefill canEditDocument from backend(之前硬编码 false) | ✓ | | M1 | UsersTable a11y 键盘可达(tabIndex/role/aria-label/onKeyDown)+ 操作列编辑链接 + 列头 sorter | ✓ | | M2 | UserFormPage employeeId 三态映射(toCreateEmployeeId→null / toUpdateEmployeeId→保留) | ✓ | | M3 | api/users.ts CreateUserReq/UpdateUserReq.employeeId 类型补 `| null` | ✓ | | L1 | UserPermissionPanel 补 process/driver 两个 disabled Tab(与 prototype 对齐) | ✓ | | L2 | UsersListPage 默认 sortField='tCreateDate'/sortOrder='desc' 显式发后端 | ✓ | | L3 | usersConstants QUERY_FIELD_OPTIONS 补 lastLoginDate | ✓ | | TEST | canEditDocument prefill 测试 + msw handler 返回该字段 | ✓ | ## Nice-to-have(保留延后) - frontend/src/pages/users/UserFormPage.tsx:129 — 40004 仍 banner;后端协议补 detail.field 后切 field-level - frontend/src/pages/users/UsersTable.tsx:73 — 列头 sorter UI 已加但 onChange 未连到 UsersListPage.setQuery;视觉 sorter 生效但点击列头不会实际改变排序 - frontend/src/pages/users/UsersListPage.test.tsx — 缺 error banner 渲染态测试 - frontend/src/pages/users/UserFormPage.test.tsx — 缺 40004 错误码测试 - frontend/src/pages/users/UsersToolbar.tsx — prototype 还有作废 / 删除 / 重置密码 等按钮;FE-02 spec § 一已声明推后 ## 7 维 checklist | # | 维度 | 状态 | |---|------|-----| | 1 | Prototype consistency | pass(UsersTable 操作列 + UserPermissionPanel 5 个 Tab) | | 2 | Design tokens | pass(仅 App.tsx 受控 hex 镜像 ConfigProvider colorPrimary) | | 3 | A11y | pass(tabIndex/role/aria-label/onKeyDown + Form.Item label) | | 4 | Responsive | pass | | 5 | 业务校验前端复刻 | pass(spec § 五 #3-7,11,12,16-17 全部实现;#13 banner 可接受) | | 6 | API consistency | pass(统一 apiClient) | | 7 | 状态机覆盖 | pass(5 基础态 + spec 列出的错误态) | ## 反例 / 测试覆盖缺口 44 vitest 通过;3 个 Playwright E2E `.fixme()` 留作手工验收。缺 list error 渲染态 + form 40004 路径的单测覆盖(已记 nice-to-have)。sortField/sortOrder UI ↔ query 通道未拉通——sorter 列头视觉已有但回调未绑,不影响默认排序但影响主动排序;可下个 FE 接前接 Table onChange。 ## 总结 Round 1 全部 8 项 must-fix 已正确落地:编辑模式 prefill canEditDocument 走 detail VO 透传修复了静默数据回写 bug;UsersTable a11y / 操作列 / sorter 全套;employeeId 三态语义按 spec § 八 锁定;prototype Tab 对齐;默认排序显式发后端;QUERY_FIELD_OPTIONS 完整。所有 nice-to-have 均为用户标注的延后项,不阻断 approve。