From c0d395eed2a330768bf3e8544f0ab278156c44ad Mon Sep 17 00:00:00 2001 From: OpenClaw Date: Sat, 7 Mar 2026 21:34:23 +0800 Subject: [PATCH] Tighten session list hierarchy --- .../feature/sessions/SessionListScreen.kt | 47 +++++++++---------- docs/MVP_PROGRESS.md | 1 + 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/composeApp/src/commonMain/kotlin/cn/xiaobai/openclawapp/feature/sessions/SessionListScreen.kt b/composeApp/src/commonMain/kotlin/cn/xiaobai/openclawapp/feature/sessions/SessionListScreen.kt index 7a0e3d8..d4822aa 100644 --- a/composeApp/src/commonMain/kotlin/cn/xiaobai/openclawapp/feature/sessions/SessionListScreen.kt +++ b/composeApp/src/commonMain/kotlin/cn/xiaobai/openclawapp/feature/sessions/SessionListScreen.kt @@ -110,7 +110,7 @@ fun SessionListScreen( Card( modifier = Modifier.fillMaxWidth(), colors = CardDefaults.cardColors( - containerColor = MaterialTheme.colorScheme.tertiaryContainer.copy(alpha = 0.45f), + containerColor = MaterialTheme.colorScheme.surfaceContainerLow, ), ) { Row( @@ -121,8 +121,8 @@ fun SessionListScreen( verticalAlignment = Alignment.CenterVertically, ) { Column(modifier = Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(4.dp)) { - Text("最近访问", style = MaterialTheme.typography.labelLarge) - Text(recentSession.title, style = MaterialTheme.typography.titleMedium, maxLines = 1) + Text("最近访问", style = MaterialTheme.typography.labelMedium, color = MaterialTheme.colorScheme.onSurfaceVariant) + Text(recentSession.title, style = MaterialTheme.typography.titleSmall, maxLines = 1) recentSession.lastMessage.takeIf { it.isNotBlank() }?.let { summary -> Text( summary, @@ -134,7 +134,7 @@ fun SessionListScreen( } } TextButton(onClick = { onOpenSession(recentSession.id) }) { - Text("继续") + Text("打开") } } } @@ -206,18 +206,11 @@ private fun SessionRow( maxLines = 1, overflow = TextOverflow.Ellipsis, ) - if (session.isPinned) { - StatusPill(text = "置顶", tone = StatusPillTone.Neutral) - } - if (session.unreadCount > 0) { - StatusPill(text = "${session.unreadCount} 未读", tone = StatusPillTone.Info) - } - session.streamStatus?.let { streamStatus -> - val (label, tone) = streamStatusLabelAndTone(streamStatus) - if (label != null) { - StatusPill(text = label, tone = tone) - } - } + Text( + text = session.updatedAt, + style = MaterialTheme.typography.labelSmall, + color = MaterialTheme.colorScheme.onSurfaceVariant, + ) } session.lastMessage.takeIf { it.isNotBlank() }?.let { summary -> @@ -232,17 +225,23 @@ private fun SessionRow( Row( modifier = Modifier.fillMaxWidth(), - horizontalArrangement = Arrangement.spacedBy(12.dp), + horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically, ) { - Text( - text = session.updatedAt, - style = MaterialTheme.typography.bodySmall, - color = MaterialTheme.colorScheme.onSurfaceVariant, - modifier = Modifier.weight(1f), - ) + if (session.isPinned) { + StatusPill(text = "置顶", tone = StatusPillTone.Neutral) + } + if (session.unreadCount > 0) { + StatusPill(text = "${session.unreadCount}", tone = StatusPillTone.Info) + } + session.streamStatus?.let { streamStatus -> + val (label, tone) = streamStatusLabelAndTone(streamStatus) + if (label != null) { + StatusPill(text = label, tone = tone) + } + } TextButton(onClick = onTogglePin) { - Text(if (session.isPinned) "取消置顶" else "置顶") + Text(if (session.isPinned) "★" else "☆") } } } diff --git a/docs/MVP_PROGRESS.md b/docs/MVP_PROGRESS.md index 4be1130..e570d0f 100644 --- a/docs/MVP_PROGRESS.md +++ b/docs/MVP_PROGRESS.md @@ -454,3 +454,4 @@ Android/iOS App - 2026-03-07:会话页顶栏操作再收成图标化按钮:返回 / 附件 / 刷新不再显示整词文本,而是先用轻量符号按钮(← / + / ↻/⟳)表达,减少顶栏横向拥挤;后续如果需要,再统一切成正式 Material Icons 资源。 - 2026-03-07:把会话页顶栏的占位符号按钮升级为正式 Material Icons:返回改为 `ArrowBack`,附件改为 `AttachFile`,刷新/重连改为 `Refresh`,让导航头从临时占位过渡到更像成品的视觉语义。 - 2026-03-07:继续优化附件卡片操作区:失败态仍保留前置主按钮“重新发送附件”,其余常用动作从一排横向按钮改成两行等宽次级操作(打开 / 下载 / 复制文件名 / 查看详情),避免窄屏下一排动作挤爆、主次不分。 +- 2026-03-07:继续收会话列表层级:最近访问卡降级成更轻的普通卡片,入口文案从“继续”改成“打开”;列表项把更新时间提到标题行右侧,底部只保留必要状态,置顶操作从文字按钮降成星标符号按钮,减少每项底部操作重量。