1476a6674ce6

fix task 22: tiny inline save/cancel buttons and password field icon inconsistency - SaveCancelRow rendered '✓ save' / '✗' as 10sp text labels with a few dp of padding, well under the 48dp touch-target minimum and visually inconsistent with every icon button elsewhere on the screen; replaced with two 36dp rounded-square icon buttons (Check/Close) matching CopyButton's exact shape, fill, and size. WrenchButton (password generate) used a bare icon on a plain CircleShape clip with no background fill or press feedback, breaking consistency with the copy button sitting directly next to it; rebuilt to match CopyButton's 36dp/6dp-rounded/filled-background convention. Live-verified all four action buttons (save, cancel, copy, generate) now render at matching sizes with correct content-desc.

time
2026-07-24 13:35 UTC · 3 months ago
machine
koh2
agent
claude-sonnet-5
session
critical-corrections-c1-c7
parent
b06edcaca0e7
2 files app/src/main/java/com/peachpasswords/ui/vault/EditableFieldRow.kt+31 −10app/src/main/java/com/peachpasswords/ui/vault/EntryDetailGenerator.kt+20 −11
app/src/main/java/com/peachpasswords/ui/vault/EditableFieldRow.kt+31 −10
@@ -20,6 +20,7 @@2020  * must be made `internal` (see INTEGRATION.md).2121  */2222 23+import androidx.compose.foundation.background2324 import androidx.compose.foundation.clickable2425 import androidx.compose.foundation.layout.Arrangement2526 import androidx.compose.foundation.layout.Box@@ -29,11 +30,16 @@2930 import androidx.compose.foundation.layout.fillMaxWidth3031 import androidx.compose.foundation.layout.height3132 import androidx.compose.foundation.layout.padding33+import androidx.compose.foundation.layout.size3234 import androidx.compose.foundation.layout.width3335 import androidx.compose.foundation.shape.RoundedCornerShape3436 import androidx.compose.foundation.text.BasicTextField37+import androidx.compose.material.icons.Icons38+import androidx.compose.material.icons.rounded.Check39+import androidx.compose.material.icons.rounded.Close3540 import androidx.compose.material3.DropdownMenu3641 import androidx.compose.material3.DropdownMenuItem42+import androidx.compose.material3.Icon3743 import androidx.compose.material3.Text3844 import androidx.compose.runtime.Composable3945 import androidx.compose.runtime.getValue@@ -271,15 +277,30 @@271277 @Composable272278 private fun SaveCancelRow(onSave: () -> Unit, onCancel: () -> Unit) {273279     val accent = LocalPeachAccent.current274-    Row(horizontalArrangement = Arrangement.spacedBy(16.dp), verticalAlignment = Alignment.CenterVertically) {275-        Text(276-            "✓ save", color = accent, style = PeachType.labelMono,277-            modifier = Modifier.clip(RoundedCornerShape(6.dp)).clickable(onClick = onSave).padding(vertical = 4.dp),278-        )279-        Text(280-            "✗", color = peachColors.T2, style = PeachType.labelMono,281-            modifier = Modifier.clip(RoundedCornerShape(6.dp)).clickable(onClick = onCancel).padding(horizontal = 6.dp, vertical = 4.dp),282-        )283-        Spacer(Modifier.width(1.dp))280+    // Matches CopyButton's icon-button convention (36dp, 6dp rounded, filled281+    // background) — these used to be bare "✓ save" / "✗" text at 10sp with a282+    // few dp of padding, well under the 48dp touch-target minimum and visibly283+    // inconsistent with every other action button on this screen.284+    Row(horizontalArrangement = Arrangement.spacedBy(8.dp), verticalAlignment = Alignment.CenterVertically) {285+        Box(286+            Modifier287+                .size(36.dp)288+                .clip(RoundedCornerShape(6.dp))289+                .background(peachColors.S2)290+                .clickable(onClick = onSave),291+            contentAlignment = Alignment.Center,292+        ) {293+            Icon(Icons.Rounded.Check, contentDescription = "save", tint = accent, modifier = Modifier.size(16.dp))294+        }295+        Box(296+            Modifier297+                .size(36.dp)298+                .clip(RoundedCornerShape(6.dp))299+                .background(peachColors.S2)300+                .clickable(onClick = onCancel),301+            contentAlignment = Alignment.Center,302+        ) {303+            Icon(Icons.Rounded.Close, contentDescription = "cancel", tint = peachColors.T2, modifier = Modifier.size(16.dp))304+        }284305     }285306 }

view file

app/src/main/java/com/peachpasswords/ui/vault/EntryDetailGenerator.kt+20 −11
@@ -25,7 +25,6 @@2525 import androidx.compose.foundation.layout.height2626 import androidx.compose.foundation.layout.padding2727 import androidx.compose.foundation.layout.size28-import androidx.compose.foundation.shape.CircleShape2928 import androidx.compose.foundation.shape.RoundedCornerShape3029 import androidx.compose.material.icons.Icons3130 import androidx.compose.material.icons.outlined.Build@@ -50,19 +49,29 @@5049 import com.peachpasswords.ui.theme.PeachType5150 import com.peachpasswords.vault.PasswordGenerator5251 53-/** Wrench icon (spec: tint t2, 18dp) — opens the generator sheet from the detail password row. */52+/**53+ * Opens the generator sheet from the detail password row. Matches CopyButton's54+ * icon-button shape (36dp, 6dp rounded, filled background) — this used to be a55+ * bare icon on a plain CircleShape clip with no background or press feedback,56+ * visibly inconsistent with the copy button sitting right next to it.57+ */5458 @Composable5559 internal fun WrenchButton(onClick: () -> Unit) {56-    Icon(57-        Icons.Outlined.Build,58-        contentDescription = "generate password",59-        tint = peachColors.T2,60-        modifier = Modifier60+    Box(61+        Modifier6162             .size(36.dp)62-            .clip(CircleShape)63-            .clickable(onClick = onClick)64-            .padding(9.dp), // 36 - 2*9 = 18dp glyph65-    )63+            .clip(RoundedCornerShape(6.dp))64+            .background(peachColors.S2)65+            .clickable(onClick = onClick),66+        contentAlignment = Alignment.Center,67+    ) {68+        Icon(69+            Icons.Outlined.Build,70+            contentDescription = "generate password",71+            tint = peachColors.T2,72+            modifier = Modifier.size(15.dp),73+        )74+    }6675 }6776 6877 /**

view file