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.

Android 0.3.0: fix the merge (widget kinds, sheet wash, API 31 guard) and add the GitLab and Gitea pills

Rhytam Biswas809aa72aac86
diff --git a/android/app/src/main/kotlin/com/coucou/android/app/WidgetHub.kt b/android/app/src/main/kotlin/com/coucou/android/app/WidgetHub.kt
index 594663fe..02a528fd 100644
--- a/android/app/src/main/kotlin/com/coucou/android/app/WidgetHub.kt
+++ b/android/app/src/main/kotlin/com/coucou/android/app/WidgetHub.kt
@@ -29,8 +29,8 @@ object WidgetHub {
/** A Widget drawn once for all its copies ([views]), or once per copy when each has its own choice ([each], the Team widget). */
private class Kind(
val provider: Class<out AppWidgetProvider>,
- val views: ((Context, WidgetContent) -> RemoteViews)? = null,
val each: ((Context, WidgetContent, Int) -> RemoteViews)? = null,
+ val views: ((Context, WidgetContent) -> RemoteViews)? = null,
)
private val widgets = listOf(
diff --git a/android/app/src/main/kotlin/com/coucou/android/core/Pills.kt b/android/app/src/main/kotlin/com/coucou/android/core/Pills.kt
index e07dbcd8..8b859856 100644
--- a/android/app/src/main/kotlin/com/coucou/android/core/Pills.kt
+++ b/android/app/src/main/kotlin/com/coucou/android/core/Pills.kt
@@ -38,6 +38,8 @@ object Pills {
PillDefinition("integration_n8n", "n8n", "#F29B38", PillCategory.SERVICE),
PillDefinition("integration_vercel", "Vercel", "#7C5CFF", PillCategory.SERVICE),
PillDefinition("integration_github", "GitHub", "#F4505E", PillCategory.SERVICE),
+ PillDefinition("integration_gitlab", "GitLab", "#FC6D26", PillCategory.SERVICE),
+ PillDefinition("integration_gitea", "Gitea", "#609926", PillCategory.SERVICE),
PillDefinition("integration_notion", "Notion", "#8C8C8C", PillCategory.SERVICE),
PillDefinition("integration_calcom", "Cal.com", "#C9956A", PillCategory.SERVICE),
PillDefinition("integration_stripe", "Stripe", "#0570DE", PillCategory.SERVICE),
diff --git a/android/app/src/main/kotlin/com/coucou/android/ui/Sheets.kt b/android/app/src/main/kotlin/com/coucou/android/ui/Sheets.kt
index 7a833842..28ea3520 100644
--- a/android/app/src/main/kotlin/com/coucou/android/ui/Sheets.kt
+++ b/android/app/src/main/kotlin/com/coucou/android/ui/Sheets.kt
@@ -93,9 +93,10 @@ fun BottomSheetHost(onDismiss: () -> Unit, wash: Color? = null, announce: String
visible = shown, modifier = Modifier.align(Alignment.BottomCenter),
enter = if (reducedMotion()) fadeIn(tween(MotionSpec.REDUCED_MS)) else slideInVertically(spring(dampingRatio = 0.72f, stiffness = 400f)) { it } + fadeIn(),
) {
+ val washAlpha = (tokens().washAlpha * 0.9).toFloat()
Column(
Modifier.fillMaxWidth().clip(shape).background(Color(tokens().sheet)).border(1.dp, Color(tokens().heroLine), shape)
- .then(if (wash != null) Modifier.drawBehind { drawWash(wash, (tokens().washAlpha * 0.9).toFloat()) } else Modifier)
+ .then(if (wash != null) Modifier.drawBehind { drawWash(wash, washAlpha) } else Modifier)
.pointerInput(Unit) { detectTapGestures { } }
// A large font can make the sheet taller than the screen: it scrolls, so Deny and Allow are always reachable.
.verticalScroll(rememberScrollState())
diff --git a/android/app/src/main/kotlin/com/coucou/android/ui/Theme.kt b/android/app/src/main/kotlin/com/coucou/android/ui/Theme.kt
index 1e7d73e3..62312f47 100644
--- a/android/app/src/main/kotlin/com/coucou/android/ui/Theme.kt
+++ b/android/app/src/main/kotlin/com/coucou/android/ui/Theme.kt
@@ -71,7 +71,7 @@ fun CoucouTheme(theme: ThemeChoice = ThemeChoice.SYSTEM, dynamic: Boolean = fals
val context = LocalContext.current
var tokens = if (dark) Tokens.DARK else Tokens.LIGHT
var colours = scheme(if (dark) Palette.DARK else Palette.LIGHT, tokens)
- if (dynamic && ThemePolicy.dynamicAvailable(Build.VERSION.SDK_INT)) {
+ if (dynamic && Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && ThemePolicy.dynamicAvailable(Build.VERSION.SDK_INT)) {
val cs = if (dark) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
tokens = fromDynamic(tokens, cs)
colours = cs