pp-bot
|
52a3f0f45c
|
feat(e2e): 端对端加密完全对齐老项目 — cipher_guard_sdk 修正 + EncryptionManager 集成
CI / Lint (push) Has been cancelled
修正 cipher_guard_sdk 4 个关键密码学差异使其与老 Flutter 项目 (im-client-im-dev) 和 iOS
EncryptionManager 完全互操作:
1. AES: 显式 SIC/CTR 模式 + 16 zero-byte IV(原 SDK 用随机 IV + KDF 派生密钥)
2. RSA: bare RSAEngine 无 PKCS1 padding(原 SDK 用 PKCS1Encoding)
3. Session key: 32-char alphanumeric ASCII(原 SDK 用 base64 random bytes)
4. Wire format: base64(ciphertext) 无 IV 前缀
新增 EncryptionManager:
- Per-chat round-based key chain(最多 10 rounds/chat,FIFO 淘汰)
- 登录后自动 setup:RSA 密钥对生成/存储 + 公钥上传 + chat 密钥拉取解密
- API 集成:cipher/v2/key/my, key/set, chat/my
- 消息加密返回 JSON envelope {"round":N,"data":"<base64>"}
- 消息解密兼容 JSON envelope + legacy raw base64
集成到消息流:
- SendMessageUseCase: 发送前加密 content → wireContent
- WsMessageService: 收到消息后解密 content + lastMsg
- 无密钥时 fallback 到明文(对齐 iOS 行为)
注意:/app/api/cipher/v2/key/set 仍为预发布接口,仅测试阶段使用
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
2026-04-14 21:44:00 +09:00 |
|
pp-bot
|
e715a0673b
|
feat(chat): 发收消息全量实现 (#25~#28)
- 移除 @riverpod/@freezed 注解依赖,全部改为手写 Provider(无需 build_runner)
· LoginState 改为纯 Dart,LoginViewModel/ThemeViewModel/ChatViewModel 改为 Notifier
· UserNotifier 改为 FamilyAsyncNotifier<User?,int>,mini_app_provider 改为手写 Provider
· 15 个 StreamProvider/StreamProvider.family 从 @riverpod 迁移至手写
- 发送消息(#25)
· SendMessageRequest/SendMessageResponse DTO
· SendMessageUseCase:乐观写入 DB → HTTP POST → 更新 Chat 摘要
- 接收消息 WS(#26)
· WsMessageService:监听 mode2 WS 帧 → HTTP 补拉 → DB 写入 → Chat 更新
· FetchHistoryRequest/FetchHistoryResponse DTO(GET /app/api/chat/history)
· FetchHistoryUseCase:拉取 → insertOrReplaceAll
- DI 装配(chat_service_providers.dart)
· wsMessageServiceProvider、sendMessageUseCaseProvider、fetchHistoryUseCaseProvider
- 聊天列表页(#27)
· ChatListViewModel(Notifier<void>)+ chat_page.dart 真实会话列表 UI
· ListTile:头像首字母、最新消息摘要、未读角标、时间格式化
- 聊天详情页(#28)
· ChatDetailViewModel(FamilyNotifier<ChatDetailState,int>)+ chat_detail_page.dart
· 消息气泡(自己/他人分左右)、底部输入框、发送状态与错误提示
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-03-23 23:16:44 +09:00 |
|
pp-bot
|
aeeda6f059
|
feat(mine): 我的 Tab 全量实现 (#5~#13)
从 im-client-ios-swift-demo 搬运 Settings 逻辑,对齐 Gitea issue #5–#13
## 基础设施
- AuthNotifier 新增 currentUid 字段,login() 接受 uid 参数 (#5)
- LoginViewModel 登录成功后传入 user.uid
- ApiPaths 补充 account/block/store 系列路径
- Tab 重命名"设置"→"我的",icon 改为 person_outline (#5)
- AppRouteName 新增5条子路由 (edit-profile/blocklist/language/network-diagnostics/about)
- app_router + auth_guard 同步注册新路由
## Settings Feature
- SettingsViewModel 重写为 NotifierProvider(去除 @riverpod 依赖)
- build() 自动触发 loadProfile()
- logout() 完整流程:API → WS 断开 → DB 关闭 → AuthNotifier
- 6 个 navigateTo* 方法
- SettingsPage 完整 UI:资料卡 / 偏好设置 / 工具 / 关于 / 退出登录按钮 (#5 #7)
- FetchProfileUseCase: GET /app/api/user/profile (#5)
- LogoutUseCase: logout + disconnect + closeDatabase (#7)
- UpdateProfileUseCase + UpdateProfileRequest: POST /app/api/user/update-profile (#6)
- EditProfilePage + EditProfileViewModel: 昵称/bio 编辑 (#6)
- LanguagePage: 语言选择 UI 框架,l10n_sdk 待接入 (#9)
- BlocklistPage: 黑名单框架,API 待实现 (#10)
- NetworkDiagnosticsPage + ViewModel: 四步诊断(连通/TCP/DNS/HTTPS)(#12)
- AboutPage: 版本号 + 服务条款/隐私政策入口 (#13)
- settings_providers.dart: 扩展 DI 装配
## 文档
- Doc/mine_tab_architecture.md: 架构说明、数据流、路由、待完成事项
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
2026-03-23 17:20:51 +09:00 |
|
Happi (哈比)
|
8130bf63fa
|
所有数据库表,提供相应的provider、桥接等方法
|
2026-03-10 12:09:45 +08:00 |
|
Happi (哈比)
|
084b7bbd23
|
Merge branch 'dev' into happi/dev/database-update
# Conflicts:
# apps/im_app/lib/features/login/presentation/login_view_model.dart
|
2026-03-09 20:17:03 +08:00 |
|
Happi (哈比)
|
8f77a14818
|
业务更新User所需(企业成员、聊天室群组成员)
|
2026-03-09 19:15:51 +08:00 |
|
Cody
|
3c1976b343
|
网络请求打通,ws 打通
|
2026-03-09 19:05:55 +08:00 |
|
Happi (哈比)
|
c278d1329e
|
Merge branch 'dev' into happi/dev/database-update
# Conflicts:
# apps/im_app/lib/data/models/user_dto.dart
# apps/im_app/lib/data/remote/login_request.dart
# apps/im_app/lib/features/chat/presentation/chat_db_test_view_model.dart
# apps/im_app/lib/features/chat/view/chat_db_test_page.dart
# apps/im_app/lib/features/login/presentation/login_view_model.dart
|
2026-03-09 15:08:45 +08:00 |
|
Happi (哈比)
|
fe54f79b21
|
数据和测试案例按照架构来处理
|
2026-03-09 14:59:29 +08:00 |
|
Cody
|
a063ce178e
|
加解密性能优化,预埋
|
2026-03-09 09:06:39 +08:00 |
|
Cody
|
c310ded32a
|
Merge remote-tracking branch 'origin/dev' into cody/netwrok_SDK
# Conflicts:
# apps/im_app/lib/features/chat/presentation/chat_db_test_view_model.dart
# apps/im_app/lib/features/login/presentation/login_view_model.dart
修复逻辑漏洞,性能优化
|
2026-03-08 20:47:28 +08:00 |
|
Cody
|
0ee2c8c63c
|
优化配置,修复 demo bug
1,network 框架完善
2,websocket 机制完善
3,设计文档整理到架构文档
4,脚本,配置完善
|
2026-03-07 19:29:18 +08:00 |
|
Happi (哈比)
|
113ecb633a
|
更新数据库
|
2026-03-06 16:54:51 +08:00 |
|
Cody
|
bf9e099747
|
Initial project
|
2026-03-06 15:05:53 +08:00 |
|