Repository navigation
feat(android): Kotlin Compose native RoleWeave client (#339) - #342
waterbro-8 wants to merge 10 commits into
Conversation
wadrzl
left a comment
There was a problem hiding this comment.
已审阅,以下是需要修改的点:
usesCleartextTraffic="true"— 允许明文 HTTP 流量,生产环境应去掉并强制 HTTPS- 异常处理无日志 — 所有 catch 块只吞异常显示一行文字,没有
Log.e或 Timber,线上排查困难 - WebSocket 无重连 — 断开后
paired = false,用户只能手动重新配对,体验差 send()默认取roles.firstOrNull()?.id— 用户无法选择目标角色,多角色场景下行为不可预期- 没有测试 — 至少应有 PhoneViewModel 的单元测试(pair/send/loadOrg 的 mock 验证)
- CI 无法编译 — PR 描述已说明 Linux sandbox 无 JDK/Android SDK,意味着这个 PR 合入后没有任何自动化质量守门
|
Review items on #342:
Pushed to |
wadrzl
left a comment
There was a problem hiding this comment.
修复已确认:usesCleartextTraffic 改为 network_security_config 仅 debug 生效;catch 块补 Log.e;WebSocket 5 次指数退避重连;send 需显式选角色;PhoneLinkCodec 单测覆盖;android-client CI workflow 已加。LGTM。
|
重新核对最终 head
另请用实际 Android CI 验证 请修复并让最终 head 出现真实的 Android |
sun-970
left a comment
There was a problem hiding this comment.
Review — Changes requested
Head 9e7bb3e. Independent of the earlier Approve on an older commit: the three merge blockers recorded by waterbro-8 are still present on this tree.
Blockers
-
Android CI is not in the branch.
.github/workflows/on this head has noandroid-client.yml. README claimsgradle testruns in CI; there is no such check on this PR (only Node/desktop verify). Cannot treat Node CI as Android compile evidence. -
Reconnect is linear, not exponential.
scheduleReconnect()useswaitMs = 1000L * reconnectAttempt→ 1s/2s/3s/4s/5s. -
First role is still auto-selected.
loadOrg()doesselectedRoleId = it.selectedRoleId ?: snapshot.roles.firstOrNull()?.id.send()then sees a non-empty id without an explicit user tap. That is the original “roles.firstOrNull()” bug.
Also verify on a real Android job
network_security_config.xml nests <network-security-config> inside <debug-overrides>. Prefer src/main cleartext=false and src/debug cleartext=true (or an AAPT-validated debug-overrides form). Do not take desktop CI as proof this XML packs.
I am landing a follow-up with these three fixes rather than rubber-stamping this head.
|
独立 Review 已标 Changes requested。三个 blocker 的修复在 follow-up #362 (指数退避、禁止 first role 隐式选中、android-client.yml + debug/main 拆开的 network security config)。 |
Closes #339
Native Kotlin + Jetpack Compose app in
mobile/android. Pair with a running RoleWeave host and send commands. Does not share UI with iOS or HarmonyOS.Open
mobile/androidin Android Studio. This CI environment cannot compile Android.