Go to file
hailin 28da7f6807 feat(service-party-app): 实现启动时自动注册到 Message Router,状态验证真实化
## 主要变更

### 1. 启动时自动连接并注册
- main.ts: 添加 `connectAndRegisterToMessageRouter()` 函数
- 应用启动时自动连接到 Message Router 并注册为 temporary 角色
- 自动生成并持久化 partyId(使用 crypto.randomUUID)
- 自动订阅会话事件

### 2. 状态验证真实化
- appStore.ts: 重写 `checkAllServices()` 消息路由检测逻辑
- 不再只检测连接成功,而是:
  1. 调用 isConnected() 检查连接状态
  2. 调用 getPartyId() 检查是否已注册
  3. 调用 getRegisteredParties() 从 Message Router 获取注册列表
  4. 验证自己的 partyId 是否在列表中
- 状态显示更准确:
  - "未连接到 xxx" - 未连接
  - "已连接但未注册" - 已连接但没注册
  - "已注册 (在线)" - 完全正常
  - "注册验证失败" - 注册了但验证失败

### 3. 新增 IPC API
- grpc:getPartyId - 获取当前 partyId
- grpc:isConnected - 检查连接状态
- grpc:connect - 连接到 Message Router
- grpc:register - 注册为参与方

### 修改的文件
- electron/main.ts
- electron/preload.ts
- src/stores/appStore.ts
- src/types/electron.d.ts

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 23:29:04 -08:00
.claude fix(service-party-app): 修复sql.js在打包后找不到模块的问题 2025-12-28 20:41:01 -08:00
backend feat(service-party-app): 实现启动时自动注册到 Message Router,状态验证真实化 2025-12-28 23:29:04 -08:00
docs feat(co-managed-wallet): 添加签名会话API和Service-Party-App HTTP客户端 2025-12-28 22:34:35 -08:00
frontend fix(mobile-app): 修复 ProfilePage 在 initState 中修改 provider 导致的错误 2025-12-28 06:57:37 -08:00
kubernetes . 2025-11-25 10:29:24 +08:00
scripts . 2025-11-25 10:29:24 +08:00
tests . 2025-11-25 10:29:24 +08:00
.gitignore chore: add .claude to gitignore 2025-12-09 18:37:23 -08:00
README.md first commit 2025-11-23 21:21:44 -08:00
SEED01-qrcode.png fix: 短信超时返回成功状态避免前端报错 2025-12-21 20:55:31 -08:00
STKAITI.TTF feat(mobile-app): 添加合同签署 API 详细调试日志 2025-12-25 03:14:10 -08:00
contract.docx feat(kyc): 实名认证前检查手机号验证状态 2025-12-24 21:00:53 -08:00
docker-compose.yml first commit 2025-11-23 21:21:44 -08:00
榴莲树认种权益协议_发布版_form.pdf chore(planting-service): 更新合同PDF模板(修复红色文字) 2025-12-26 06:29:08 -08:00
榴莲皇后数据.xlsx fix(mobile-app): 修复多账号切换后账号列表只显示一个的问题 2025-12-27 11:12:50 -08:00

README.md