Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

Settings: Permission requests section with the wake and vibration choices

Claude8684ccd9b17f
diff --git a/android/app/src/main/kotlin/com/coucou/android/ui/SettingsScreens.kt b/android/app/src/main/kotlin/com/coucou/android/ui/SettingsScreens.kt
index 745173b7..3843438d 100644
--- a/android/app/src/main/kotlin/com/coucou/android/ui/SettingsScreens.kt
+++ b/android/app/src/main/kotlin/com/coucou/android/ui/SettingsScreens.kt
@@ -32,6 +32,8 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextDecoration
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.contentDescription
+import androidx.compose.ui.semantics.role
+import androidx.compose.ui.semantics.selected
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.draw.alpha
import com.coucou.android.core.IconKind
@@ -46,6 +48,7 @@ import com.coucou.android.app.Mode
import com.coucou.android.core.HistoryDays
import com.coucou.android.core.HomeText
import com.coucou.android.core.QuietHours
+import com.coucou.android.core.VibrationChoice
import com.coucou.android.core.RelayLineKind
import com.coucou.android.core.RelayStatus
import com.coucou.android.link.LinkState
@@ -122,6 +125,24 @@ private fun TimeRow(label: String, minutes: Int, enabled: Boolean, onChange: (In
}
}
+/** A title over a row of choices, one of them selected (read as radio buttons by TalkBack). */
+@Composable
+private fun <T> ChoiceRow(title: String, options: List<Pair<T, String>>, selected: T, onSelect: (T) -> Unit) {
+ val t = tokens()
+ Column(Modifier.padding(horizontal = Spacing.INSIDE.dp, vertical = 8.dp), verticalArrangement = Arrangement.spacedBy(8.dp)) {
+ Text(title, style = TypeScale.BODY.style(t.text.c()))
+ Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
+ for ((value, label) in options) {
+ PillButton(
+ label, { onSelect(value) },
+ Modifier.weight(1f).semantics { this.selected = value == selected; role = Role.RadioButton },
+ if (value == selected) PillKind.PRIMARY else PillKind.SECONDARY,
+ )
+ }
+ }
+ }
+}
+
/** Room under a list so its last row can scroll above the floating bar (64 + 16 gap + 16 margin). */
val BarClearance = 96.dp
@@ -194,6 +215,30 @@ fun SettingsScreen(model: AppModel, onHistory: () -> Unit, onGallery: () -> Unit
}
}
+ item { SectionHeading(stringResource(R.string.settings_section_requests)) }
+ item {
+ Panel {
+ SettingSwitch(stringResource(R.string.settings_no_wake), stringResource(R.string.settings_no_wake_hint), s.keepScreenOff) {
+ model.updateSettings(s.copy(keepScreenOff = it))
+ }
+ RowDivider()
+ ChoiceRow(
+ stringResource(R.string.settings_vibration),
+ listOf(
+ VibrationChoice.STANDARD to stringResource(R.string.vibration_standard),
+ VibrationChoice.SHORT to stringResource(R.string.vibration_short),
+ VibrationChoice.OFF to stringResource(R.string.vibration_off),
+ ),
+ s.vibration,
+ ) { model.updateSettings(s.copy(vibration = it)) }
+ Text(
+ stringResource(R.string.settings_requests_note),
+ Modifier.padding(horizontal = Spacing.INSIDE.dp).padding(bottom = 12.dp),
+ style = TypeScale.SECONDARY.style(t.textDim.c()),
+ )
+ }
+ }
+
item { SectionHeading(stringResource(R.string.settings_section_notices)) }
item {
Panel {
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
index 8173d66c..86298495 100644
--- a/android/app/src/main/res/values/strings.xml
+++ b/android/app/src/main/res/values/strings.xml
@@ -201,6 +201,14 @@
<string name="relay_line_away">Your computer is not answering through the relay. It may be asleep or have the relay off.</string>
<string name="settings_section_sound">Sound</string>
<string name="settings_section_notices">Notices</string>
+ <string name="settings_section_requests">Permission requests</string>
+ <string name="settings_no_wake">Don\'t wake the screen for a request</string>
+ <string name="settings_no_wake_hint">The request still arrives with its sound and its notification; only the screen stays dark until you look.</string>
+ <string name="settings_vibration">Vibration for a request</string>
+ <string name="vibration_standard">Standard</string>
+ <string name="vibration_short">Short</string>
+ <string name="vibration_off">Off</string>
+ <string name="settings_requests_note">A request is never muted or hidden: these only change how it buzzes and whether it lights the screen.</string>
<string name="settings_section_display">Display</string>
<string name="settings_section_more">More</string>
<string name="settings_section_about">About</string>
diff --git a/android/i18n/app-strings.json b/android/i18n/app-strings.json
index 868f487c..a62364e3 100644
--- a/android/i18n/app-strings.json
+++ b/android/i18n/app-strings.json
@@ -201,6 +201,14 @@
"relay_line_away": "Your computer is not answering through the relay. It may be asleep or have the relay off.",
"settings_section_sound": "Sound",
"settings_section_notices": "Notices",
+ "settings_section_requests": "Permission requests",
+ "settings_no_wake": "Don't wake the screen for a request",
+ "settings_no_wake_hint": "The request still arrives with its sound and its notification; only the screen stays dark until you look.",
+ "settings_vibration": "Vibration for a request",
+ "vibration_standard": "Standard",
+ "vibration_short": "Short",
+ "vibration_off": "Off",
+ "settings_requests_note": "A request is never muted or hidden: these only change how it buzzes and whether it lights the screen.",
"settings_section_display": "Display",
"settings_section_more": "More",
"settings_section_about": "About",