docs: T40 UI 审计报告 + wiki 更新 + Docker 配置

- T40 UI 审计计划和结果文档(docs/qa/)
- wiki 更新:miniprogram 设计系统合规审计记录 + index 关键数字更新
- 审计 V2 完整报告(docs/audits/v2/)
- 讨论记录文档(docs/discussions/)
- 设计规格和实施计划(docs/superpowers/)
- 角色测试计划和结果(docs/qa/role-test-*)
- Docker 生产部署配置
This commit is contained in:
iven
2026-05-13 23:29:42 +08:00
parent 212c08b7ae
commit df1d85bfde
78 changed files with 10345 additions and 39 deletions

View File

@@ -1024,7 +1024,7 @@ mod tests {
Run: `cargo test -p erp-ai -- copilot::scoring::tests`
Expected: 3 tests PASS
- [ ] **Step 3: 添加 LLM 补充分析函数**
- [x] **Step 3: 添加 LLM 补充分析函数**
`scoring.rs` 中添加(不阻塞,失败返回 None
@@ -1057,18 +1057,18 @@ pub async fn llm_supplement(
}
```
- [ ] **Step 4: 修改 risk_service 使用 LLM 补充**
- [x] **Step 4: 修改 risk_service 使用 LLM 补充**
`risk_service::compute_risk` 中,规则评分完成后异步调用 `llm_supplement()`
- 成功:将结果写入 `copilot_risk_snapshots.llm_summary`
- 失败:`llm_summary` 为 None静默降级
- [ ] **Step 5: 编译验证**
- [x] **Step 5: 编译验证**
Run: `cargo check -p erp-ai`
Expected: 编译通过
- [ ] **Step 6: 提交**
- [x] **Step 6: 提交**
```bash
git add crates/erp-ai/src/copilot/scoring.rs crates/erp-ai/src/service/risk_service.rs
@@ -1081,7 +1081,7 @@ git commit -m "feat(ai): LLM 补充风险分析 + 降级策略"
- Modify: `crates/erp-ai/src/module.rs`(添加定时任务)
- Modify: `crates/erp-ai/src/service/risk_service.rs`
- [ ] **Step 1: 在 on_startup 中启动定时任务**
- [x] **Step 1: 在 on_startup 中启动定时任务**
```rust
// 每日凌晨 2:00 刷新所有在管患者风险快照
@@ -1097,14 +1097,14 @@ tokio::spawn(async move {
});
```
- [ ] **Step 2: 实现 refresh_all_patients**
- [x] **Step 2: 实现 refresh_all_patients**
`risk_service.rs` 中:
- 查询所有 `tenant_id``deleted_at IS NULL` 的患者
- 逐个调用 `compute_risk`
- 返回刷新数量
- [ ] **Step 3: 编译验证 + 提交**
- [x] **Step 3: 编译验证 + 提交**
```bash
git add crates/erp-ai/src/module.rs crates/erp-ai/src/service/risk_service.rs
@@ -1116,7 +1116,7 @@ git commit -m "feat(ai): 每日风险快照批量刷新定时任务"
**Files:**
- Create: `apps/web/src/api/copilot.ts`
- [ ] **Step 1: 创建 Copilot API 模块**
- [x] **Step 1: 创建 Copilot API 模块**
参照 `apps/web/src/api/health/articles.ts` 的模式:
@@ -1171,7 +1171,7 @@ export function getConsultHint(patientId: string) {
}
```
- [ ] **Step 2: 提交**
- [x] **Step 2: 提交**
```bash
git add apps/web/src/api/copilot.ts
@@ -1186,7 +1186,7 @@ git commit -m "feat(web): Copilot API 调用层"
- Create: `apps/web/src/components/Copilot/hooks/useCopilotRisk.ts`
- Create: `apps/web/src/components/Copilot/hooks/useCopilotInsights.ts`
- [ ] **Step 1: 创建 useCopilotRisk hook**
- [x] **Step 1: 创建 useCopilotRisk hook**
```typescript
import { useQuery } from '@tanstack/react-query';
@@ -1202,7 +1202,7 @@ export function useCopilotRisk(patientId: string | undefined) {
}
```
- [ ] **Step 2: 创建 useCopilotInsights hook**
- [x] **Step 2: 创建 useCopilotInsights hook**
```typescript
import { useQuery } from '@tanstack/react-query';
@@ -1218,7 +1218,7 @@ export function useCopilotInsights(patientId: string | undefined) {
}
```
- [ ] **Step 3: 创建 CopilotBadge**
- [x] **Step 3: 创建 CopilotBadge**
```tsx
import { Tag } from 'antd';
@@ -1244,7 +1244,7 @@ export default function CopilotBadge({ risk, loading }: Props) {
}
```
- [ ] **Step 4: 创建 CopilotCard**
- [x] **Step 4: 创建 CopilotCard**
可展开的洞察卡片,显示:
- 风险评分 + 规则匹配详情
@@ -1253,12 +1253,12 @@ export default function CopilotBadge({ risk, loading }: Props) {
使用 Ant Design 的 `Collapse.Panel``Card` 组件。
- [ ] **Step 5: 编译验证**
- [x] **Step 5: 编译验证**
Run: `cd apps/web && pnpm build`
Expected: 编译通过
- [ ] **Step 6: 提交**
- [x] **Step 6: 提交**
```bash
git add apps/web/src/components/Copilot/