Commit Graph

4 Commits

Author SHA1 Message Date
hailin be415c1eb6 fix(mobile-app): 前台回来时也上传遥测队列(大厂标准做法)
进入前台时 flush 覆盖两种场景:
1. 上次 paused flush 因网络失败未上传的事件
2. 上次被强杀(force-kill)遗留在本地队列的事件

app_session_start 事件(含设备信息)也在此时立即上传,
无需等待10条阈值或30秒定时器。

参考:Amplitude/Mixpanel 均在 session start 时触发 flush。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 19:14:16 -08:00
hailin 9e90294d0e fix(mobile-app): App进入后台时立即上传遥测队列
问题:TelemetryService.dispose()从未被调用,导致forceUploadAll()
永远不执行;uploadIfNeeded()有10条最小阈值,单次会话只有2-3条
事件无法触发上传,设备信息永远留在本地队列。

修复:进入后台(paused)结束session后,立即调用uploadBatch()
绕过10条阈值,确保每次App切换到后台时都能上报事件。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-05 19:11:25 -08:00
hailin 747e4ae8ef refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing
- Remove Address field from PartyEndpoint (parties connect to router themselves)
- Update K8s Discovery to only manage PartyID and Role labels
- Add Party registration and SessionEvent protobuf definitions
- Implement PartyRegistry and SessionEventBroadcaster domain logic
- Add RegisterParty and SubscribeSessionEvents gRPC handlers
- Prepare infrastructure for party-driven MPC coordination

This is the first phase of migrating from coordinator-driven to party-driven
architecture following international MPC system design patterns.
2025-12-05 08:11:28 -08:00
hailin be4ef7d1aa feat: 添加APK在线升级和遥测统计模块
APK升级模块 (lib/core/updater/):
- 支持自建服务器和Google Play双渠道更新
- 版本检测、APK下载、SHA-256校验、安装
- 应用市场来源检测
- 强制更新和普通更新对话框

遥测模块 (lib/core/telemetry/):
- 设备信息采集 (品牌、型号、系统版本、屏幕等)
- 会话管理 (DAU日活统计)
- 心跳服务 (实时在线人数统计)
- 事件队列和批量上传
- 远程配置热更新

Android原生配置:
- MainActivity.kt Platform Channel实现
- FileProvider配置 (APK安装)
- 权限配置 (INTERNET, REQUEST_INSTALL_PACKAGES)

文档:
- docs/backend_api_guide.md 后端API开发指南
- docs/testing_guide.md 测试指南

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 02:44:01 -08:00