Repository navigation
feat(ios): SwiftUI native RoleWeave client (#338) - #341
Conversation
平台组 Review(崔泽生,assigned by @冯浩然)总体印象9 文件 +545 行,结构清晰,符合 #338 AC:独立 UI、iOS 17、phone-link v1 配对、组织只读预览、指令电脑端执行。SwiftUI 用法地道, 但有几个需要关注的问题。 🔴 关键问题(建议合并前修复)1. 缺少 Authorization Bearer Token — 违反 API 契约
建议:在 2. 无 WebSocket 重连机制
3. 合并冲突未解决
🟡 重要问题4. 始终取 5. 配对码无输入校验
6. 无单元测试 Android 附带 7. 每次启动重置为 🟢 次要
与 Android #342 对比
合并建议Request Changes。主要原因:缺 Authorization header(功能缺陷)、无重连(体验断崖)、合并冲突。修复此三项后可合。 |
xiaocui-big
left a comment
There was a problem hiding this comment.
平台组正式 Review(崔泽生)
详细分析见上方评论。总结三个合并阻塞项:
- 缺 Authorization Bearer Token —
api-contract-v0.md§1 要求Authorization: Bearer <boot-token>,PhoneSession.swift的loadOrg()和pair()均未设置,对真实主机会 401 - 无 WebSocket 重连 — 网络抖动只能手动重新配对,Android 端已有指数退避
- 合并冲突 —
mergeable: CONFLICTING,CHANGELOG.md 冲突需 rebase
修复此三项后可合。
|
技术纠正与合并阻塞更新:
|
Address xiaocui-big review on roleweave #341: send Authorization on HTTP, reconnect WebSocket with backoff, require an explicit role, validate 6-digit pair codes, persist host/boot-token, and rebase CHANGELOG onto main 0.3.0.
|
已按 @xiaocui-big 平台组 Review 改到 head 81dc0b6:
请复审 #341 |
Resolve CHANGELOG conflict with current main (Android #339 already landed). Keep iOS-only files under mobile/ios plus the three-app README.
73732c2 to
aa53e0d
Compare
|
Cleanup after 胡奕舟 2026-09-19 09:21「你们的 pr 清理一下」. Rebased onto current Please re-review the iOS client on this head. I cannot self-approve CODEOWNERS. |
|
已按平台组阻塞项补齐:HTTP 请求带 Bearer boot-token、WebSocket 1/2/4/8/16 秒且最多 5 次退避并保留 device token、6 位数字配对码、组织页显式选岗位后才可发送。已同步最新 main;Linux 无法运行 Xcode,待独立复审在 Mac 上编译确认。 |
|
状态更新:当前 exact head 为 |
# Conflicts: # CHANGELOG.md
PeterGuy326
left a comment
There was a problem hiding this comment.
Re-review on merge head 208695d: all three blockers from the platform review are resolved.
- Authorization: PhoneSession now sends
Authorization: Bearer <boot-token>on HTTP calls (built in PhoneLinkCodec.swift;/healthremains the only unauthenticated route), so pairing and loadOrg work against real hosts. - WebSocket reconnect: exponential backoff 1/2/4/8/16s with max 5 attempts (
reconnectDelayMs), on parity with the Android client, preserving the device token. - Branch rebased onto current main with the CHANGELOG entry intact.
Approving; merge will follow once CI is green on this head.
Closes #338
Native SwiftUI app in
mobile/ios. Pair with a running RoleWeave host and send commands. Does not share UI with Android or HarmonyOS.Open
mobile/ios/RoleWeave.xcodeprojin Xcode 15+ on a Mac. This CI environment cannot compile iOS.