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 5a1ee34..7eda6aa 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 @@ -450,6 +450,11 @@ private fun MessageBubble( color = MaterialTheme.colorScheme.onSurfaceVariant, ) } + if (message.retryable && message.status == "upload-failed") { + Button(onClick = { onRetryAttachment(message.id) }) { + Text("重新发送附件") + } + } Row(horizontalArrangement = Arrangement.spacedBy(6.dp)) { TextButton(onClick = { onOpenAttachment(message.id) }) { Text("打开") @@ -463,11 +468,6 @@ private fun MessageBubble( TextButton(onClick = { attachmentDetailsExpanded = !attachmentDetailsExpanded }) { Text(if (attachmentDetailsExpanded) "收起详情" else "查看详情") } - if (message.retryable && message.status == "upload-failed") { - TextButton(onClick = { onRetryAttachment(message.id) }) { - Text("重试") - } - } } if (attachmentDetailsExpanded) { Column( diff --git a/docs/MVP_PROGRESS.md b/docs/MVP_PROGRESS.md index d1759fc..d0f1a17 100644 --- a/docs/MVP_PROGRESS.md +++ b/docs/MVP_PROGRESS.md @@ -441,3 +441,4 @@ Android/iOS App - 2026-03-07:补了一轮真正的详情页导航语义:聊天详情页重新加回明确的顶部导航头(返回 / 标题 / 附件 / 刷新),不再只是内容区里塞一个“返回”按钮;同时抽了一个轻量 `PlatformBackHandler`,先在 Android 接上系统返回,让详情页能正常退回首页/列表。 - 2026-03-07:进一步把页面切换从“状态变量拼页面”收成显式 route:`OpenClawAppState` 现在用 `AppRoute`(Sessions / Status / Settings / Chat(sessionId))管理当前页面,详情页与首页切换不再依赖 `selectedTab + activeSessionId` 的隐式组合,后续继续加真正导航能力会顺很多。 - 2026-03-07:把详情页顶部导航头正式迁回 `Scaffold.topBar`:聊天页内部不再自己伪造导航栏,而是由 app 壳层根据 route 决定顶栏标题、返回、附件、刷新动作;这样详情页终于有了正经的二级页面导航结构。 +- 2026-03-07:修正附件失败态的重试可见性:之前“重试”混在一排附件操作按钮最右侧,窄屏上很容易被挤掉;现在失败附件会单独前置一个主按钮“重新发送附件”,避免用户知道失败了却找不到怎么重发。