20260626173529
This commit is contained in:
1 parent
b424369b4b
commit
5983d29128
91 files changed
+9236
-2095
No files matched your search
@@ -0,0 +1,36 @@
|
||||
# Design Follow-ups
|
||||
|
||||
通用数据接口的安全性暂不纳入本清单。
|
||||
|
||||
## 已处理
|
||||
|
||||
- 聊天 DTO 已收口到 `app-rn/src/types/chat.ts`,统一通过 `normalizeChatMessage()` 兼容 `type` / `msg_type`。
|
||||
- WebSocket 在线用户、实时消息、未读数、连接状态已收口到 `app-rn/src/store/chat.ts`。
|
||||
- `app-rn/src/hooks/useLoading.ts` 已提供 `runWithLoading` 和 `useListLoading`,用于统一保存加载、列表初载、刷新和加载更多。
|
||||
|
||||
## API 与领域边界
|
||||
|
||||
- `src/request/api.ts` 仍主要返回 `any`,页面直接感知表名、字段名和查询条件。保持通用接口优先,只有明显跨页面复用的领域能力才考虑抽象。
|
||||
|
||||
## 状态与缓存
|
||||
|
||||
- `finance` store 只有分类缓存,账单列表仍由页面自行加载,后续可以形成 finance domain store。
|
||||
- `favorite` store 管理远端读写、`loadingIds` 和本地 `Set`,职责偏重。可以下沉远端操作到 service,store 只保留状态。
|
||||
|
||||
## UI 与交互一致性
|
||||
|
||||
- 后续新增保存类操作应优先使用 `useLoading().runWithLoading()`,页面底部保留 `<LoadingOverlay visible={isLoading} />`。
|
||||
- 列表初载、刷新、加载更多应优先使用 `useListLoading()`。
|
||||
- 部分页面中文显示/注释存在编码异常,应统一文件编码并恢复可读文案。
|
||||
- `AppLayout` 和 `ModuleLayout` 仍有大量重复,可继续抽一个共享 `ShellLayout`。
|
||||
|
||||
## 类型与工程质量
|
||||
|
||||
- 项目当前 `tsc --noEmit` 有既有错误,包括 `finance/analysis` variant、iconfont SvgProps、theme hook 缺失等。
|
||||
- iconfont 生成代码与当前 React Native SVG 类型不匹配,建议集中修生成模板或 wrapper 类型。
|
||||
- `PROJECT_CONTEXT.md` 当前缺失,应确认是否恢复或从文档引用中移除。
|
||||
|
||||
## 数据一致性
|
||||
|
||||
- `family_id` 作用域已经通过 `loadDataApi` / `loadDataPageApi` 的 `scope_family` 选项收口,仍有页面直接手写条件,需要逐步替换。
|
||||
- 创建/加入家庭、收藏 app、记账等 feed 记录规则需要逐项核对,确保所有触发场景一致执行。
|
||||
Reference in new issue
Block a user