Commit Graph

145 Commits

Author SHA1 Message Date
iven
4dd5a1b4d9 refactor(mp): 迁移创建页 — 使用 PageShell + ContentCard 统一组件库
处方创建、透析记录创建、预约创建三个表单页迁移:
- 最外层容器 ScrollView/View → PageShell
- 表单分组 section View → ContentCard
- SCSS 删除 min-height/background/box-shadow 通用样式
2026-05-16 01:33:06 +08:00
iven
900c9babc3 refactor(mp): 迁移预约+AI报告详情页 — 使用统一组件库 (12/12)
预约详情页:
- View.detail-page → PageShell 替代手写 page 容器
- 手写 detail-header → PageHeader 组件
- .status-card / .info-section / .tips-card → ContentCard
- 删除通用 page 容器、header 和 card 样式

AI 报告详情页:
- View.detail-page → PageShell 替代手写 page 容器
- .detail-card / .content-card → ContentCard
- 删除通用 page 容器和 card 样式,保留 RichText 内部样式
2026-05-16 01:17:04 +08:00
iven
61f1061092 refactor(mp): 迁移患者端详情页 — 使用统一组件库 (10/12)
报告详情、随访详情、透析记录详情、透析处方详情页:
- View.detail-page → PageShell 替代手写 page 容器
- .detail-card → ContentCard 替代手写卡片样式
- 删除通用 page 容器和 card 样式,保留业务布局样式
2026-05-16 01:16:49 +08:00
iven
85701ddeb2 refactor(mp): 迁移医生核心详情页 — 使用统一组件库 (6/12)
随访详情、患者详情页:
- ScrollView → PageShell 替代手写 page 容器
- .section → ContentCard 替代手写卡片样式
- 删除通用 page 容器和 card 样式,保留业务布局样式
2026-05-16 01:16:32 +08:00
iven
5e230ba1b5 refactor(mp): 迁移医生临床详情页 — 使用统一组件库 (4/12)
告警详情、报告详情、处方详情、透析详情页:
- ScrollView → PageShell 替代手写 min-height/bg/padding
- .section / .alert-detail-card → ContentCard 替代手写卡片样式
- 删除通用 page 容器和 card 样式,保留业务布局样式
2026-05-16 01:16:16 +08:00
iven
8d41d5a167 refactor(mp): 迁移随访列表页 — 使用统一组件库 PageShell/ContentCard/StatusTag/LoadingCard/SearchSection 2026-05-16 00:56:51 +08:00
iven
40b88c566d refactor(mp): 迁移医护咨询列表页 — 使用统一组件库 PageShell/ContentCard/StatusTag/LoadingCard/SearchSection/PaginationBar 2026-05-16 00:56:38 +08:00
iven
483342a1d8 refactor(mp): 迁移告警列表页 — 使用统一组件库 PageShell/ContentCard/StatusTag/LoadingCard/SearchSection/PaginationBar 2026-05-16 00:56:26 +08:00
iven
ae23baeece refactor(mp): 迁移报告列表页 — 使用统一组件库
- PageShell 替代手写 ScrollView + min-height/bg/padding
- SearchSection 替代搜索栏
- ContentCard 替代 report-card 手写样式
- StatusTag 替代 report-card__reviewed 手写标签
- LoadingCard 替代 Loading 组件
- 精简 SCSS:删除 page/search-bar/card 通用样式,保留业务特有样式
2026-05-16 00:56:18 +08:00
iven
3e88dcaba5 refactor(mp): 迁移处方列表页 — 使用统一组件库
- PageShell 替代手写 ScrollView + min-height/bg/padding
- SearchSection 替代搜索栏 + SegmentTabs 替代 tabs(预设患者时)
- ContentCard 替代 prescription-card 手写样式
- StatusTag 替代 status-tag 手写样式
- LoadingCard 替代 Loading 组件
- PaginationBar 替代手写分页
- 精简 SCSS:删除 page/search-bar/card/pagination 通用样式,保留业务特有样式
2026-05-16 00:56:02 +08:00
iven
9415807a40 refactor(mp): 迁移透析列表页 — 使用统一组件库
- PageShell 替代手写 ScrollView + min-height/bg/padding
- SearchSection 替代搜索栏 + SegmentTabs 替代 tabs(预设患者时)
- ContentCard 替代 record-card 手写样式
- StatusTag 替代 status-tag 手写样式
- LoadingCard 替代 Loading 组件
- PaginationBar 替代手写分页
- 精简 SCSS:删除 page/search-bar/card/pagination 通用样式,保留业务特有样式
2026-05-16 00:55:50 +08:00
iven
1579f35ff5 refactor(mp): 迁移患者咨询列表页 — 使用统一组件库
- PageShell 替代手写 min-height/bg/padding
- ContentCard 替代手写 session-card 卡片样式
- StatusTag 替代手写 session-tag 状态标签
- LoadingCard 替代初始加载态
- EmptyState 替代手写空状态
- ErrorState 替代手写错误状态
- 精简 SCSS 删除已接管样式,保留按钮/头像/角标等页面特有样式

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 00:55:40 +08:00
iven
9728afbc1b refactor(mp): 迁移文章列表页 — 使用统一组件库
- PageShell 替代手写 min-height/bg/padding
- ContentCard 替代手写 article-card 卡片样式
- LoadingCard 替代初始加载态
- 精简 SCSS 删除已接管样式,保留分类筛选/卡片内容布局

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 00:55:24 +08:00
iven
80794c9547 refactor(mp): 试点迁移患者列表页 — 使用统一组件库
替换手写 UI 为:
- PageShell 替代手动 min-height/bg/padding
- SearchSection 替代手写搜索栏 + 标签筛选
- ContentCard 替代手写卡片样式(背景/圆角/阴影/触摸反馈)
- StatusTag 替代 @include tag() mixin
- LoadingCard 替代初始加载的 Loading 组件

SCSS 从 151 行精简到 65 行,保留页面特有业务样式。
数据加载逻辑(无限滚动 + usePageData)保持不变。
2026-05-16 00:50:27 +08:00
iven
d758563a13 feat(mp): 小程序统一组件库 Phase 1 — Token 扩展 + 10 组件 + useListPage Hook
三层架构组件库:
- 第 1 层原子组件:PageShell/ContentCard/StatusTag/SectionTitle/LoadingCard
- 第 2 层组合模式:PageHeader/SearchSection/CardList/PaginationBar
- 第 3 层 Hook:useListPage(列表页通用逻辑抽象)

Token 扩展:新增 --tk-card-*/--tk-gap-*/--tk-page-* 等结构化 CSS 变量,
关怀模式通过变量覆写自动生效,新组件零额外代码即获关怀支持。

设计规格:docs/superpowers/specs/2026-05-16-miniprogram-unified-components-design.md
2026-05-16 00:47:39 +08:00
iven
3fb5a77ac0 refactor(mp): 统一空状态为 EmptyState 组件 + 清理旧 Tab CSS
- 4 个页面的内联空状态替换为共享 EmptyState 组件
  (messages / action-inbox / pkg-health/alerts / mall)
- 清理 10 个页面的旧 Tab CSS(迁移到 SegmentTabs 后不再需要)
- 清理 elder-mode 中已删除的 mall-empty-state 引用
2026-05-15 23:11:34 +08:00
iven
c06e986090 fix(mp): 小程序页面优化 + E2E 测试报告更新
- 小程序各页面优化和修复
- 更新联调报告和 E2E 测试报告
- 更新 miniprogram wiki
2026-05-15 23:03:21 +08:00
iven
4ca9027cd6 fix: 联合调试问题修复 — 预约错误提示 + request 错误提取 + copilot 解包
- ISSUE-APPOINTMENT-001: 后端 DoctorNotFound 改为 Validation 错误(400)
  + 改善错误消息"所选医生暂无医护档案,请联系管理员"
  + 小程序预约创建 catch 传递实际错误消息(不再硬编码"预约失败")
  + 小程序 request.ts 提取后端 message 字段作为用户提示
- copilot API: listInsights/listRules/getPatientRisk 补齐 data.data 解包
- 移除 error.rs 重复的 AppointmentNotFound 分支
2026-05-15 15:25:26 +08:00
iven
057d9b5896 fix(health): 修复咨询统计返回零值 BUG + 清理 secure-storage 过时注释
BUG-CONSULTATION-001: safe_aggregate 包装导致 compute_avg_response_time
SQL JOIN 错误时整个统计函数返回零值默认。修复方式:
- handler 层移除 safe_aggregate 改为直接 .await?
- service 层对 compute_avg_response_time 独立错误处理(warn + None)

同时清理 secure-storage.ts 中关于 crypto-js 的过时注释(已移除)。
2026-05-15 15:05:53 +08:00
iven
dc983945ff fix(mp): 五专家组审查 HIGH 级问题修复 — 9 项
- S-1: 隐私政策描述修正("混淆加密" → "HTTPS + 微信沙箱")
- A-1: getCachedPatientId 统一导出 + 9 处 Storage 直读替换
- A-2: usePageData loading 改为 useState 响应式
- A-3: health.ts refreshingToday 移入 store state
- M-2: prod config 移除 console.error/warn
- M-4: clearCache 后同步刷新 request.ts 内存缓存
- Q-3: doctor/appointment.ts any[] → Appointment 类型
- Q-4: daily-monitoring 常量提取到 constants.ts
- 清理: 删除空目录 FamilyPicker/HealthCard + 未使用组件 DeviceCard
2026-05-15 09:17:36 +08:00
iven
4c38fcd89d refactor(mp): 分包策略优化 — 合并单页分包 + doctor 拆包 + consultation 移出主包
- 合并 4 个单页分包:report→pkg-profile/reports, followup→pkg-profile/followups,
  events→pkg-profile/events, device-sync→pkg-health
- consultation/detail 移出主包到 pkg-consultation 分包(减少主包体积)
- doctor 18 页拆分为 pkg-doctor-core(8页) + pkg-doctor-clinical(10页)
- 全部导航路径和 import 路径同步更新
- 分包 10→8 个,主包页面 13→12
2026-05-15 07:53:00 +08:00
iven
5baa518516 refactor(mp): 长轮询通用化 — useLongPolling hook + 咨询详情页接入
- 新增 useLongPolling hook:generation counter 防重叠、useDidShow/Hide 可见性控制、失败退避、enabled 守卫
- 患者端 + 医生端 consultation/detail 接入,删除约 80 行重复长轮询代码
- 架构建议 5/5 全部完成 
2026-05-15 07:38:20 +08:00
iven
6d151bbfb1 refactor(mp): request.ts 模块级状态收编 + AbortSignal + Analytics 受控
- 提取 ConcurrencyLimiter 类(并发限制 8,可 reset)
- 提取 ResponseCache 类(GET 缓存 + 去重 + patientId 绑定)
- 新增 resetForTesting() 测试隔离函数
- api.get/post/put/delete 支持 AbortSignal 请求取消
- app.tsx Analytics 定时器改为 useDidShow/useDidHide 控制后台暂停
- 测试文件接入 resetForTesting()

构建通过,测试 74/75(1 个预存失败)。
2026-05-15 06:58:37 +08:00
iven
1fd2c7a533 refactor(mp): 架构重构 — usePageData 统一数据加载 + Store 解耦 + 大页面拆分
新增 usePageData hook(useDidShow 节流 + usePullDownRefresh + loadingRef 防重入 + enabled 条件守卫),
44/58 页面迁移接入,消灭 4 种数据加载模式并存。

- 新增 hooks/usePageData.ts — 统一页面数据加载生命周期
- 新增 stores/index.ts — resetAllStores() 解耦 auth↔health store 依赖
- 新增 pages/index/useHomeData.ts — 首页数据 hook(424→282 行)
- 新增 pages/health/useHealthData.ts — 健康页数据 hook(422→254 行)
- 44 个页面迁移到 usePageData(9 患者端 + 15 医生端 + 20 子包)
- auth store logout 不再直接导入 health store

构建通过,测试 74/75(1 个预存失败)。
2026-05-15 01:13:01 +08:00
iven
fed1759985 fix(mp): setTimeout 无清理修复 — useSafeTimeout hook + 10 页面接入
新增 useSafeTimeout hook,页面隐藏时自动清理所有定时器。
10 个页面接入:daily-monitoring、exchange、family-add、
health/input、prescription detail/create、dialysis detail/create、
appointment detail/create。所有 fire-and-forget setTimeout 替换为
safeSetTimeout,避免页面切走后定时器回调在错误上下文执行。
2026-05-15 00:38:23 +08:00
iven
74bffb4878 fix(mp): 患者端卡死深度审查修复 — CRITICAL 回归 + 并发保护 + 页栈溢出防护
CRITICAL:
- 咨询详情页 loadData 引用已删除的 pollingRef → 移除残余引用

HIGH:
- 401 重试递归改循环结构,避免并发限制器双 slot 占用
- 医生端 4 个列表页添加 loadingRef 防重入(consultation/alerts/dialysis/prescription)
- 新增 safeNavigateTo 页栈溢出保护(栈≥9 自动 redirectTo)

前期修复一并提交:
- 全局并发限制 MAX_CONCURRENT=8
- doRefresh 失败时完整清理 Storage + 重置缓存状态
- 401 跳转登录页修正
- 长轮询 generation counter 模式
- 首页/健康页 loadingRef + refreshToday 去重
2026-05-15 00:30:59 +08:00
iven
8f353946e1 fix(mp): T40 UI 审计修复 — 28 项设计系统合规 + 安全加固 + 讨论记录
T40 UI 审计修复(60 页面全覆盖):
- 新增 $acc-d/$wrn-d 渐变中间色变量,修复首页轮播渐变硬编码
- 替换 8 处裸 white 为 $white 设计变量(5 个 SCSS 文件)
- 修复 7 处触摸目标 40/44px → 48px(健康/消息/咨询/预约/首页)
- 3 页面新增 Loading 状态(体征录入/个人中心/就诊人添加)
- statusTag 移除硬编码布局值,改用 SCSS mixin 控制
- 医生端 14 页面架构 Hook 层补充(useThrottledDidShow 替换 useEffect)
- 移除 action-inbox 未使用 import

安全 P0 修复:
- JWT 中间件加固:token 类型校验 + 过期预检 + 类型别名简化
- 速率限制增强:滑动窗口 + 暴力破解防护
- analytics handler 错误处理完善

文档:
- T40 审计报告(24 PASS / 36 PASS_WITH_ISSUES / 0 NEEDS_WORK)
- 5 份 DevTools/性能审计讨论记录
- wiki 症状导航 + 小程序章节更新
2026-05-14 23:12:54 +08:00
iven
447126b6c5 fix(mp): 安全 P0 修复 + 架构 Hook 层补充 + 五专家组分析报告
安全修复:
- 提取 sanitizeHtml 共享工具,修复 article/detail RichText XSS 风险
- request.ts 生产环境强制 HTTPS,消除 HTTP 回退风险
- 错误信息净化:后端错误码映射为用户友好消息,不再透传原始内容
- Token 生命周期管理:利用 expires_in 记录过期时间,请求前主动刷新

工程修复:
- Babel 依赖从 dependencies 移至 devDependencies(包体积优化)

架构改进:
- 新增 usePagination hook(分页加载 + hasMore + refresh,10+ 页面可复用)
- 新增 useAuthRequired hook(登录态 + 患者档案 + 角色判断统一入口)
- 新增 usePageRefresh hook(下拉刷新统一封装,17 页面可复用)

文档:
- 五专家组深度分析+头脑风暴报告(架构7.2/安全5.5/UX6.0/工程5.5/产品7.2)
2026-05-14 20:22:29 +08:00
iven
a8d7183d7c fix(mp): T40 UI 审计修复 — 28 项设计系统合规 + MCP forceSetAuth bridge
T40 小程序 UI 审计全部 60 页面,发现 28 项问题(HIGH×3 MEDIUM×10 LOW×15),
全部修复并通过静态验证(0 硬编码 border-radius/font-size 残留)。

主要修复:
- border-radius: 12 个文件硬编码值 → $r-xs/$r-lg/$r-pill 设计 token
- touch target: 5 个交互元素添加 min-height: 48px(action-inbox/mall/family/medication)
- elder-mode 页面接入 useElderClass(),预览字号改用 var(--tk-font-body)
- consultation 页面增加加载失败 toast 提示
- app.tsx 新增 forceSetAuth bridge 解决 MCP auth 注入兼容问题
- FAB 按钮和开关控件尺寸规范化

审计结果:PASS 41 / PASS_WITH_ISSUES 19 → 修复后全量 PASS
2026-05-14 09:38:02 +08:00
iven
9e0f421c14 chore(mp): 添加开发启动脚本(缓存清理+编译) 2026-05-13 23:56:54 +08:00
iven
9faccac9eb perf(mp): 移除 Zod 依赖,轻量验证替代 — 包体积 -300KB
- 新增 utils/validate.ts 轻量验证工具(<1KB vs Zod 360KB)
- daily-monitoring: Zod schema → validateNum() 直接验证
- input: Zod schema → num()/validateStr() 直接验证
- config/index.ts: 移除 Zod include 编译配置

效果:总体积 1.8MB→1.5MB(-17%),pkg-health 分包 432KB→84KB(-81%)
2026-05-13 23:56:12 +08:00
iven
0f6f7a2851 fix(mp): DevTools 卡死优化 — filesystem 缓存 + prebundle
- webpack5 filesystem cache 加速二次编译
- prebundle 关闭(避免与 taro-loader 冲突)
- 配合 Watchman 安装 + ulimit 提升可根本解决卡死
2026-05-13 23:48:35 +08:00
iven
9c7ce939c7 fix(mp): 真机调试 EMFILE — 关闭 dev 模式 source map
真机调试时报 EMFILE: too many open files,根因是 dev 构建
默认生成 69 个 .map 文件,DevTools + webpack watcher 同时
打开导致文件描述符耗尽。通过 chain.devtool(false) 关闭
source map,dist 文件数从 356 降至 269。
2026-05-13 23:35:17 +08:00
iven
675d5a3405 feat(mp): 新增 navigate 工具函数 2026-05-13 23:29:56 +08:00
iven
616e0a1539 feat(mp): 小程序功能完善 — 服务层扩展 + 页面优化
- 新增 actionInbox 服务层(待办事项列表/线程查询)
- consultation 服务扩展(会话详情/发送消息)
- 多页面代码优化(profile/messages/health/article)
- 新增 navigate 工具函数
2026-05-13 23:26:38 +08:00
iven
93c77c5857 fix(mp): T40 UI 设计系统合规审计修复 — 60 页面全覆盖
- 新增 $white 语义变量 + --tk-font-display Token
- 44 处 #fff → $white,2 处 background: #fff → $card
- 14 处 border-radius 硬编码统一为 $r-xs/$r-lg/$r
- 3 处 TSX inline 颜色提取为 SCSS 类(exchange/orders/action-inbox)
- ErrorBoundary 重构:6 个 inline style → SCSS 类 + Design Token
- 2 处离调色板颜色修正(#0284C7→$tx2, #94A3B8→$tx3)
- 2 处静默 catch 块添加状态清理(article/health)
- 趋势页补 Loading/EmptyState;咨询页 GuestGuard 统一
- 4 处 #FFFFFF → $white(mixins/index/exchange/variables)
2026-05-13 23:26:00 +08:00
iven
935ca70dfa test(mp): service 层测试扩展 — health + consultation + request
新增 3 个测试文件(+23 个测试用例),总计 9 文件 75 测试:
- request.test.ts: HTTP 方法、查询参数构建、缓存、错误处理
- health.test.ts: 体征录入字段映射、日常监测、阈值查找
- consultation.test.ts: 咨询会话/消息 CRUD、已读标记

- 添加 vitest setup.ts mock @tarojs/taro 和 @tarojs/runtime
- vitest.config.ts 增加 setupFiles 配置

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 14:10:27 +08:00
iven
af3eb0c7a1 feat(miniprogram): service 层测试框架搭建
- 新增 __tests__/helpers/: mock-taro (Taro API mock) + mock-api (request mock)
- 示例测试: patient.test.ts (3 用例) + appointment.test.ts (9 用例)
- 覆盖 list/create/update/cancel/calendar 等核心场景
- 全部 42 测试通过(含 4 个已有 BLE 测试)
2026-05-11 13:58:58 +08:00
iven
4788e19a1d fix(health,miniprogram): 轮播图图片改用相对路径 + wx.downloadFile 解决 HTTP 限制
问题:微信小程序 <image> 不支持 HTTP URL,签名 URL 与 upload 中间件不兼容。
修复:
1. 公开轮播图 API 返回相对路径(/uploads/...)而非签名 URL
2. 小程序用 wx.downloadFile 下载图片后使用本地临时路径
3. 移除 banner_handler 中不再需要的 base_url/Host header 逻辑
2026-05-10 20:14:43 +08:00
iven
fca0b5a78f feat(health): 新增公开文章列表端点 /public/articles 供小程序访客首页使用
访客首页文章列表调用 /health/articles 需要 JWT 认证导致 401。
新增 GET /public/articles?tenant_id=xxx 端点,强制只返回已发布文章,
无需认证。小程序访客首页改用此公开端点。
2026-05-10 19:14:31 +08:00
iven
09725acad7 feat(miniprogram): 访客首页支持无登录态获取轮播图(编译时注入默认 tenant_id) 2026-05-10 17:20:43 +08:00
iven
b2c6d9c8c8 feat(miniprogram): 访客首页轮播图接入公开 API + 文章列表替换核心功能区域 2026-05-10 16:23:17 +08:00
iven
3c828bfc4a fix(miniprogram): 退出登录后刷新仍保持登录态
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
根因:logout 清除 storage 期间并发请求触发 tryRefreshToken 写回新 token
修复:添加 isLoggingOut 标记,logout 时先标记阻止 token 刷新竞态
2026-05-10 10:36:17 +08:00
iven
11101ac204 feat(auth): 微信登录自动分配 patient 角色 + 创建患者档案
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新增迁移 m20260510_000133:为所有租户创建 patient 角色并分配 19 个权限
- wechat_service: bind_phone 自动 assign_patient_role + ensure_patient_record
- find_or_create_user_by_phone 新用户自动获得 patient 角色和患者档案
- 小程序 auth store: bindPhone 抛出异常而非静默返回 false
- 小程序登录页: 捕获绑定错误并显示可操作的对话框
2026-05-10 09:57:45 +08:00
iven
890c132890 refactor(miniprogram): 全面接入 Design Token — 68 SCSS 文件 px→var(--tk-*)
Some checks failed
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
- 重写 tokens.scss:校准 10 级字号 + 4 结构 token 匹配实际设计值
- 更新 mixins.scss:4 个 mixin 引用 token 替代硬编码
- 68 SCSS 文件全面迁移:font-size px → var(--tk-font-*),辅助文字色 → var(--tk-text-secondary)
- 清理 12 个页面的本地 mixin 重复定义
- elder-mode.scss 从 530 行缩减至 ~120 行:删除所有字号/颜色覆写,仅保留结构布局
- Token 覆盖率:634 引用 / 仅 3 个特殊硬编码值(72px/80px/21px)

关怀模式通过 CSS 变量级联自动生效,消除"打地鼠"问题。
2026-05-09 23:53:07 +08:00
iven
257ca94a25 fix(miniprogram): 登录页尺寸过大 + 排除关怀模式
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 正常模式大幅缩减:标题 48→32px、按钮高 96→56px、按钮字 32→28px
  logo 128→96px、副标题 26→16px、顶部留白 160→100px
- 登录页不应用 elder-mode class(正常模式已足够大)
- 关怀模式覆写值同步调整:标题 38px、按钮高 64px、副标题 21px

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 22:45:08 +08:00
iven
7b5138a630 feat(miniprogram): 关怀模式全覆盖 — 58/58 页面 100% 接入
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 医生端 18 个页面全部接入(首页/待办/告警/咨询/透析/随访/
  患者/处方/报告及其详情和创建页)
- 商城子包 3 页面(商品详情/积分兑换/订单)
- 患者端剩余页面(AI报告/文章/活动/设备同步/登录/随访详情/
  报告详情/知情同意/诊断/透析处方/透析记录/家庭成员添加)
- 页面覆盖率:22/59 (37%) → 58/58 (100%)
- useElderClass hook 统一接入模式,零样板代码

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 22:34:44 +08:00
iven
e8ccee02d5 feat(miniprogram): 关怀模式 Phase 2 — Design Token + 15 页面批量接入
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- 新建 useElderClass hook,替代每页 3 行样板代码
- 新建 CSS 自定义属性 Design Token 系统(tokens.scss)
  正常/关怀两套值:字号、间距、触控、布局参数
- 15 个页面批量接入关怀模式 class:
  TabBar: 商城页
  主流程: 预约列表/详情/创建、咨询详情
  子包: 体征录入/趋势/日常监测/告警、用药/档案/随访/报告/家庭/设置
- 新建 elder-toast 工具(关怀模式 3s + 触觉反馈)
- 页面覆盖率:4/59 → 22/59 (37%)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 22:17:58 +08:00
iven
4335f7e144 fix(miniprogram): 关怀模式非线性放大重构 + 3 页面接入
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
- elder-mode.scss: 等比×1.3改为非线性放大(标题×1.15/正文×1.35/辅助×1.55)
- 体征网格从2列改为1列,解决放大后溢出问题
- 行高从1.5提升到1.7,对比度$tx3→$tx2增强可读性
- 健康页/消息页/咨询页接入useUIStore关怀模式
- 共享组件(EmptyState/ErrorState/Loading/StepIndicator)适配关怀模式
- 触控区域统一提升到56px+

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 22:05:06 +08:00
iven
66329852b8 fix(miniprogram): useDidShow 恢复认证状态 + E2E 全系统测试报告
Some checks failed
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
- app.tsx: 将 restoreAuth/restoreUI 从 useEffect 改为 useDidShow,
  修复 reLaunch 后 Zustand store 未恢复导致访客模式的问题
- docs/qa/e2e-full-system-report.md: 三端 E2E 测试报告更新,
  原 BUG-1(Admin 随访管理 403)确认为误报,综合通过率 100% (64/64)
- tools/weapp-mcp/e2e-test.mjs: 小程序 E2E 基础导航测试脚本
- tools/weapp-mcp/e2e-interactive-test.mjs: 小程序 E2E 交互操作测试脚本

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-09 18:25:43 +08:00