Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(mobile): redesign the Android agent activity card #11645

MergedSunkenInTime(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/11645/headmerged by juliusmarminge View on GitHub

Showing 13 changed files with 201 additions and 0 deletions (loading 12).

x
0 of 13 viewed, 13 left
201 additions and 0 deletionsapps/mobile/modules/t3-agent-notifications/android/src/main/java/expo/modules/t3agentnotifications/AgentActivityPresentation.ktAdded
View file
@@ -0,0 +1,201 @@
+package expo.modules.t3agentnotifications
+​
+import android.content.Context
+import android.graphics.Typeface
+import android.text.SpannableStringBuilder
+import android.text.Spanned
+import android.text.style.ForegroundColorSpan
+import android.text.style.StyleSpan
+import androidx.core.app.NotificationCompat
+import androidx.core.content.ContextCompat
+​
+internal data class ActivityRow(val status: String, val title: String, val project: String)
+​
+/**
+ * One entry per relay phase. The status label matches the relay's row wording and the
+ * tint matches the web sidebar pills and the iOS Live Activity so a thread reads the
+ * same on every surface. The icon is always the T3 mark; the chip verb carries the state.
+ */
+internal enum class ActivityPhase(
+ val status: String,
+ val heading: String,
+ val chip: String,
+ val action: String,
+ val color: Int
+) {
+ STARTING("Connecting", "Starting", "Working", "Open", R.color.agent_activity_working),
+ RUNNING("Working", "Working", "Working", "Open", R.color.agent_activity_working),
+ APPROVAL(
+ "Approval",
+ "Approval needed",