feat: rounder chat items with card-style borders

Items use KaizenShapes.md (16dp radius) instead of sm (12dp), more spacing
(4dp gap), horizontal padding, and subtle glass borders on inactive items.
Active items get accent gradient border + shadow. Matches web's rounded-xl
card treatment.
This commit is contained in:
Bruno Deanoz 2026-06-23 00:59:58 +02:00
parent 558b1be675
commit 10ece6d72f

View file

@ -238,7 +238,7 @@ fun KaizenSidebar(
val grouped = remember(filteredConversations, labels) { groupConversations(filteredConversations, labels) } val grouped = remember(filteredConversations, labels) { groupConversations(filteredConversations, labels) }
LazyColumn( LazyColumn(
modifier = Modifier.fillMaxSize(), modifier = Modifier.fillMaxSize(),
verticalArrangement = Arrangement.spacedBy(2.dp) verticalArrangement = Arrangement.spacedBy(4.dp)
) { ) {
grouped.forEach { (dateGroup, items) -> grouped.forEach { (dateGroup, items) ->
item(key = "header_$dateGroup") { item(key = "header_$dateGroup") {
@ -433,33 +433,40 @@ private fun HistoryItemRow(
var showMenu by remember { mutableStateOf(false) } var showMenu by remember { mutableStateOf(false) }
val itemBorder = if (selected) { val activeBorder = remember(isDark, accent) {
remember(isDark, accent) { if (isDark) Brush.verticalGradient(
if (isDark) Brush.verticalGradient( listOf(accent.primary.copy(alpha = 0.25f), accent.primary.copy(alpha = 0.06f))
listOf(accent.primary.copy(alpha = 0.25f), accent.primary.copy(alpha = 0.06f)) ) else Brush.verticalGradient(
) else Brush.verticalGradient( listOf(accent.primary.copy(alpha = 0.20f), accent.primary.copy(alpha = 0.05f))
listOf(accent.primary.copy(alpha = 0.20f), accent.primary.copy(alpha = 0.05f)) )
) }
} val inactiveBorder = remember(isDark) {
} else null if (isDark) Brush.verticalGradient(
listOf(Color.White.copy(alpha = 0.07f), Color.White.copy(alpha = 0.02f))
) else Brush.verticalGradient(
listOf(Color.White.copy(alpha = 0.35f), Color.Black.copy(alpha = 0.03f))
)
}
Box { Box(modifier = Modifier.padding(horizontal = 2.dp)) {
Row( Row(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.clip(KaizenShapes.sm) .clip(KaizenShapes.md)
.then( .then(
if (selected) { if (selected) {
Modifier Modifier
.kaizenShadow(stack = KaizenShadows.level1, cornerRadius = 10.dp) .kaizenShadow(stack = KaizenShadows.level1, cornerRadius = 16.dp)
.background(accent.primary.copy(alpha = if (isDark) 0.12f else 0.08f)) .background(accent.primary.copy(alpha = if (isDark) 0.12f else 0.08f))
.border(0.8.dp, itemBorder!!, KaizenShapes.sm) .border(0.8.dp, activeBorder, KaizenShapes.md)
} else { } else {
Modifier Modifier
.background(if (isDark) Color(0x08FFFFFF) else Color(0x05000000))
.border(0.5.dp, inactiveBorder, KaizenShapes.md)
} }
) )
.clickable { onClick() } .clickable { onClick() }
.padding(start = 10.dp, end = 4.dp, top = 8.dp, bottom = 8.dp), .padding(start = 12.dp, end = 4.dp, top = 10.dp, bottom = 10.dp),
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
if (item.pinned) { if (item.pinned) {