diff --git a/composeApp/src/commonMain/kotlin/cn/xiaobai/openclawapp/feature/chat/ChatScreen.kt b/composeApp/src/commonMain/kotlin/cn/xiaobai/openclawapp/feature/chat/ChatScreen.kt index d47eb08..5c13ba7 100644 --- a/composeApp/src/commonMain/kotlin/cn/xiaobai/openclawapp/feature/chat/ChatScreen.kt +++ b/composeApp/src/commonMain/kotlin/cn/xiaobai/openclawapp/feature/chat/ChatScreen.kt @@ -97,16 +97,21 @@ fun ChatScreen( color = MaterialTheme.colorScheme.onSurfaceVariant, ) } - StatusPill( - text = when { - isLoading -> "同步中" - streamStatus == "reconnecting" -> "重连中" - streamStatus == "failed" -> "已断流" - streamStatus == "connecting" -> "连接中" - else -> "在线" - }, - highlighted = streamStatus != "failed", - ) + Column(horizontalAlignment = Alignment.End, verticalArrangement = Arrangement.spacedBy(6.dp)) { + StatusPill( + text = when { + isLoading -> "同步中" + streamStatus == "reconnecting" -> "重连中" + streamStatus == "failed" -> "已断流" + streamStatus == "connecting" -> "连接中" + else -> "在线" + }, + highlighted = streamStatus != "failed", + ) + TextButton(onClick = onRetry) { + Text(if (streamStatus == "failed") "重新连接" else "刷新") + } + } } } diff --git a/docs/MVP_PROGRESS.md b/docs/MVP_PROGRESS.md index 6b9a62a..3ad9501 100644 --- a/docs/MVP_PROGRESS.md +++ b/docs/MVP_PROGRESS.md @@ -62,6 +62,7 @@ Android/iOS App ### 2.3 聊天与流式消息 - [x] 文本消息发送 +- [x] 文本消息失败重试 - [x] BFF SSE 流式推送基础链路 - [x] App 支持 SSE 事件: - `session.snapshot` @@ -119,6 +120,7 @@ Android/iOS App - contentType - sizeBytes - [x] 上传失败支持重试 +- [x] 聊天页支持手动刷新 / 重新连接入口 - [x] BFF 已将附件 overlay 合并进: - history 返回 - SSE 流 @@ -173,8 +175,10 @@ Android/iOS App 目前: -- 附件上传失败可重试 -- 普通文本消息失败**还没有统一重试机制** +- [x] 附件上传失败可重试 +- [x] 普通文本消息失败可重试 +- [ ] 还没有离线发送队列 +- [ ] 还没有网络恢复后的自动补发 ### 4.2 附件后端主链路 @@ -321,6 +325,7 @@ Android/iOS App - 默认 agent 切换 - Android 真附件选择与上传 - 附件失败重试 +- 普通文本消息失败重试 ### 还没做完的大头