Skip to content

Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.

fix(android): portrait like the iPhone, and ellipsis on cut-off text (#158)

leepokaifacf21ef7ae1
diff --git a/apps/android/app/src/main/AndroidManifest.xml b/apps/android/app/src/main/AndroidManifest.xml
index 89cec805..dde25203 100644
--- a/apps/android/app/src/main/AndroidManifest.xml
+++ b/apps/android/app/src/main/AndroidManifest.xml
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
<uses-permission android:name="android.permission.POST_PROMOTED_NOTIFICATIONS" />
@@ -62,8 +63,10 @@
</activity>
<!-- Direct ws:// channels already encrypt every inner request with Codync E2E.
Core accepts HTTP only for validated direct candidates; cloud remains HTTPS. -->
+ <!-- Portrait on phones, as on iPhone, except while the screen viewer is open (ScreenView);
+ Android lets large screens rotate regardless. -->
<activity android:name=".MainActivity" android:exported="true" android:launchMode="singleTop"
- android:windowSoftInputMode="adjustResize"
+ android:windowSoftInputMode="adjustResize" android:screenOrientation="portrait" tools:ignore="LockedOrientationActivity"
android:configChanges="orientation|screenSize|screenLayout|smallestScreenSize|keyboard|keyboardHidden|navigation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AgentSheet.kt b/apps/android/app/src/main/kotlin/com/codync/android/AgentSheet.kt
index 42949ddd..cb200375 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AgentSheet.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AgentSheet.kt
@@ -227,7 +227,7 @@ private fun statusText(backend: AgentBackend, auth: AgentAuth?, signedIn: Boolea
}
val savedHere = method.vars.any { it.name in saved }
Column(Modifier.fillMaxSize().background(Palette.background)) {
- ScreenHeader({ BackButton(back) }, { Text(method.name, style = Type.body.semibold, color = Palette.text, maxLines = 1) }) {
+ ScreenHeader({ BackButton(back) }, { Text(method.name, style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis) }) {
if (saving) Box(Modifier.size(36.dp), contentAlignment = Alignment.Center) { Spinner() }
else IconButton("Save", "checkmark", enabled = method.complete(values, saved)) { save(values.filterValues(String::isNotEmpty)) }
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotConversation.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotConversation.kt
index ceee8d9f..8c8ea88f 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotConversation.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotConversation.kt
@@ -31,6 +31,7 @@ import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.Bot
import com.codync.android.core.BotConversationRow
import com.codync.android.core.BotExchange
@@ -115,7 +116,7 @@ private fun AppState.authorName(id: String): String = bots.firstOrNull { it.id =
if (index > 0) Symbol("arrow.left.arrow.right", size = 13.dp, tint = Palette.tertiary)
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
state.bots.firstOrNull { it.id == id }?.let { BotAvatar(it, state.bots, 22.dp) }
- Text(state.authorName(id), style = Type.body.semibold, color = Palette.text, maxLines = 1)
+ Text(state.authorName(id), style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotEditor.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotEditor.kt
index f5b72c85..6cfa33bd 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotEditor.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotEditor.kt
@@ -22,6 +22,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.BotDraft
import com.codync.android.core.LinkState
import com.codync.android.design.*
@@ -138,7 +139,7 @@ private val JsonObject.curated get() = this["curated"]?.jsonPrimitive?.booleanOr
Row(Modifier.outline().pill(androidx.compose.ui.graphics.Color.Transparent), verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(6.dp)) {
Text(if (draft.cwd.isEmpty()) "Personal" else draft.cwd.trimEnd('/').substringAfterLast('/').ifEmpty { "/" },
- style = Type.body, color = Palette.text, maxLines = 1)
+ style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Symbol("chevron.down", size = 13.dp, tint = Palette.secondary)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
index 5924743d..0c5d899e 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotListView.kt
@@ -194,7 +194,7 @@ internal fun moved(roster: List<Bot>, id: String, offset: Int): List<String>? {
}
Spacer(Modifier.width(8.dp))
if (bot.lastAt > 0) Text(RelativeTime.day(bot.lastAt), style = Type.subheadline,
- color = if (bot.unread > 0) Palette.text else Palette.tertiary, maxLines = 1)
+ color = if (bot.unread > 0) Palette.text else Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
Box(Modifier.weight(1f)) { Preview(bot, state) }
@@ -270,7 +270,7 @@ internal fun messagePreview(text: String): String {
)
}, label = "Computers, $summary. Filter conversations") {
Row(Modifier.padding(vertical = 6.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) {
- Text(summary, style = Type.system(12f).medium, color = Palette.secondary, maxLines = 1)
+ Text(summary, style = Type.system(12f).medium, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
Symbol("chevron.down", size = 15.dp, tint = Palette.secondary)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
index 5c6c7152..e44d590e 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt
@@ -203,7 +203,7 @@ import com.kyant.shapes.Capsule
else -> Symbol("wifi.slash", size = 11.dp, tint = Palette.secondary)
}
}
- Text(connectionLabel(state), style = Type.system(10f).medium, color = Palette.secondary, maxLines = 1)
+ Text(connectionLabel(state), style = Type.system(10f).medium, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
@@ -255,7 +255,7 @@ import com.kyant.shapes.Capsule
Row(Modifier.fillMaxWidth().height(56.dp).padding(start = 20.dp, end = 12.dp), verticalAlignment = Alignment.CenterVertically) {
Column(Modifier.weight(1f)) {
Text("Thread", style = Type.body.semibold, color = Palette.text)
- Text(bot.name, style = Type.caption, color = Palette.tertiary, maxLines = 1)
+ Text(bot.name, style = Type.caption, color = Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
IconButton("Close thread", "xmark", action = dismiss)
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ComposioViews.kt b/apps/android/app/src/main/kotlin/com/codync/android/ComposioViews.kt
index d0bb7daf..d873c6c3 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ComposioViews.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ComposioViews.kt
@@ -26,6 +26,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalUriHandler
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.CatalogPage
import com.codync.android.core.ComposioApp
import com.codync.android.core.ComposioStatus
@@ -165,7 +166,7 @@ import kotlinx.coroutines.launch
AppLogo(app.logo, app.name, 52.dp)
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
Text(app.name, style = Type.title3.semibold, color = Palette.text)
- app.description?.let { Text(it, style = Type.subheadline, color = Palette.secondary, maxLines = 3) }
+ app.description?.let { Text(it, style = Type.subheadline, color = Palette.secondary, maxLines = 3, overflow = TextOverflow.Ellipsis) }
}
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/FolderPicker.kt b/apps/android/app/src/main/kotlin/com/codync/android/FolderPicker.kt
index 8dd0eba6..5da88097 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/FolderPicker.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/FolderPicker.kt
@@ -25,6 +25,7 @@ import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.DirListing
import com.codync.android.design.*
import kotlinx.coroutines.CancellationException
@@ -81,7 +82,7 @@ import kotlinx.coroutines.CancellationException
Box(Modifier.width(20.dp), contentAlignment = Alignment.Center) {
Symbol(if (dir.isGit) "arrow.triangle.branch" else "folder", size = 18.dp, tint = if (dir.isGit) Palette.accent else Palette.secondary)
}
- Text(dir.name, Modifier.weight(1f), style = Type.body, color = Palette.text, maxLines = 1)
+ Text(dir.name, Modifier.weight(1f), style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Symbol("chevron.right", size = 13.dp, tint = Palette.tertiary)
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/GroupEditor.kt b/apps/android/app/src/main/kotlin/com/codync/android/GroupEditor.kt
index 7bed9512..4e29c481 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/GroupEditor.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/GroupEditor.kt
@@ -31,6 +31,7 @@ import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.Bot
import com.codync.android.core.GroupDraft
import com.codync.android.design.*
@@ -104,7 +105,7 @@ import com.codync.android.design.*
@Composable private fun MemberRow(bot: Bot, bots: List<Bot>, dimmed: Boolean = false, trailing: @Composable () -> Unit) {
Row(Modifier.fillMaxWidth().heightIn(min = 48.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(14.dp)) {
BotAvatar(bot, bots, 32.dp)
- Text(bot.name, Modifier.weight(1f), style = Type.body, color = if (dimmed) Palette.secondary else Palette.text, maxLines = 1)
+ Text(bot.name, Modifier.weight(1f), style = Type.body, color = if (dimmed) Palette.secondary else Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
trailing()
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/LiveUpdateGallery.kt b/apps/android/app/src/main/kotlin/com/codync/android/LiveUpdateGallery.kt
index 0d9316ec..f8f0b9e7 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/LiveUpdateGallery.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/LiveUpdateGallery.kt
@@ -44,6 +44,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.design.*
import com.kyant.shapes.Capsule
import com.kyant.shapes.RoundedRectangle
@@ -149,7 +150,7 @@ internal object LiveUpdates {
@Composable private fun Caption(phase: TaskPhase, started: Long) {
val caption = if (phase.live) (if (phase == TaskPhase.NeedsInput) "Review the proposed changes." else "Running the test suite.") else phase.title
Row(horizontalArrangement = Arrangement.spacedBy(4.dp)) {
- Text(caption, Modifier.weight(1f, fill = false), style = Type.system(12f), color = if (phase == TaskPhase.Working) Palette.secondary else phase.tint(), maxLines = 1)
+ Text(caption, Modifier.weight(1f, fill = false), style = Type.system(12f), color = if (phase == TaskPhase.Working) Palette.secondary else phase.tint(), maxLines = 1, overflow = TextOverflow.Ellipsis)
if (phase.live) {
Text("·", style = Type.system(12f), color = Palette.tertiary)
Text(elapsed(started), style = Type.system(12f).monospacedDigit, color = Palette.secondary)
@@ -192,7 +193,7 @@ private val TaskPhase.mood get() = when (this) { TaskPhase.Working -> "working";
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
CharacterAvatar("blob", "green", 40.dp, phase.mood)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text("Reviewer", style = Type.system(14f).semibold, color = Palette.text, maxLines = 1)
+ Text("Reviewer", style = Type.system(14f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Caption(phase, started)
}
PhaseMark(phase, 20.dp)
@@ -234,7 +235,7 @@ private val TaskPhase.mood get() = when (this) { TaskPhase.Working -> "working";
colorFilter = androidx.compose.ui.graphics.ColorFilter.tint(Color.White))
Text(when { phase.live && phase != TaskPhase.NeedsInput -> elapsed(started); phase == TaskPhase.NeedsInput -> "Needs you"
phase == TaskPhase.Completed -> "Done"; phase == TaskPhase.Failed -> "Failed"; else -> phase.title },
- style = Type.system(12f).semibold.monospacedDigit, color = Color.White, maxLines = 1)
+ style = Type.system(12f).semibold.monospacedDigit, color = Color.White, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
Spacer(Modifier.weight(1f))
Row(horizontalArrangement = Arrangement.spacedBy(4.dp), verticalAlignment = Alignment.CenterVertically) {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MarketRows.kt b/apps/android/app/src/main/kotlin/com/codync/android/MarketRows.kt
index 16eb431e..ce6f0a2d 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MarketRows.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MarketRows.kt
@@ -96,7 +96,7 @@ import com.kyant.shapes.RoundedRectangle
}
Column(horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(2.dp)) {
Text(backend.name, style = Type.subheadline.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
- Text(status, style = Type.caption, color = Palette.secondary, maxLines = 1)
+ Text(status, style = Type.caption, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MarketplaceView.kt b/apps/android/app/src/main/kotlin/com/codync/android/MarketplaceView.kt
index 9682e8ff..37daa96a 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MarketplaceView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MarketplaceView.kt
@@ -39,6 +39,7 @@ import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.input.ImeAction
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.AgentBackend
import com.codync.android.core.CatalogPage
import com.codync.android.core.MarketConnector
@@ -238,8 +239,8 @@ private fun Modifier.bleed(amount: Dp) = layout { measurable, constraints ->
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {
ComputerBadge(state.hello?.text("device"), 32.dp, state.computers.firstOrNull()?.color)
Column {
- Text("Extensions", style = Type.title2.semibold, color = Palette.text, maxLines = 1)
- Text(state.hostName, style = Type.subheadline, color = Palette.secondary, maxLines = 1)
+ Text("Extensions", style = Type.title2.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(state.hostName, style = Type.subheadline, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
if (count > 0) Row(Modifier.plainButton(action = showInstalled), verticalAlignment = Alignment.CenterVertically,
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt b/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
index d5c93b9c..d7b76a53 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/MessageComposer.kt
@@ -57,6 +57,7 @@ import androidx.compose.ui.semantics.Role
import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.*
import com.codync.android.design.*
import com.kyant.shapes.Capsule
@@ -176,7 +177,7 @@ private enum class Trailing { Interrupt, Stop, Call, Send }
BasicTextField(state = text, enabled = !queuing, modifier = Modifier.weight(1f).contentReceiver(receiver).padding(vertical = 10.dp),
textStyle = Type.body.copy(color = Palette.text), cursorBrush = SolidColor(Palette.accent),
lineLimits = TextFieldLineLimits.MultiLine(maxHeightInLines = 8),
- decorator = { input -> Box { if (text.text.isEmpty()) Text(placeholder, style = Type.body, color = Palette.tertiary, maxLines = 1); input() } })
+ decorator = { input -> Box { if (text.text.isEmpty()) Text(placeholder, style = Type.body, color = Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis); input() } })
TrailingButton(trailing, canSend, Modifier.padding(bottom = 4.dp)) {
when (trailing) {
Trailing.Interrupt -> onInterrupt?.invoke()
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/PermissionCard.kt b/apps/android/app/src/main/kotlin/com/codync/android/PermissionCard.kt
index 684169d9..4dfe2b08 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/PermissionCard.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/PermissionCard.kt
@@ -27,6 +27,7 @@ import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.semantics.Role
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.Entry
import com.codync.android.design.*
import com.kyant.shapes.Capsule
@@ -120,7 +121,7 @@ private fun outcome(d: JsonObject): String = when (d.text("status")) {
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
Symbol(if (isNew) "doc.badge.plus" else "doc.text", size = 14.dp, tint = Palette.secondary)
- Text(path.substringAfterLast('/'), Modifier.weight(1f), style = Type.caption.monospaced, color = Palette.secondary, maxLines = 1)
+ Text(path.substringAfterLast('/'), Modifier.weight(1f), style = Type.caption.monospaced, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text("+" + (diff["added"]?.jsonPrimitive?.intOrNull ?: 0), style = Type.caption.monospaced, color = Palette.added)
Text("−" + (diff["removed"]?.jsonPrimitive?.intOrNull ?: 0), style = Type.caption.monospaced, color = Palette.removed)
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ScreenView.kt b/apps/android/app/src/main/kotlin/com/codync/android/ScreenView.kt
index 51a4c34c..8033ea07 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ScreenView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ScreenView.kt
@@ -136,8 +136,10 @@ import com.codync.android.design.*
val activity = LocalActivity.current ?: return
val view = LocalView.current
DisposableEffect(activity) {
- // The Rotate button's choice lasts only while the screen is open.
+ // The app is portrait; the screen turns with the phone (its rotation lock respected) and with
+ // the Rotate button, only while it's open.
val orientation = activity.requestedOrientation
+ activity.requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER
val controller = WindowCompat.getInsetsController(activity.window, view)
controller.systemBarsBehavior = WindowInsetsControllerCompat.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
controller.hide(WindowInsetsCompat.Type.systemBars())
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt b/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
index 525ffb6e..0cf59ca5 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt
@@ -108,7 +108,7 @@ import kotlinx.serialization.json.put
CardSection(footer = "Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.") {
row {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) {
- Text("Share usage analytics", style = Type.body, color = Palette.text, maxLines = 1)
+ Text("Share usage analytics", style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
IconButton("About usage analytics", "info.circle") { aboutAnalytics = true }
Box(Modifier.weight(1f))
CodyncSwitch(Analytics.enabled, Analytics::setEnabled, Modifier.width(34.dp)
@@ -201,7 +201,7 @@ private class ComputerActions(val extensions: () -> Unit, val screen: () -> Unit
}), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
ComputerBadge(state.hello?.text("device"), 40.dp, computer.color)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(state.hello?.text("name") ?: computer.name, style = Type.body.semibold, color = Palette.text, maxLines = 1)
+ Text(state.hello?.text("name") ?: computer.name, style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(4.dp)) {
val ink = if (link is LinkState.ComputerOffline || link is LinkState.Failed) Palette.warning else Palette.secondary
Text(detail, style = Type.subheadline, color = ink, maxLines = if (stale) 2 else 1, overflow = TextOverflow.Ellipsis)
@@ -236,8 +236,8 @@ private class ComputerActions(val extensions: () -> Unit, val screen: () -> Unit
Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
Box(Modifier.graphicsLayer { alpha = 0.5f }) { ComputerBadge(computer.device, 40.dp) }
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(computer.name, style = Type.body.semibold, color = Palette.text, maxLines = 1)
- Text(detail, style = Type.subheadline, color = Palette.secondary, maxLines = 2)
+ Text(computer.name, style = Type.body.semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(detail, style = Type.subheadline, color = Palette.secondary, maxLines = 2, overflow = TextOverflow.Ellipsis)
}
when {
code != null -> SecondaryButton("Code", action = ask)
@@ -253,8 +253,8 @@ private class ComputerActions(val extensions: () -> Unit, val screen: () -> Unit
Row(Modifier.fillMaxWidth(), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
Box(Modifier.graphicsLayer { alpha = 0.35f }) { ComputerBadge(computer.device, 40.dp) }
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(computer.name, style = Type.body.semibold, color = Palette.secondary, maxLines = 1)
- Text("Older copy of this computer$seen", style = Type.subheadline, color = Palette.tertiary, maxLines = 2)
+ Text(computer.name, style = Type.body.semibold, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text("Older copy of this computer$seen", style = Type.subheadline, color = Palette.tertiary, maxLines = 2, overflow = TextOverflow.Ellipsis)
}
IconButton("Remove from account", "trash", action = remove)
}
@@ -264,7 +264,7 @@ private class ComputerActions(val extensions: () -> Unit, val screen: () -> Unit
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {
BotAvatar(bot, state.bots, 28.dp)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(1.dp)) {
- Text(bot.name, style = Type.body, color = Palette.text, maxLines = 1)
+ Text(bot.name, style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text(state.hello?.text("name") ?: state.computers.firstOrNull()?.name.orEmpty(), style = Type.caption, color = Palette.tertiary)
}
IconButton("Unhide", "eye") {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/SetupTerminal.kt b/apps/android/app/src/main/kotlin/com/codync/android/SetupTerminal.kt
index 01899e3a..0f9ab51d 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/SetupTerminal.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/SetupTerminal.kt
@@ -94,8 +94,8 @@ import java.util.UUID
val error = status.error
when {
renderError -> Text("The terminal couldn't load. Update Android System WebView, then try again.", Modifier.weight(1f),
- style = Type.footnote, color = Palette.danger, maxLines = 2)
- error != null -> Text(error, Modifier.weight(1f), style = Type.footnote, color = Palette.danger, maxLines = 2)
+ style = Type.footnote, color = Palette.danger, maxLines = 2, overflow = TextOverflow.Ellipsis)
+ error != null -> Text(error, Modifier.weight(1f), style = Type.footnote, color = Palette.danger, maxLines = 2, overflow = TextOverflow.Ellipsis)
code != null -> {
Symbol(if (code == 0) "checkmark.circle.fill" else "exclamationmark.circle.fill", size = 16.dp, tint = if (code == 0) Palette.added else Palette.warning)
Text(if (code == 0) "Finished." else "Ended with an error ($code).", Modifier.weight(1f), style = Type.footnote, color = Palette.secondary)
@@ -103,7 +103,7 @@ import java.util.UUID
else -> {
ThinkingOrb(size = 14.dp, color = Palette.secondary)
Text(if (status.starting) "Starting setup on ${state.hostName}…" else if (!status.connected) "Reconnecting to the setup terminal…"
- else "Running on ${state.hostName}. Links open on this device.", Modifier.weight(1f), style = Type.footnote, color = Palette.secondary, maxLines = 2)
+ else "Running on ${state.hostName}. Links open on this device.", Modifier.weight(1f), style = Type.footnote, color = Palette.secondary, maxLines = 2, overflow = TextOverflow.Ellipsis)
}
}
if (code != null) PrimaryButton("Done", action = leave)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/SlashCommands.kt b/apps/android/app/src/main/kotlin/com/codync/android/SlashCommands.kt
index d0877c73..b20b42f5 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/SlashCommands.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/SlashCommands.kt
@@ -69,7 +69,7 @@ internal object SlashCommands {
.semantics(mergeDescendants = true) { contentDescription = command.title }.padding(horizontal = 14.dp, vertical = 10.dp),
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {
Box(Modifier.width(20.dp), contentAlignment = Alignment.Center) { Symbol(command.icon, size = 17.dp, tint = Palette.secondary) }
- Text(command.title, style = Type.subheadline, color = Palette.text, maxLines = 1)
+ Text(command.title, style = Type.subheadline, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text(command.detail, Modifier.weight(1f), style = Type.subheadline, color = if (command.warning) Palette.warning else Palette.secondary,
maxLines = 1, overflow = TextOverflow.Ellipsis)
}
@@ -82,7 +82,7 @@ internal object SlashCommands {
for (member in members) Row(Modifier.clip(Capsule()).background(Palette.surface).plainButton { mention(member) }
.padding(horizontal = 10.dp, vertical = 6.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(6.dp)) {
BotAvatar(member, bots, 18.dp)
- Text(member.name, style = Type.subheadline, color = Palette.text, maxLines = 1)
+ Text(member.name, style = Type.subheadline, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt b/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt
index e661544d..cb727122 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt
@@ -107,7 +107,7 @@ import kotlinx.serialization.json.jsonPrimitive
val label: @Composable () -> Unit = {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {
Box(Modifier.width(18.dp), contentAlignment = Alignment.Center) { Symbol(icon, size = 15.dp, tint = Palette.secondary) }
- Text(d.text("title") ?: "Tool", Modifier.weight(1f), style = Type.subheadline, color = Palette.text, maxLines = 2)
+ Text(d.text("title") ?: "Tool", Modifier.weight(1f), style = Type.subheadline, color = Palette.text, maxLines = 2, overflow = TextOverflow.Ellipsis)
when (d.text("status")) {
"completed" -> Symbol("checkmark", size = 14.dp, tint = Palette.accent)
"failed" -> Symbol("xmark", size = 14.dp, tint = Palette.danger)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/VoiceChatSettings.kt b/apps/android/app/src/main/kotlin/com/codync/android/VoiceChatSettings.kt
index 48e06b44..fddb90aa 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/VoiceChatSettings.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/VoiceChatSettings.kt
@@ -10,6 +10,7 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.*
import com.codync.android.design.*
import kotlinx.coroutines.CancellationException
@@ -148,8 +149,8 @@ import kotlinx.coroutines.launch
if (hasKey) Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(10.dp)) {
Symbol("key.fill", size = 18.dp, tint = Palette.secondary)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(1.dp)) {
- Text("Key saved", style = Type.body, color = Palette.text, maxLines = 1)
- Text("Stays on $host", style = Type.caption, color = Palette.tertiary, maxLines = 1)
+ Text("Key saved", style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text("Stays on $host", style = Type.caption, color = Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
if (busy) Spinner() else IconButton("Test key", "checkmark.seal", action = ::test)
} else if (saved == false) Row(horizontalArrangement = Arrangement.spacedBy(10.dp)) {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/VoiceControls.kt b/apps/android/app/src/main/kotlin/com/codync/android/VoiceControls.kt
index 7cc47e93..e89b679f 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/VoiceControls.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/VoiceControls.kt
@@ -30,6 +30,7 @@ import androidx.compose.ui.semantics.contentDescription
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.kyant.shapes.Capsule
import kotlin.math.sin
import androidx.core.content.ContextCompat
@@ -83,7 +84,7 @@ internal fun openAppSettings(context: android.content.Context) =
// Audio leaves the phone: say where.
voice.provider?.let { provider ->
Text(provider.title, Modifier.semantics { contentDescription = "Voice by ${provider.title}" },
- style = Type.caption2.semibold, color = Palette.secondary, maxLines = 1)
+ style = Type.caption2.semibold, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
RoundButton("Call settings", "gearshape") { settings = true }
RoundButton(if (voice.muted) "Unmute" else "Mute", if (voice.muted) "mic.slash" else "mic", on = voice.muted, action = store::muteVoice)
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/WidgetCards.kt b/apps/android/app/src/main/kotlin/com/codync/android/WidgetCards.kt
index 72693d0f..f22273ef 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/WidgetCards.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/WidgetCards.kt
@@ -32,6 +32,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.core.ProviderLimit
import com.codync.android.core.UsageProvider
import com.codync.android.core.UsageReport
@@ -116,14 +117,14 @@ internal fun until(at: Long, now: Long): String {
Column(Modifier.fillMaxSize(), verticalArrangement = Arrangement.spacedBy(if (layout == ProviderLayout.Small) 6.dp else 8.dp)) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(7.dp)) {
ProviderMascot(provider, 22.dp)
- Text(provider.name, Modifier.weight(1f), style = Type.system(13f).semibold, color = Palette.text, maxLines = 1)
+ Text(provider.name, Modifier.weight(1f), style = Type.system(13f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
if (layout != ProviderLayout.Small) Text("Usage", style = Type.system(10f).medium, color = Palette.secondary)
}
val top = provider.tightest
if (layout == ProviderLayout.Small && top != null) {
Spacer(Modifier.weight(1f))
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text(top.title, style = Type.system(11f), color = Palette.secondary, maxLines = 1)
+ Text(top.title, style = Type.system(11f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
Row(verticalAlignment = Alignment.Bottom) {
val ink = if ((top.percent ?: 0.0) >= 90) Palette.danger else Palette.text
Text("${(top.percent ?: 0.0).roundToInt()}", style = Type.system(32f).semibold.monospacedDigit, color = ink)
@@ -131,24 +132,24 @@ internal fun until(at: Long, now: Long): String {
}
}
UsageTicks(top.percent ?: 0.0, tint, 13.dp)
- Text(top.resetsShort() ?: "Usage reported by your computer", style = Type.system(9f), color = Palette.secondary, maxLines = 1)
+ Text(top.resetsShort() ?: "Usage reported by your computer", style = Type.system(9f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
} else {
if (layout == ProviderLayout.Large && top != null) Row(Modifier.padding(vertical = 4.dp), verticalAlignment = Alignment.Bottom,
horizontalArrangement = Arrangement.spacedBy(8.dp)) {
Text("${(top.percent ?: 0.0).roundToInt()}%", style = Type.system(36f).semibold.monospacedDigit,
color = if ((top.percent ?: 0.0) >= 90) Palette.danger else Palette.text)
- Text("${top.title} · highest usage", Modifier.padding(bottom = 6.dp), style = Type.system(11f), color = Palette.secondary, maxLines = 2)
+ Text("${top.title} · highest usage", Modifier.padding(bottom = 6.dp), style = Type.system(11f), color = Palette.secondary, maxLines = 2, overflow = TextOverflow.Ellipsis)
}
for (window in provider.windows.take(if (layout == ProviderLayout.Large) 4 else 2)) {
Column(verticalArrangement = Arrangement.spacedBy(3.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) {
- Text(window.title, Modifier.weight(1f), style = Type.system(11f).medium, color = Palette.secondary, maxLines = 1)
+ Text(window.title, Modifier.weight(1f), style = Type.system(11f).medium, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text("${(window.percent ?: 0.0).roundToInt()}%", style = Type.system(13f).semibold.monospacedDigit,
color = if ((window.percent ?: 0.0) >= 90) Palette.danger else Palette.text)
}
UsageTicks(window.percent ?: 0.0, tint, 12.dp)
window.resetsShort()?.let { Text(it, Modifier.fillMaxWidth(), style = Type.system(9f), color = Palette.secondary,
- maxLines = 1, textAlign = TextAlign.End) }
+ maxLines = 1, overflow = TextOverflow.Ellipsis, textAlign = TextAlign.End) }
}
}
}
@@ -173,9 +174,9 @@ internal fun until(at: Long, now: Long): String {
@Composable private fun LimitHero(limit: ProviderLimit) {
val percent = limit.window.percent ?: 0.0
Column(verticalArrangement = Arrangement.spacedBy(2.dp)) {
- Text("${limit.provider} · ${limit.window.label}", style = Type.caption, color = Palette.secondary, maxLines = 1)
- Text("${percent.roundToInt()}%", style = Type.system(34f).semibold.monospacedDigit, color = if (percent >= 90) Palette.danger else Palette.text, maxLines = 1)
- Text(limit.window.resetsShort() ?: " ", style = Type.caption2, color = Palette.tertiary, maxLines = 1)
+ Text("${limit.provider} · ${limit.window.label}", style = Type.caption, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text("${percent.roundToInt()}%", style = Type.system(34f).semibold.monospacedDigit, color = if (percent >= 90) Palette.danger else Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(limit.window.resetsShort() ?: " ", style = Type.caption2, color = Palette.tertiary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
@@ -183,7 +184,7 @@ internal fun until(at: Long, now: Long): String {
val percent = limit.window.percent ?: 0.0
Column(verticalArrangement = Arrangement.spacedBy(4.dp)) {
Row {
- Text("${limit.provider} ${limit.window.label}", Modifier.weight(1f), style = Type.caption2, color = Palette.secondary, maxLines = 1)
+ Text("${limit.provider} ${limit.window.label}", Modifier.weight(1f), style = Type.caption2, color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
Text("${percent.roundToInt()}%", style = Type.caption2.monospacedDigit, color = Palette.secondary)
}
UsageTicks(percent, usageTint(percent), 10.dp)
@@ -257,12 +258,12 @@ private fun rank(bot: WidgetBot) = when (bot.status) { "needsInput" -> 0; "worki
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(7.dp)) {
CharacterAvatar(bot.avatarShape, bot.avatarColor, 24.dp)
Column(Modifier.weight(1f), verticalArrangement = Arrangement.spacedBy(1.dp)) {
- Text(bot.name, style = Type.system(11f).semibold, color = Palette.text, maxLines = 1)
+ Text(bot.name, style = Type.system(11f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
activities[bot.id]?.takeIf { bot.status == "working" || bot.status == "needsInput" }?.let {
- Text(it, style = Type.system(10f), color = Palette.secondary, maxLines = 1)
+ Text(it, style = Type.system(10f), color = Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
- Text(label, style = Type.system(10f, if (bot.status == "needsInput") FontWeight.SemiBold else FontWeight.Normal), color = tint, maxLines = 1)
+ Text(label, style = Type.system(10f, if (bot.status == "needsInput") FontWeight.SemiBold else FontWeight.Normal), color = tint, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
if (bots.isEmpty()) Text("Create your first bot in Codync.", style = Type.system(12f), color = Palette.secondary)
@@ -279,7 +280,7 @@ private fun rank(bot: WidgetBot) = when (bot.status) { "needsInput" -> 0; "worki
else {
Column(Modifier.padding(horizontal = 4.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(4.dp)) {
CharacterAvatar(bot.avatarShape, bot.avatarColor, 30.dp, bot.status)
- Text(bot.name, style = Type.system(9f).semibold, color = Palette.text, maxLines = 1)
+ Text(bot.name, style = Type.system(9f).semibold, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
if (bot.status == "working" || bot.status == "error") Box(Modifier.align(Alignment.TopEnd).padding(7.dp).size(7.dp)
.clip(Capsule()).background(widgetState(bot.status).second))
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/WidgetSetupDemo.kt b/apps/android/app/src/main/kotlin/com/codync/android/WidgetSetupDemo.kt
index d0531250..c2cec6dd 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/WidgetSetupDemo.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/WidgetSetupDemo.kt
@@ -51,6 +51,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
+import androidx.compose.ui.text.style.TextOverflow
import com.codync.android.design.*
import com.kyant.shapes.Capsule
import com.kyant.shapes.RoundedRectangle
@@ -282,7 +283,7 @@ private const val WIDGET_H = 84f
Row(Modifier.fillMaxWidth().height(24.dp).background(Color.White.copy(alpha = if (highlighted) 0.14f else 0f)).padding(horizontal = 9.dp),
verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(7.dp)) {
Symbol(symbol, size = 11.dp, tint = Color.White)
- Text(title, style = Type.system(9f, FontWeight.Medium), color = Color.White, maxLines = 1)
+ Text(title, style = Type.system(9f, FontWeight.Medium), color = Color.White, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
@@ -335,8 +336,8 @@ private const val WIDGET_H = 84f
CharacterAvatar("hex", "gray", 16.dp)
}
Column(Modifier.weight(1f)) {
- Text(title, style = Type.system(10f, FontWeight.Medium), color = Color.White, maxLines = 1)
- Text(count, style = Type.system(8f), color = Color.White.copy(alpha = 0.5f), maxLines = 1)
+ Text(title, style = Type.system(10f, FontWeight.Medium), color = Color.White, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Text(count, style = Type.system(8f), color = Color.White.copy(alpha = 0.5f), maxLines = 1, overflow = TextOverflow.Ellipsis)
}
Symbol("chevron.down", Modifier.graphicsLayer { rotationZ = 180f * open }, size = 10.dp, tint = Color.White.copy(alpha = 0.5f))
}
diff --git a/apps/android/design/src/main/kotlin/com/codync/android/design/Chrome.kt b/apps/android/design/src/main/kotlin/com/codync/android/design/Chrome.kt
index d22b247a..ffb6feef 100644
--- a/apps/android/design/src/main/kotlin/com/codync/android/design/Chrome.kt
+++ b/apps/android/design/src/main/kotlin/com/codync/android/design/Chrome.kt
@@ -100,7 +100,7 @@ class TabItem<T>(val value: T, val title: String, val systemImage: String, val i
Column(Modifier.size(TAB_WIDTH, 54.dp).clip(Capsule()).selectable(on, role = Role.Tab) { select(tab.value) },
horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center) {
Symbol(tab.systemImage, size = tab.iconSize, height = 28.dp, tint = Palette.text)
- Text(tab.title, style = Type.system(10f).medium, color = Palette.text, maxLines = 1)
+ Text(tab.title, style = Type.system(10f).medium, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
diff --git a/apps/android/design/src/main/kotlin/com/codync/android/design/Controls.kt b/apps/android/design/src/main/kotlin/com/codync/android/design/Controls.kt
index dc5edbcc..ed97d373 100644
--- a/apps/android/design/src/main/kotlin/com/codync/android/design/Controls.kt
+++ b/apps/android/design/src/main/kotlin/com/codync/android/design/Controls.kt
@@ -101,10 +101,10 @@ import com.kyant.shapes.RoundedRectangle
/** A filled capsule button: `.buttonStyle(.primary)` (accent) or `.secondary`. */
@Composable fun PrimaryButton(title: String, modifier: Modifier = Modifier, enabled: Boolean = true, action: () -> Unit) =
- PrimaryButton(action, modifier, enabled) { Text(title, maxLines = 1) }
+ PrimaryButton(action, modifier, enabled) { Text(title, maxLines = 1, overflow = TextOverflow.Ellipsis) }
@Composable fun SecondaryButton(title: String, modifier: Modifier = Modifier, enabled: Boolean = true, action: () -> Unit) =
- SecondaryButton(action, modifier, enabled) { Text(title, maxLines = 1) }
+ SecondaryButton(action, modifier, enabled) { Text(title, maxLines = 1, overflow = TextOverflow.Ellipsis) }
/** `.buttonStyle(.primary)` around any label (the label sets its own font and frame). */
@Composable fun PrimaryButton(action: () -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, label: @Composable () -> Unit) =
@@ -170,7 +170,7 @@ import com.kyant.shapes.RoundedRectangle
val on = id == selection
Box(Modifier.width(segment).height(36.dp).clip(Capsule())
.selectable(on, role = Role.Tab) { select(id) }, contentAlignment = Alignment.Center) {
- Text(label, style = Type.subheadline.medium, color = if (on) Palette.text else Palette.secondary, maxLines = 1)
+ Text(label, style = Type.subheadline.medium, color = if (on) Palette.text else Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)
}
}
}
diff --git a/docs/plans/android-app.md b/docs/plans/android-app.md
index cfbb4e20..2a893493 100644
--- a/docs/plans/android-app.md
+++ b/docs/plans/android-app.md
@@ -54,7 +54,7 @@ was walked through on an emulator against a real host.
| OpenAI Realtime, Gemini Live and Speech mode with a real key | `WebRtcPeer.kt`, `core/.../OpenAIRealtimeEngine.kt`, `GeminiLiveEngine.kt`, `CloudSpeechEngine.kt` | A provider key on the paired computer; the fallback to on-device voice is verified |
| Remote screen: Chinese IME composition, a hardware keyboard, the TURN relay path and its credential renewal | `ScreenKeys.kt`, `ScreenSession.kt`, `ScreenView.kt` | A computer it's safe to type into, and a signed-in host for the relay; viewing, trackpad and pinch zoom are verified |
| On-device voice with a live microphone | `PlatformSpeech.kt`, `LocalVoiceAudio.kt` | A phone; on the emulator the recognizer was fed the speech fixture |
-| Camera QR pairing, launcher widget refresh, rotation, foldables, large text, TalkBack end to end | `QrViewfinder.kt`, `CodyncWidgets.kt` | Physical devices |
+| Camera QR pairing, launcher widget refresh, foldables, TalkBack end to end | `QrViewfinder.kt`, `CodyncWidgets.kt` | Physical devices; portrait lock with the rotating screen viewer, 130% text and TalkBack's Move up/down were checked on the emulator |
### Different from the iPhone on purpose or by platform