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.

feat(apps): tapping the bot at the top of its chat opens its details

leepokai271c32d4b2a7
diff --git a/apps/android/WhatsNew.md b/apps/android/WhatsNew.md
index 1cd64734..e978f9fb 100644
--- a/apps/android/WhatsNew.md
+++ b/apps/android/WhatsNew.md
@@ -17,12 +17,14 @@ else a generic "Bug fixes and improvements" line. Delete old sections.
- 帳號選單裡的「電腦與設定」和它打開的頁面同名。
- 新增聯結器失敗後再試一次,會使用你改好的金鑰。
- Bot 工作中點一下狀態膠囊,就能在對話裡展開這一輪的思考、工具與 MCP 呼叫,太長時在膠囊內捲動。
+- 點對話上方的 Bot 會打開它的詳情、資料庫與設定;「新會話」改到 Bot 列表的長按選單。
### en-US
-- Bots can make artifacts: reports, trackers and dashboards you come back to show as a card in the chat. Open one full screen and message the bot below it to change it; it updates in place.
-- Each bot's Library collects its artifacts and the files and images shared in the chat.
+- Bots make artifacts, shown as cards in the chat; message the bot below one to edit it.
+- Each bot's Library holds its artifacts and the chat's files.
- Create bots that run Hermes Agent.
-- Bots hand work to each other without waiting; the answer comes back to the bot that asked, which then replies to you.
-- The account sheet's Computers & settings row now has the same name as the page it opens.
-- Trying again after adding a connector failed uses the key you corrected.
-- While a bot works, tap its status pill to unfold this turn's thinking, tool and MCP calls right in the chat; a long turn scrolls inside the pill.
+- Bots hand work to each other without waiting.
+- Computers & settings now matches the page it opens.
+- Retrying a failed connector uses the corrected key.
+- Tap a working bot's status pill to see this turn's steps.
+- Tap a chat's title for the bot's details; New session moved to the list's touch & hold menu.
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/ChatLayoutTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/ChatLayoutTest.kt
index b08d3dc6..4f10bb8e 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/ChatLayoutTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/ChatLayoutTest.kt
@@ -121,9 +121,23 @@ class ChatLayoutTest {
compose.onNodeWithText("Show what it did").assertDoesNotExist()
InstrumentationRegistry.getInstrumentation().sendKeyDownUpSync(android.view.KeyEvent.KEYCODE_BACK)
compose.onNodeWithText("Copy").assertDoesNotExist()
- compose.onNode(chatMenu).performClick()
- compose.onNodeWithText("Edit profile").assertIsDisplayed()
- compose.onNodeWithText("Routines").assertIsDisplayed()
- compose.onNodeWithText("Full conversation").assertIsDisplayed()
+ }
+
+ @Test fun theTitleOpensTheBotsDetailsOnDetails() {
+ assumeTrue(Build.PRODUCT.startsWith("sdk"))
+ val store = ViewModelProvider(compose.activity)[AppStore::class.java]
+ val bot = Bot("details-preview", "Scout")
+ val state = AppState(loading = false, selectedBot = bot.id, bots = listOf(bot), historyComplete = setOf(bot.id),
+ hello = buildJsonObject { put("version", ARTIFACTS_HOST) })
+ compose.runOnUiThread { compose.activity.setContent { Hosted { ChatScreen(state, store, {}) } } }
+ compose.onNode(chatTitle).performClick()
+ // Details first, with the routines; no Memory on Android until the read-only memory screen is ported.
+ compose.onNode(hasText("Details") and isSelected()).assertIsDisplayed()
+ compose.onNodeWithText("Library").assertIsDisplayed()
+ compose.onNodeWithText("Memory").assertDoesNotExist()
+ // The sheet merges plain text into itself, so the heading is found unmerged.
+ compose.onNodeWithText("Routines", useUnmergedTree = true).assertExists()
+ compose.onNodeWithText("Settings").performClick()
+ compose.onNodeWithText("Notifications").performScrollTo().assertIsDisplayed()
}
}
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveChatTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveChatTest.kt
index 8b4ea02b..0a48f698 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveChatTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveChatTest.kt
@@ -29,7 +29,7 @@ class LiveChatTest {
compose.waitUntil(30_000) { compose.onAllNodesWithText(bot).fetchSemanticsNodes().isNotEmpty() }
val back = compose.onAllNodes(hasText("Back") or hasContentDescription("Back")).fetchSemanticsNodes()
if (back.isEmpty()) compose.onNodeWithText(bot).performClick()
- compose.waitUntil(10_000) { compose.onAllNodes(chatMenu).fetchSemanticsNodes().size == 1 }
+ compose.waitUntil(10_000) { compose.onAllNodes(chatTitle).fetchSemanticsNodes().size == 1 }
val message = "Android acceptance " + UUID.randomUUID()
val context = InstrumentationRegistry.getInstrumentation().targetContext
val local = LocalStore(context)
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveDraftTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveDraftTest.kt
index 7c96cc4c..6640f726 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveDraftTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveDraftTest.kt
@@ -32,7 +32,7 @@ class LiveDraftTest {
compose.runOnUiThread { store.openBot(bot.id) }
// A cached roster can arrive before startup finishes; wait for the chat itself.
compose.waitUntil(10_000) { !store.state.value.loading && store.state.value.rosterLoaded &&
- compose.onAllNodes(chatMenu).fetchSemanticsNodes().size == 1 }
+ compose.onAllNodes(chatTitle).fetchSemanticsNodes().size == 1 }
val mainText = "Android unsent draft acceptance"
if (phase == "prepare") {
compose.waitUntil(10_000) { compose.onAllNodes(hasSetTextAction()).fetchSemanticsNodes().size == 1 }
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveManagementTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveManagementTest.kt
index 8acc4b3d..e75960b5 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveManagementTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveManagementTest.kt
@@ -50,18 +50,21 @@ class LiveManagementTest {
val replies = store.state.value.entries.filter { it.botId == group.id && it.kind == "agent" && it.isChat }
assertTrue(replies.isNotEmpty())
assertTrue(replies.all { it.data["author"]?.jsonPrimitive?.content == member.id })
- openEditor()
+ // A group's title opens its editor.
+ compose.openChatDetails()
// The name field shows the members' names until the group has its own.
compose.onNode(hasSetTextAction() and hasText(group.name.ifBlank { "${member.name}, ${parent.name}" })).performTextReplacement("Edited group")
compose.onNodeWithContentDescription("Save").performClick()
compose.waitUntil(30_000) { store.state.value.bots.firstOrNull { it.id == group.id }?.name == "Edited group" }
assertEquals(group.members, store.state.value.bots.single { it.id == group.id }.members)
- compose.waitUntil(10_000) { compose.onAllNodes(chatMenu).fetchSemanticsNodes().size == 1 }
+ compose.waitUntil(10_000) { compose.onAllNodes(chatTitle).fetchSemanticsNodes().size == 1 }
compose.runOnUiThread { store.openBot(null) }
- rosterActions("Edited group")
+ compose.rosterActions("Edited group")
+ // A group has no agent session of its own.
+ compose.onNodeWithText("New session").assertDoesNotExist()
compose.onNodeWithText("Pin").performScrollTo().performClick()
compose.waitUntil(30_000) { store.state.value.bots.single { it.id == group.id }.pinned }
- rosterActions("Edited group")
+ compose.rosterActions("Edited group")
compose.onNodeWithText("Hide from list").performScrollTo().performClick()
compose.waitUntil(30_000) { store.state.value.bots.single { it.id == group.id }.hidden }
// Hidden bots come back from Computers & settings.
@@ -70,7 +73,7 @@ class LiveManagementTest {
compose.waitUntil(30_000) { !store.state.value.bots.single { it.id == group.id }.hidden }
InstrumentationRegistry.getInstrumentation().sendKeyDownUpSync(KeyEvent.KEYCODE_BACK)
compose.waitUntil(10_000) { compose.onAllNodesWithText("Computers & settings").fetchSemanticsNodes().isEmpty() }
- rosterActions("Edited group")
+ compose.rosterActions("Edited group")
compose.onNodeWithText("Edit group").performClick()
compose.onNodeWithText("Delete group chat").performScrollTo().performClick()
compose.onAllNodesWithText("Delete group chat").onLast().performClick()
@@ -85,14 +88,4 @@ class LiveManagementTest {
channel.close()
}
}
-
- private fun openEditor() {
- // The host event can arrive before the save callback closes the editor.
- compose.chatAction("Edit group")
- }
-
- private fun rosterActions(name: String) {
- compose.waitUntil(10_000) { compose.onAllNodes(hasText(name) and hasClickAction()).fetchSemanticsNodes().size == 1 }
- compose.onNode(hasText(name) and hasClickAction()).performTouchInput { longClick() }
- }
}
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveMemoryTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveMemoryTest.kt
index 47a2bb93..585665da 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveMemoryTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveMemoryTest.kt
@@ -27,9 +27,11 @@ class LiveMemoryTest {
val before = runBlocking { channel.call("history", body("botId" to botId)) }
val store = ViewModelProvider(compose.activity)[AppStore::class.java]
compose.waitUntil(30_000) { store.state.value.bots.any { it.id == botId } }
- assertTrue(store.state.value.bots.single { it.id == botId }.name.startsWith("Android memory acceptance"))
- compose.runOnUiThread { store.openBot(botId) }
- compose.chatAction("Edit profile")
+ val name = store.state.value.bots.single { it.id == botId }.name
+ assertTrue(name.startsWith("Android memory acceptance"))
+ // The memory card is in the whole settings form, the roster's Edit profile.
+ compose.runOnUiThread { store.openBot(null) }
+ compose.rosterAction(name, "Edit profile")
val profile = "Android memory profile acceptance"
compose.waitUntil(30_000) { compose.onAllNodesWithText(profile).fetchSemanticsNodes().size == 1 }
compose.onNodeWithText("Android memory history acceptance").performScrollTo().assertIsDisplayed()
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveRoutinesTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveRoutinesTest.kt
index 4bb47166..ee8e7d08 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveRoutinesTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveRoutinesTest.kt
@@ -39,14 +39,14 @@ class LiveRoutinesTest {
compose.waitUntil(15_000) { "usage" !in store.state.value.busy }
assertNull(store.state.value.error)
compose.runOnUiThread { store.openBot(bot.id) }
- compose.chatAction("Routines")
- compose.onNodeWithContentDescription("Ask the bot for a routine").performClick()
+ compose.openChatDetails()
+ compose.onNodeWithContentDescription("Ask the bot for a routine").performScrollTo().performClick()
compose.waitUntil(10_000) { compose.onAllNodes(hasSetTextAction() and hasText("I want a routine that ")).fetchSemanticsNodes().size == 1 }
compose.runOnUiThread { store.editDraft(bot.id, "") }
- compose.chatAction("Routines")
+ compose.openChatDetails()
compose.waitUntil(10_000) { "routines:${bot.id}" !in store.state.value.busy && store.state.value.routines[bot.id] != null }
compose.onNodeWithText("No routines yet. Ask the bot for one, or set it up yourself with +.").assertIsDisplayed()
- compose.onNodeWithContentDescription("Set up a routine").performClick()
+ compose.onNodeWithContentDescription("Set up a routine").performScrollTo().performClick()
field(Input.Name).performTextReplacement("Schedule acceptance")
field(Input.Instruction).performTextReplacement("Report a fake-agent acceptance result")
field(Input.Cron).performTextReplacement("invalid cron")
@@ -62,7 +62,7 @@ class LiveRoutinesTest {
// Each row's switch pauses and resumes it.
toggle("Schedule acceptance").assertIsOn().performClick()
compose.waitUntil(15_000) { store.state.value.routines.getValue(bot.id).routines.single().enabled == false && "routines:${bot.id}" !in store.state.value.busy }
- compose.onNodeWithText("Schedule acceptance").performClick()
+ compose.onNodeWithText("Schedule acceptance").performScrollTo().performClick()
compose.onNodeWithText("Edit routine").assertIsDisplayed()
field(Input.Name).performTextReplacement("Edited schedule")
waitEnabled("Save changes")
@@ -83,7 +83,7 @@ class LiveRoutinesTest {
put("triggers", triggers); put("enabled", false)
}) }.jsonObject.getValue("routine").jsonObject
compose.waitUntil(15_000) { store.state.value.routines.getValue(bot.id).routines.size == 2 && "routines:${bot.id}" !in store.state.value.busy }
- compose.onNodeWithText("Preserve triggers").performClick()
+ compose.onNodeWithText("Preserve triggers").performScrollTo().performClick()
field(Input.Name).performTextReplacement("Preserved triggers")
waitEnabled("Save changes")
compose.onNodeWithText("Save changes").performClick()
@@ -94,7 +94,7 @@ class LiveRoutinesTest {
assertFalse(preserved.enabled)
// A new webhook routine stays open on its URL and key.
- compose.onNodeWithContentDescription("Set up a routine").performClick()
+ compose.onNodeWithContentDescription("Set up a routine").performScrollTo().performClick()
field(Input.Name).performTextReplacement("Webhook acceptance")
field(Input.Instruction).performTextReplacement("Report a fake webhook acceptance result")
compose.onNodeWithContentDescription("When to run: Schedule").performScrollTo().performClick()
@@ -134,7 +134,7 @@ class LiveRoutinesTest {
compose.waitUntil(10_000) { compose.onAllNodes(inEditor and isEnabled()).fetchSemanticsNodes().size > field.ordinal }
return compose.onAllNodes(inEditor)[field.ordinal].performScrollTo()
}
- private fun toggle(routine: String) = compose.onNode(hasContentDescription(routine) and isToggleable())
+ private fun toggle(routine: String) = compose.onNode(hasContentDescription(routine) and isToggleable()).performScrollTo()
private fun waitEnabled(label: String) {
compose.waitUntil(10_000) { compose.onAllNodes(hasText(label) and isEnabled()).fetchSemanticsNodes().size == 1 }
}
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveRoutingTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveRoutingTest.kt
index 918aa33a..ea33070a 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveRoutingTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveRoutingTest.kt
@@ -78,7 +78,7 @@ class LiveRoutingTest {
compose.waitUntil(10_000) { compose.onAllNodes(usage).fetchSemanticsNodes().size == 1 }
instrumentation.runOnMainSync { store.openLink(link(id = parent)) }
withTimeout(10_000) { store.state.first { it.selectedBot == parent && it.error == null } }
- compose.onNode(chatMenu).assertIsDisplayed()
+ compose.onNode(chatTitle).assertIsDisplayed()
// Recreating the Activity must retain the current navigation, not replay its original intent.
scenario.recreate()
scenario.onActivity { activity ->
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveSettingsTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveSettingsTest.kt
index c3a840ca..4ea58bee 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveSettingsTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/LiveSettingsTest.kt
@@ -40,8 +40,8 @@ class LiveSettingsTest {
val listing = WireJson.decodeFromJsonElement<DirListing>(listingResponse)
val store = ViewModelProvider(compose.activity)[AppStore::class.java]
compose.waitUntil(30_000) { !store.state.value.loading && store.state.value.bots.any { it.id == bot.id } && store.state.value.actualConnection is LinkState.Ready }
- compose.runOnUiThread { store.openBot(bot.id) }
- compose.chatAction("Edit profile")
+ compose.runOnUiThread { store.openBot(null) }
+ compose.rosterAction(bot.name, "Edit profile")
compose.onNode(hasSetTextAction() and hasText(bot.name)).performTextReplacement("Unsaved draft")
compose.onNodeWithContentDescription("Workspace").performScrollTo().performClick()
compose.onNodeWithText("Choose project folder…").performClick()
@@ -57,7 +57,7 @@ class LiveSettingsTest {
assertEquals(bot.name, cancelled.name)
assertEquals(bot.cwd, cancelled.cwd)
assertNull(cancelled.notify)
- compose.chatAction("Edit profile")
+ compose.rosterAction(bot.name, "Edit profile")
compose.onNodeWithContentDescription("Workspace").performScrollTo().performClick()
compose.onNodeWithText("Choose project folder…").performClick()
compose.waitUntil(15_000) { compose.onAllNodesWithText(useFolder).fetchSemanticsNodes().size == 1 }
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/NavigationControls.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/NavigationControls.kt
index 0d8c2a93..f38e47c2 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/NavigationControls.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/NavigationControls.kt
@@ -33,11 +33,23 @@ internal fun ComposeTestRule.openExtensions() {
onNodeWithContentDescription("Extensions").performClick()
}
-/** The open chat's title menu ("<bot> actions"). */
-internal val chatMenu = hasContentDescription(" actions", substring = true)
+/** The open chat's title ("<bot>, view details"): it opens the bot's details, a group's editor. */
+internal val chatTitle = hasContentDescription(", view details", substring = true)
-internal fun ComposeTestRule.chatAction(label: String) {
- waitUntil(10_000) { onAllNodes(chatMenu).fetchSemanticsNodes().size == 1 }
- onNode(chatMenu).performClick()
+internal fun ComposeTestRule.openChatDetails() {
+ waitUntil(10_000) { onAllNodes(chatTitle).fetchSemanticsNodes().size == 1 }
+ onNode(chatTitle).performClick()
+}
+
+/** The roster row's touch-and-hold menu for the bot or group named [name] (the row's label; its text isn't merged in). */
+internal fun ComposeTestRule.rosterActions(name: String) {
+ val row = hasContentDescription(name) and hasClickAction()
+ waitUntil(10_000) { onAllNodes(row).fetchSemanticsNodes().size == 1 }
+ onNode(row).performTouchInput { longClick() }
+}
+
+/** [label] in the roster's touch-and-hold menu for [name]. */
+internal fun ComposeTestRule.rosterAction(name: String, label: String) {
+ rosterActions(name)
onNodeWithText(label).performClick()
}
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/ScreenPresentationTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/ScreenPresentationTest.kt
index d9291f4f..9c8b6ff5 100644
--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/ScreenPresentationTest.kt
+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/ScreenPresentationTest.kt
@@ -56,21 +56,33 @@ class ScreenPresentationTest {
}
@Test fun closingTheEditorDropsItsDraftAndANewGenerationRetiresIt() {
- val state = mutableStateOf(fixture().copy(selectedBot = bot.id, historyComplete = setOf(bot.id)))
+ val state = mutableStateOf(fixture())
compose.setContent { Hosted { CodyncApp(state.value, viewModel()) } }
- compose.chatAction("Edit profile")
+ compose.rosterAction(bot.name, "Edit profile")
compose.onNodeWithText("Settings").assertIsDisplayed()
compose.onNodeWithContentDescription("Save").assertIsNotEnabled()
compose.onNode(hasSetTextAction() and hasText(bot.name)).performTextReplacement("Discard this draft")
snapshot("bot-settings-sheet")
compose.onNodeWithContentDescription("Close").performClick()
compose.onNodeWithText("Settings").assertDoesNotExist()
- compose.chatAction("Edit profile")
+ compose.rosterAction(bot.name, "Edit profile")
compose.onNode(hasSetTextAction() and hasText(bot.name)).assertIsDisplayed()
compose.runOnUiThread { state.value = state.value.copy(generation = state.value.generation + 1) }
compose.onNodeWithText("Settings").assertDoesNotExist()
}
+ @Test fun onlyABotsTouchAndHoldMenuStartsANewSession() {
+ val group = Bot("presentation-group", "Crew", kind = "group", members = listOf(bot.id))
+ compose.setContent { Hosted { CodyncApp(fixture().copy(bots = listOf(bot, group)), viewModel()) } }
+ compose.rosterAction(bot.name, "New session")
+ compose.onNodeWithText("Start a new session?").assertIsDisplayed()
+ compose.onNodeWithText("Cancel").performClick()
+ compose.onNodeWithText("Start a new session?").assertDoesNotExist()
+ compose.rosterActions(group.name)
+ compose.onNodeWithText("Edit group").assertIsDisplayed()
+ compose.onNodeWithText("New session").assertDoesNotExist()
+ }
+
@Test fun largeTextKeepsSettingsActionsAndCompactOptionsWithinTheSheet() {
val draft = BotDraft(id = bot.id, name = bot.name, cwd = "/projects/A-long-project-name")
compose.setContent {
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/AppStoreBots.kt b/apps/android/app/src/main/kotlin/com/codync/android/AppStoreBots.kt
index b7e8ae14..d30d3810 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/AppStoreBots.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/AppStoreBots.kt
@@ -30,6 +30,9 @@ fun AppStore.saveBot(draft: BotDraft, onSaved: () -> Unit) = action("editor") {
onSaved()
}
+/** A saved bot's settings from its details, saved as they're edited: the chat stays where it is. */
+fun AppStore.saveSettings(draft: BotDraft) = command("updateBot", draft.body(), "settings:" + draft.id)
+
fun AppStore.saveGroup(draft: GroupDraft, onSaved: () -> Unit) = action("editor") {
val payload = draft.body(state.value.bots)
val active = ready()
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ArtifactViewer.kt b/apps/android/app/src/main/kotlin/com/codync/android/ArtifactViewer.kt
index 6ba6ee8e..cc902baf 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ArtifactViewer.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ArtifactViewer.kt
@@ -37,8 +37,11 @@ import com.codync.android.core.artifactDraftKey
import com.codync.android.core.artifactQuote
import com.codync.android.design.*
-/** The artifact a viewer shows, with what's known before its details arrive: a title, and the card to reply to. */
-internal data class OpenArtifact(val id: String, val title: String, val entryId: String?)
+/**
+ * The artifact a viewer shows, with what's known before its details arrive: a title, and the card to reply to. `botId`: the
+ * bot that owns it, not always the chat's (a group member's Library, from the group).
+ */
+internal data class OpenArtifact(val botId: String, val id: String, val title: String, val entryId: String?)
/**
* `content` over everything while `open` is set, sliding up like a full-screen cover; it keeps its artifact while it slides
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotDetailsView.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotDetailsView.kt
new file mode 100644
index 00000000..cb4be91f
--- /dev/null
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotDetailsView.kt
@@ -0,0 +1,127 @@
+package com.codync.android
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.layout.size
+import androidx.compose.foundation.rememberScrollState
+import androidx.compose.foundation.shape.CircleShape
+import androidx.compose.foundation.verticalScroll
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.shadow
+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 com.codync.android.core.Bot
+import com.codync.android.core.BotDraft
+import com.codync.android.core.LinkState
+import com.codync.android.core.ScreenState
+import com.codync.android.core.hasLibrary
+import com.codync.android.design.*
+import kotlinx.coroutines.delay
+
+/**
+ * The details sheet's pages, as on the desktop inspector; no Memory until the read-only memory screen is ported
+ * (docs/plans/android-app.md).
+ */
+internal enum class DetailsTab(val title: String) { Details("Details"), Library("Library"), Settings("Settings") }
+
+/**
+ * What to open the details sheet on (iOS `DetailsRequest`): a page, a routine's editor on the Details page, or another bot's
+ * details than the chat's (a group member's, from its notice).
+ */
+internal data class DetailsRequest(val tab: DetailsTab = DetailsTab.Details, val routineId: String? = null, val botId: String? = null)
+
+/**
+ * A bot's details (iOS `BotDetailsView`): who it is, then its details, library and settings. Settings save as you edit.
+ * `openArtifact`: an artifact picked in the Library, for the chat's viewer.
+ */
+@Composable internal fun BotDetailsView(bot: Bot, request: DetailsRequest, state: AppState, store: AppStore, openArtifact: (OpenArtifact) -> Unit) {
+ AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(AnalyticsScreen.BotDetails))
+ val dismiss = LocalDismissModal.current
+ var tab by remember(request) { mutableStateOf(request.tab) }
+ // A notice's routine opens its editor once, not again each time the Details page comes back.
+ var routineId by remember(request) { mutableStateOf(request.routineId) }
+ val saved = BotDraft.from(bot)
+ var draft by rememberBotDraft(saved, state)
+ var template by remember { mutableStateOf<BotDraft?>(null) }
+ val online = state.actualConnection is LinkState.Ready
+ // Saves a moment after the last change, like the desktop inspector. Keyed on the saved bot too: an edit made while
+ // the previous save was still out (and so skipped) is sent once that save lands.
+ LaunchedEffect(draft, online, saved) {
+ if (!online || !draft.isValid || draft == saved) return@LaunchedEffect
+ delay(600)
+ store.saveSettings(draft)
+ }
+ val tabs = listOfNotNull(DetailsTab.Details, DetailsTab.Library.takeIf { hasLibrary(state.hello?.text("version")) }, DetailsTab.Settings)
+ Box(Modifier.fillMaxSize().background(Palette.background)) {
+ Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(start = 20.dp, end = 20.dp, bottom = 24.dp),
+ horizontalAlignment = Alignment.CenterHorizontally) {
+ Identity(bot, state)
+ TabChoice(tab, tabs.map { it to it.title }, { tab = it }, Modifier.padding(top = 18.dp))
+ CompositionLocalProvider(LocalCardStyle provides CardStyle.Outlined) {
+ Box(Modifier.fillMaxWidth().padding(top = 20.dp)) {
+ when (tab) {
+ DetailsTab.Details -> Column(verticalArrangement = Arrangement.spacedBy(28.dp)) {
+ BotSettingsForm(state, store, draft, { draft = it }, FormPart.Often)
+ state.screen?.let { ComputerCard(it, draft.computer, online) { on -> draft = draft.copy(computer = on) } }
+ RoutinesView(bot, state, store, routineId, leave = dismiss)
+ LaunchedEffect(Unit) { routineId = null }
+ }
+ DetailsTab.Library -> LibraryView(bot, state, store, openArtifact)
+ DetailsTab.Settings -> BotSettingsForm(state, store, draft, { draft = it }, FormPart.Rarely)
+ }
+ }
+ }
+ }
+ Row(Modifier.align(Alignment.TopEnd).padding(top = 14.dp, end = 14.dp), horizontalArrangement = Arrangement.spacedBy(8.dp)) {
+ CornerButton("Create template", "square.and.arrow.up") { template = draft }
+ CornerButton("Close details", "xmark", dismiss)
+ }
+ }
+ CodyncSheet(template, { template = null }) { BotTemplateView(it) }
+}
+
+/** The bot's avatar and name, and what runs it. */
+@Composable private fun Identity(bot: Bot, state: AppState) {
+ Column(Modifier.fillMaxWidth().padding(top = 64.dp), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(4.dp)) {
+ Box(Modifier.padding(bottom = 10.dp)) { BotAvatar(bot, state.bots, 72.dp) }
+ Text(bot.name, style = Type.title3.semibold, color = Palette.text, textAlign = TextAlign.Center)
+ Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(5.dp)) {
+ AgentIcon(agentRegistry(state, bot.backend), 13.dp)
+ Text(backendName(state, bot.backend) + bot.model?.let { " · $it" }.orEmpty(), style = Type.footnote, color = Palette.secondary)
+ }
+ }
+}
+
+/** "Use the computer", saved with the rest of the draft, so a save of the other settings never sends it back. */
+@Composable private fun ComputerCard(screen: ScreenState, on: Boolean, online: Boolean, change: (Boolean) -> Unit) = CardSection("Computer") {
+ row {
+ SwitchRow("Use the computer", if (screen.controlReady) null else "On that computer, open Codync → Settings → Computer access to set it up first.",
+ on, change, enabled = online)
+ }
+}
+
+/** Grok Bot's corner buttons: the page color, ringed by a soft shadow. */
+@Composable private fun CornerButton(title: String, symbol: String, action: () -> Unit) {
+ val label = tr(title)
+ Box(Modifier.size(36.dp).shadow(1.dp, CircleShape).background(Palette.background, CircleShape).plainButton(action = action)
+ .semantics { contentDescription = label }, contentAlignment = Alignment.Center) {
+ Symbol(symbol, size = 17.dp, tint = Palette.text)
+ }
+}
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 93a12926..71cc8f43 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
@@ -1,57 +1,36 @@
package com.codync.android
-import androidx.compose.foundation.background
-import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
-import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
-import androidx.compose.foundation.relocation.BringIntoViewRequester
-import androidx.compose.foundation.relocation.bringIntoViewRequester
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.verticalScroll
-import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
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.*
-import com.kyant.shapes.RoundedRectangle
import kotlinx.serialization.json.JsonArray
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.booleanOrNull
-import kotlinx.serialization.json.contentOrNull
import kotlinx.serialization.json.jsonPrimitive
-/**
- * A bot's settings in a sheet, as iOS `BotEditorView`: the settings form plus Close and Save. New bots start in [NewBotView].
- * [atFallbacks] scrolls to the Agent card's fallbacks (a chat's "Add a fallback").
- */
-@Composable fun BotEditor(state: AppState, initial: BotDraft, store: AppStore, atFallbacks: Boolean = false) {
- var draft by remember(initial.id) { mutableStateOf(initial) }
- // A change made elsewhere (a bot that manages the team, another device) replaces each field not edited here.
- var base by remember(initial.id) { mutableStateOf(initial) }
- val saved = state.bots.firstOrNull { it.id == initial.id }?.let { BotDraft.from(it) }
- LaunchedEffect(saved) { if (saved != null && saved != base) { draft = draft.rebased(base, saved); base = saved } }
- var folders by remember { mutableStateOf(false) }
- var viewingSkill by remember { mutableStateOf<SkillRef?>(null) }
- var addingFallback by remember { mutableStateOf(false) }
+/** A bot's settings in a sheet, as iOS `BotEditorView`: the whole settings form plus Close and Save. New bots start in [NewBotView]. */
+@Composable fun BotEditor(state: AppState, initial: BotDraft, store: AppStore) {
+ var draft by rememberBotDraft(initial, state)
val online = state.actualConnection is LinkState.Ready
val saving = "editor" in state.busy
val dismiss = LocalDismissModal.current
- LaunchedEffect(online) { if (online) store.refreshPlugins() }
Column(Modifier.fillMaxSize()) {
ModalHeader("Settings") {
if (saving) Box(Modifier.size(36.dp), contentAlignment = Alignment.Center) { Spinner() }
@@ -59,141 +38,20 @@ import kotlinx.serialization.json.jsonPrimitive
store.saveBot(draft) { dismiss() }
}
}
- BotSettingsForm(state, store, draft, { draft = it }, { viewingSkill = it }, { addingFallback = true }, atFallbacks) { folders = true }
- }
- CodyncSheet(folders, { folders = false }) {
- FolderPicker(draft.cwd.ifEmpty { state.hello?.get("home")?.jsonPrimitive?.contentOrNull }, online, store::listDirs) {
- draft = draft.copy(cwd = it); folders = false
- }
- }
- CodyncSheet(viewingSkill, { viewingSkill = null }) { SkillSheet(it, state, store) }
- CodyncSheet(addingFallback, { addingFallback = false }) {
- AddFallbackSheet(state, store, draft.backend, draft.fallbacks.orEmpty()) { draft = draft.copy(fallbacks = draft.fallbacks.orEmpty() + it); addingFallback = false }
+ BotSettingsForm(state, store, draft, { draft = it }, FormPart.All, Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(20.dp))
}
}
+/** A form's draft of a saved bot: a change made elsewhere (a bot that manages the team, another device) replaces each field not edited here. */
+@Composable internal fun rememberBotDraft(initial: BotDraft, state: AppState): MutableState<BotDraft> {
+ val draft = remember(initial.id) { mutableStateOf(initial) }
+ var base by remember(initial.id) { mutableStateOf(initial) }
+ val saved = state.bots.firstOrNull { it.id == initial.id }?.let { BotDraft.from(it) }
+ LaunchedEffect(saved) { if (saved != null && saved != base) { draft.value = draft.value.rebased(base, saved); base = saved } }
+ return draft
+}
+
/** The computer's agents, as its hello lists them. */
internal fun backends(state: AppState): List<JsonObject> = (state.hello?.get("backends") as? JsonArray).orEmpty().mapNotNull { it as? JsonObject }
internal val JsonObject.available get() = this["available"]?.jsonPrimitive?.booleanOrNull == true
internal val JsonObject.curated get() = this["curated"]?.jsonPrimitive?.booleanOrNull != false
-
-/** Bot settings: a big avatar, then sections in the Settings style (`CardSection`). */
-@Composable private fun BotSettingsForm(state: AppState, store: AppStore, draft: BotDraft, change: (BotDraft) -> Unit, viewSkill: (SkillRef) -> Unit,
- addFallback: () -> Unit, atFallbacks: Boolean, chooseFolder: () -> Unit) {
- val online = state.actualConnection is LinkState.Ready
- val screen = state.screen
- val fallbacks = remember { BringIntoViewRequester() }
- LaunchedEffect(Unit) { if (atFallbacks) fallbacks.bringIntoView() }
- Column(Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(20.dp), verticalArrangement = Arrangement.spacedBy(30.dp)) {
- Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(16.dp)) {
- Box(Modifier.clip(RoundedRectangle(24.dp)).background(Palette.bubbleAgent).padding(18.dp)) {
- CharacterAvatar(draft.avatarShape, draft.avatarColor, 96.dp)
- }
- AvatarPicker(draft.avatarShape, draft.avatarColor, { change(draft.copy(avatarShape = it)) }, { change(draft.copy(avatarColor = it)) })
- }
- CardSection("Profile") {
- // A bot left unnamed at creation is named from its first conversations; rename it any time after.
- row { Field("Name") { FieldBox(draft.name, { change(draft.copy(name = it)) }, "Name") } }
- row {
- Field("Standing instructions", "Rules that always apply. Put task-specific requests in the chat instead.") {
- FieldBox(draft.description, { change(draft.copy(description = it)) }, "e.g. Reviews PRs. Never pushes without asking.", 3, 8)
- }
- }
- val bot = state.bots.firstOrNull { it.id == draft.id }
- bot?.createdBy?.let { creator ->
- row { ValueRow("Created by", "${state.bots.firstOrNull { it.id == creator }?.name ?: "A bot"} · ${RelativeTime.calendarDay(bot.createdAt)}") }
- }
- }
- CardSection("Agent") {
- val bot = state.bots.firstOrNull { it.id == draft.id }
- val step = bot?.agentStep
- if (bot != null && step != null) row { FallbackBanner(state, store, bot, step) }
- row {
- Column(verticalArrangement = Arrangement.spacedBy(6.dp)) {
- ValueRow("Computer", state.computers.firstOrNull()?.name ?: "Your computer")
- if (!online) Text("Reconnect to this computer to save settings.", style = Type.caption, color = Palette.warning)
- }
- }
- row {
- Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
- val rest = bot?.restOf(draft.backend)
- ValueRow("Agent", detail = rest?.line(RelativeTime.clock(rest.until))) {
- ChoicePicker(draft.backend, agentChoices(state) + ("custom" to "Custom command"),
- { if (it != draft.backend) change(draft.withAgent(it)) }, label = "Agent")
- }
- backends(state).firstOrNull { it.text("id") == draft.backend && !it.available }?.text("installHint")?.takeIf(String::isNotBlank)?.let {
- Text(it, style = Type.caption, color = Palette.warning)
- }
- if (draft.backend == "custom") FieldBox(draft.command.orEmpty(), { change(draft.copy(command = it.ifEmpty { null })) },
- "ACP command, e.g. my-agent --acp", style = Type.callout.monospaced, capitalize = false)
- }
- }
- row {
- AgentModelPicker(state, store::agentModels, draft.backend, draft.model, draft.modelOptions, draft.fastMode ?: false, bot,
- { model, options -> change(draft.copy(model = model, modelOptions = options)) }, { change(draft.copy(fastMode = it)) })
- }
- // Only from a host that has fallbacks (its bots say).
- val list = draft.fallbacks
- if (list != null) {
- row {
- FallbackList(state, draft.backend, list, bot, { change(draft.copy(fallbacks = it)) }, addFallback, Modifier.bringIntoViewRequester(fallbacks))
- }
- row {
- SwitchRow("Let the bot change its fallbacks", "It can set this list itself, for example when you ask it to.", draft.selfFallbacks != false,
- { change(draft.copy(selfFallbacks = it)) })
- }
- }
- row {
- ValueRow("Workspace", detail = if (draft.cwd.isEmpty()) "This bot has its own space for files. It can work in other folders when you ask."
- else "This project is the default starting folder. The bot can work elsewhere when you ask.") {
- DropdownMenu({ listOf(
- MenuItem("Personal workspace", selected = draft.cwd.isEmpty()) { change(draft.copy(cwd = "")) },
- MenuItem("Choose project folder…", selected = draft.cwd.isNotEmpty(), action = chooseFolder),
- ) }, label = "Workspace") {
- Row(Modifier.outline().pill(androidx.compose.ui.graphics.Color.Transparent), verticalAlignment = Alignment.CenterVertically,
- horizontalArrangement = Arrangement.spacedBy(6.dp)) {
- Text(if (draft.cwd.isEmpty()) tr("Personal") else draft.cwd.trimEnd('/').substringAfterLast('/').ifEmpty { "/" },
- style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
- Symbol("chevron.down", size = 13.dp, tint = Palette.secondary)
- }
- }
- }
- }
- row {
- ValueRow("Permissions", detail = if (draft.permission == "auto")
- "Tool requests are approved automatically. Your agent's own settings (like Claude Code's permission rules) still apply."
- else "You'll get an approval card and a notification whenever the agent asks.") {
- ChoicePicker(draft.permission, listOf("ask" to "Ask me", "auto" to "Approve automatically"), { change(draft.copy(permission = it)) },
- label = "Permissions")
- }
- }
- }
- CardSection("Activity") {
- row { SwitchRow("Notifications", "Get notified when this bot finishes or needs you", draft.notify != false, { change(draft.copy(notify = it)) }) }
- if (screen != null) row {
- SwitchRow("Use the computer", when {
- !screen.controlReady -> "Let this bot use apps. On that computer, open Codync → Settings → Computer access to set up permissions first."
- screen.enabled -> "Let this bot see the screen and use the mouse and keyboard. You can watch and take over from your phone."
- screen.computerUse -> "Let this bot see the screen and use the mouse and keyboard."
- else -> "Let this bot see the screen and use the mouse and keyboard. On that computer, open Codync → Settings → Computer access to set up permissions first."
- },
- draft.computer, { change(draft.copy(computer = it)) })
- }
- // Only from a host that has it (its bots say).
- if (state.bots.any { it.manageTeam != null }) row {
- SwitchRow("Manage the team", "Let this bot create bots and change any bot's setup, its own included. The bots it creates can too.",
- draft.manageTeam, { change(draft.copy(manageTeam = it)) })
- }
- }
- val plugins = state.plugins
- PluginToggles("Connectors", "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.",
- plugins?.connectors.orEmpty().map { Triple(it.id, it.name, it.command ?: it.url.orEmpty()) },
- draft.connectors ?: plugins?.connectors.orEmpty().map { it.id }, { change(draft.copy(connectors = it)) })
- PluginToggles("Skills", "No skills yet. Get some from Extensions, or write your own.",
- plugins?.skills.orEmpty().map { Triple(it.id, it.name, it.description) }, draft.skills.orEmpty(), { change(draft.copy(skills = it)) }) { id ->
- plugins?.skills?.firstOrNull { it.id == id }?.let { viewSkill(SkillRef(it.id, it.name, it.description)) }
- }
- draft.id?.let { MemoryCard(it, store) }
- state.error?.let { Text(it, style = Type.footnote, color = Palette.danger) }
- }
-}
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 89152de7..576d06f5 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
@@ -58,6 +58,7 @@ import kotlinx.serialization.json.putJsonArray
@Composable internal fun BotListView(state: AppState, store: AppStore, account: () -> Unit, manage: () -> Unit,
newBot: () -> Unit, newGroup: () -> Unit, edit: (Bot) -> Unit, bottomInset: androidx.compose.ui.unit.Dp) {
var confirmDelete by remember { mutableStateOf<Bot?>(null) }
+ var confirmNewSession by remember { mutableStateOf<Bot?>(null) }
val roster = roster(state.bots)
val reorder = remember { RosterReorder() }
reorder.roster = roster.map(Bot::id)
@@ -87,12 +88,18 @@ import kotlinx.serialization.json.putJsonArray
Box(Modifier.onSizeChanged { reorder.heights[bot.id] = it.height }
.then(if (lifted) Modifier.zIndex(1f).graphicsLayer { translationY = reorder.offset; scaleX = 1.02f; scaleY = 1.02f }
else Modifier.animateItem())) {
- BotRowItem(bot, state, store, reorder.handle(bot.id) { store.reorder(it) }, edit = { edit(bot) }, delete = { confirmDelete = bot })
+ BotRowItem(bot, state, store, reorder.handle(bot.id) { store.reorder(it) }, edit = { edit(bot) },
+ newSession = { confirmNewSession = bot }, delete = { confirmDelete = bot })
}
}
}
}
}
+ val restarting = confirmNewSession
+ CodyncDialog("Start a new session?", restarting != null, { confirmNewSession = null },
+ message = "The conversation stays here, but the agent starts with a fresh context.") {
+ listOf(DialogAction("New session") { restarting?.let { store.command("newSession", body("botId" to it.id)) } })
+ }
val deleting = confirmDelete
CodyncDialog("Delete ${deleting?.name ?: "bot"}?", deleting != null, { confirmDelete = null },
message = if (deleting?.kind == "group") "Its bots and their own chats stay." else "Files it changed on your computer stay as they are.") {
@@ -153,11 +160,12 @@ internal fun moved(roster: List<Bot>, id: String, offset: Int): List<String>? {
return roster.map(Bot::id).toMutableList().apply { this[at] = neighbor.id; this[at + offset] = id }
}
-@Composable private fun BotRowItem(bot: Bot, state: AppState, store: AppStore, drag: ContextDrag, edit: () -> Unit, delete: () -> Unit) {
+@Composable private fun BotRowItem(bot: Bot, state: AppState, store: AppStore, drag: ContextDrag, edit: () -> Unit, newSession: () -> Unit,
+ delete: () -> Unit) {
Box(Modifier.fillMaxWidth().contextActions(onClick = { store.openBot(bot.id) }, reorder = drag, preview = {
Box(Modifier.padding(horizontal = 8.dp)) { BotRow(bot, state) }
}) {
- listOf(
+ listOfNotNull(
MenuItem(if (bot.pinned) "Unpin" else "Pin", icon = if (bot.pinned) "pin.slash" else "pin") {
store.command("updateBot", buildJsonObject { put("id", bot.id); put("pinned", !bot.pinned) }, "roster:" + bot.id)
},
@@ -166,6 +174,8 @@ internal fun moved(roster: List<Bot>, id: String, offset: Int): List<String>? {
MenuItem("Mark as read", icon = "checkmark.message") {
store.command("markRead", buildJsonObject { put("botId", bot.id) }, "roster:" + bot.id)
},
+ // A group has no agent session of its own.
+ MenuItem("New session", icon = "arrow.counterclockwise", action = newSession).takeIf { bot.kind != "group" },
MenuItem("Hide from list", icon = "eye.slash") {
store.command("updateBot", buildJsonObject { put("id", bot.id); put("hidden", true) }, "roster:" + bot.id)
},
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotSettingsForm.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotSettingsForm.kt
new file mode 100644
index 00000000..0f4467f1
--- /dev/null
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotSettingsForm.kt
@@ -0,0 +1,217 @@
+package com.codync.android
+
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Box
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.padding
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.text.style.TextOverflow
+import androidx.compose.ui.unit.dp
+import com.codync.android.core.Bot
+import com.codync.android.core.BotDraft
+import com.codync.android.core.LinkState
+import com.codync.android.core.ScreenState
+import com.codync.android.design.*
+import com.kyant.shapes.RoundedRectangle
+import kotlinx.serialization.json.contentOrNull
+import kotlinx.serialization.json.jsonPrimitive
+
+/**
+ * Which settings a form shows (iOS `FormPart`): all of them (the editor), what changes often (instructions and the agent:
+ * the details sheet's Details page) or the rest (its Settings page).
+ */
+internal enum class FormPart { All, Often, Rarely }
+
+/** Bot settings, in sections in the Settings style (`CardSection`), with the pickers they open. */
+@Composable internal fun BotSettingsForm(state: AppState, store: AppStore, draft: BotDraft, change: (BotDraft) -> Unit, part: FormPart,
+ modifier: Modifier = Modifier) {
+ var folders by remember { mutableStateOf(false) }
+ var viewingSkill by remember { mutableStateOf<SkillRef?>(null) }
+ var addingFallback by remember { mutableStateOf(false) }
+ val online = state.actualConnection is LinkState.Ready
+ val bot = state.bots.firstOrNull { it.id == draft.id }
+ LaunchedEffect(online) { if (online) store.refreshPlugins() }
+ Column(modifier, verticalArrangement = Arrangement.spacedBy(30.dp)) {
+ when (part) {
+ FormPart.All -> {
+ Column(Modifier.fillMaxWidth(), horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.spacedBy(16.dp)) {
+ Box(Modifier.clip(RoundedRectangle(24.dp)).background(Palette.bubbleAgent).padding(18.dp)) {
+ CharacterAvatar(draft.avatarShape, draft.avatarColor, 96.dp)
+ }
+ AvatarPicker(draft.avatarShape, draft.avatarColor, { change(draft.copy(avatarShape = it)) }, { change(draft.copy(avatarColor = it)) })
+ }
+ CardSection("Profile") { nameRow(draft, change); instructionsRow(draft, change); createdByRow(state, bot) }
+ CardSection("Agent") {
+ fallbackBanner(state, store, bot); computerRow(state, online)
+ agentRows(state, store, draft, change, bot) { addingFallback = true }; placeRows(draft, change) { folders = true }
+ }
+ CardSection("Activity") { notifyRow(draft, change); computerUseRow(state, draft, change); manageTeamRow(state, draft, change) }
+ Plugins(state, draft, change) { viewingSkill = it }
+ draft.id?.let { MemoryCard(it, store) }
+ state.error?.let { Text(it, style = Type.footnote, color = Palette.danger) }
+ }
+ FormPart.Often -> {
+ CardSection("Instructions") { instructionsRow(draft, change) }
+ CardSection("Agent") {
+ fallbackBanner(state, store, bot)
+ agentRows(state, store, draft, change, bot) { addingFallback = true }
+ if (!online) row { OfflineNote() }
+ }
+ }
+ FormPart.Rarely -> {
+ CardSection("Profile") {
+ row { AvatarPicker(draft.avatarShape, draft.avatarColor, { change(draft.copy(avatarShape = it)) }, { change(draft.copy(avatarColor = it)) }) }
+ nameRow(draft, change); createdByRow(state, bot)
+ }
+ // The agent and its model are on the Details page; what's left is where it works.
+ CardSection("Workspace") { computerRow(state, online); placeRows(draft, change) { folders = true } }
+ CardSection("Activity") { notifyRow(draft, change); manageTeamRow(state, draft, change) }
+ Plugins(state, draft, change) { viewingSkill = it }
+ }
+ }
+ }
+ CodyncSheet(folders, { folders = false }) {
+ FolderPicker(draft.cwd.ifEmpty { state.hello?.get("home")?.jsonPrimitive?.contentOrNull }, online, store::listDirs) {
+ change(draft.copy(cwd = it)); folders = false
+ }
+ }
+ CodyncSheet(viewingSkill, { viewingSkill = null }) { SkillSheet(it, state, store) }
+ CodyncSheet(addingFallback, { addingFallback = false }) {
+ AddFallbackSheet(state, store, draft.backend, draft.fallbacks.orEmpty()) { change(draft.copy(fallbacks = draft.fallbacks.orEmpty() + it)); addingFallback = false }
+ }
+}
+
+@Composable private fun OfflineNote() = Text(tr("Reconnect to this computer to save settings."), style = Type.caption, color = Palette.warning)
+
+// A bot left unnamed at creation is named from its first conversations; rename it any time after.
+private fun CardRows.nameRow(draft: BotDraft, change: (BotDraft) -> Unit) =
+ row { Field("Name") { FieldBox(draft.name, { change(draft.copy(name = it)) }, "Name") } }
+
+private fun CardRows.instructionsRow(draft: BotDraft, change: (BotDraft) -> Unit) = row {
+ Field("Standing instructions", "Rules that always apply. Put task-specific requests in the chat instead.") {
+ FieldBox(draft.description, { change(draft.copy(description = it)) }, "e.g. Reviews PRs. Never pushes without asking.", 3, 8)
+ }
+}
+
+private fun CardRows.createdByRow(state: AppState, bot: Bot?) {
+ val creator = bot?.createdBy ?: return
+ row { ValueRow("Created by", "${state.bots.firstOrNull { it.id == creator }?.name ?: "A bot"} · ${RelativeTime.calendarDay(bot.createdAt)}") }
+}
+
+/** While the bot runs on a fallback: which, and Switch back. */
+private fun CardRows.fallbackBanner(state: AppState, store: AppStore, bot: Bot?) {
+ val step = bot?.agentStep ?: return
+ row { FallbackBanner(state, store, bot, step) }
+}
+
+private fun CardRows.computerRow(state: AppState, online: Boolean) = row {
+ Column(verticalArrangement = Arrangement.spacedBy(6.dp)) {
+ ValueRow("Computer", state.computers.firstOrNull()?.name ?: "Your computer")
+ if (!online) OfflineNote()
+ }
+}
+
+/** The agent, its model and the fallbacks that carry on for it. */
+private fun CardRows.agentRows(state: AppState, store: AppStore, draft: BotDraft, change: (BotDraft) -> Unit, bot: Bot?, addFallback: () -> Unit) {
+ row {
+ Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
+ val rest = bot?.restOf(draft.backend)
+ ValueRow("Agent", detail = rest?.line(RelativeTime.clock(rest.until))) {
+ ChoicePicker(draft.backend, agentChoices(state) + ("custom" to "Custom command"),
+ { if (it != draft.backend) change(draft.withAgent(it)) }, label = "Agent")
+ }
+ backends(state).firstOrNull { it.text("id") == draft.backend && !it.available }?.text("installHint")?.takeIf(String::isNotBlank)?.let {
+ Text(it, style = Type.caption, color = Palette.warning)
+ }
+ if (draft.backend == "custom") FieldBox(draft.command.orEmpty(), { change(draft.copy(command = it.ifEmpty { null })) },
+ "ACP command, e.g. my-agent --acp", style = Type.callout.monospaced, capitalize = false)
+ }
+ }
+ row {
+ AgentModelPicker(state, store::agentModels, draft.backend, draft.model, draft.modelOptions, draft.fastMode ?: false, bot,
+ { model, options -> change(draft.copy(model = model, modelOptions = options)) }, { change(draft.copy(fastMode = it)) })
+ }
+ // Only from a host that has fallbacks (its bots say).
+ val list = draft.fallbacks ?: return
+ row { FallbackList(state, draft.backend, list, bot, { change(draft.copy(fallbacks = it)) }, addFallback) }
+ row {
+ SwitchRow("Let the bot change its fallbacks", "It can set this list itself, for example when you ask it to.", draft.selfFallbacks != false,
+ { change(draft.copy(selfFallbacks = it)) })
+ }
+}
+
+/** Where the bot works and what it may do there without asking. */
+private fun CardRows.placeRows(draft: BotDraft, change: (BotDraft) -> Unit, chooseFolder: () -> Unit) {
+ row {
+ ValueRow("Workspace", detail = if (draft.cwd.isEmpty()) "This bot has its own space for files. It can work in other folders when you ask."
+ else "This project is the default starting folder. The bot can work elsewhere when you ask.") {
+ DropdownMenu({ listOf(
+ MenuItem("Personal workspace", selected = draft.cwd.isEmpty()) { change(draft.copy(cwd = "")) },
+ MenuItem("Choose project folder…", selected = draft.cwd.isNotEmpty(), action = chooseFolder),
+ ) }, label = "Workspace") {
+ Row(Modifier.outline().pill(androidx.compose.ui.graphics.Color.Transparent), verticalAlignment = Alignment.CenterVertically,
+ horizontalArrangement = Arrangement.spacedBy(6.dp)) {
+ Text(if (draft.cwd.isEmpty()) tr("Personal") else draft.cwd.trimEnd('/').substringAfterLast('/').ifEmpty { "/" },
+ style = Type.body, color = Palette.text, maxLines = 1, overflow = TextOverflow.Ellipsis)
+ Symbol("chevron.down", size = 13.dp, tint = Palette.secondary)
+ }
+ }
+ }
+ }
+ row {
+ ValueRow("Permissions", detail = if (draft.permission == "auto")
+ "Tool requests are approved automatically. Your agent's own settings (like Claude Code's permission rules) still apply."
+ else "You'll get an approval card and a notification whenever the agent asks.") {
+ ChoicePicker(draft.permission, listOf("ask" to "Ask me", "auto" to "Approve automatically"), { change(draft.copy(permission = it)) },
+ label = "Permissions")
+ }
+ }
+}
+
+private fun CardRows.notifyRow(draft: BotDraft, change: (BotDraft) -> Unit) =
+ row { SwitchRow("Notifications", "Get notified when this bot finishes or needs you", draft.notify != false, { change(draft.copy(notify = it)) }) }
+
+private fun CardRows.computerUseRow(state: AppState, draft: BotDraft, change: (BotDraft) -> Unit) {
+ val screen = state.screen ?: return
+ row { SwitchRow("Use the computer", computerUseDetail(screen), draft.computer, { change(draft.copy(computer = it)) }) }
+}
+
+/** What turning on "Use the computer" does on this computer, or what it needs first. */
+private fun computerUseDetail(screen: ScreenState): String = when {
+ !screen.controlReady -> "Let this bot use apps. On that computer, open Codync → Settings → Computer access to set up permissions first."
+ screen.enabled -> "Let this bot see the screen and use the mouse and keyboard. You can watch and take over from your phone."
+ screen.computerUse -> "Let this bot see the screen and use the mouse and keyboard."
+ else -> "Let this bot see the screen and use the mouse and keyboard. On that computer, open Codync → Settings → Computer access to set up permissions first."
+}
+
+// Only from a host that has it (its bots say).
+private fun CardRows.manageTeamRow(state: AppState, draft: BotDraft, change: (BotDraft) -> Unit) {
+ if (state.bots.none { it.manageTeam != null }) return
+ row {
+ SwitchRow("Manage the team", "Let this bot create bots and change any bot's setup, its own included. The bots it creates can too.",
+ draft.manageTeam, { change(draft.copy(manageTeam = it)) })
+ }
+}
+
+@Composable private fun Plugins(state: AppState, draft: BotDraft, change: (BotDraft) -> Unit, viewSkill: (SkillRef) -> Unit) {
+ val plugins = state.plugins
+ PluginToggles("Connectors", "No connectors yet. Add GitHub, Linear, Notion and more from Extensions.",
+ plugins?.connectors.orEmpty().map { Triple(it.id, it.name, it.command ?: it.url.orEmpty()) },
+ draft.connectors ?: plugins?.connectors.orEmpty().map { it.id }, { change(draft.copy(connectors = it)) })
+ PluginToggles("Skills", "No skills yet. Get some from Extensions, or write your own.",
+ plugins?.skills.orEmpty().map { Triple(it.id, it.name, it.description) }, draft.skills.orEmpty(), { change(draft.copy(skills = it)) }) { id ->
+ plugins?.skills?.firstOrNull { it.id == id }?.let { viewSkill(SkillRef(it.id, it.name, it.description)) }
+ }
+}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/BotTemplateView.kt b/apps/android/app/src/main/kotlin/com/codync/android/BotTemplateView.kt
new file mode 100644
index 00000000..0ab87858
--- /dev/null
+++ b/apps/android/app/src/main/kotlin/com/codync/android/BotTemplateView.kt
@@ -0,0 +1,54 @@
+package com.codync.android
+
+import android.content.ClipData
+import android.content.ClipboardManager
+import androidx.compose.foundation.background
+import androidx.compose.foundation.layout.Arrangement
+import androidx.compose.foundation.layout.Column
+import androidx.compose.foundation.layout.Row
+import androidx.compose.foundation.layout.fillMaxSize
+import androidx.compose.foundation.layout.fillMaxWidth
+import androidx.compose.foundation.layout.padding
+import androidx.compose.foundation.rememberScrollState
+import androidx.compose.foundation.text.selection.SelectionContainer
+import androidx.compose.foundation.verticalScroll
+import androidx.compose.material3.Text
+import androidx.compose.runtime.Composable
+import androidx.compose.runtime.getValue
+import androidx.compose.runtime.mutableStateOf
+import androidx.compose.runtime.remember
+import androidx.compose.runtime.setValue
+import androidx.compose.ui.Alignment
+import androidx.compose.ui.Modifier
+import androidx.compose.ui.draw.clip
+import androidx.compose.ui.platform.LocalContext
+import androidx.compose.ui.unit.dp
+import com.codync.android.core.BotDraft
+import com.codync.android.design.*
+import com.kyant.shapes.RoundedRectangle
+
+/** A portable settings snapshot (iOS `BotTemplateView`): the bot's setup to copy, without its conversation or this computer's fallbacks. */
+@Composable internal fun BotTemplateView(draft: BotDraft) {
+ val context = LocalContext.current
+ val template = remember(draft) { draft.template() }
+ var copied by remember { mutableStateOf(false) }
+ Column(Modifier.fillMaxSize().background(Palette.background)) {
+ ModalHeader("Create template")
+ Column(Modifier.weight(1f).padding(start = 24.dp, end = 24.dp, bottom = 24.dp), verticalArrangement = Arrangement.spacedBy(20.dp)) {
+ Text(draft.name, style = Type.subheadline, color = Palette.secondary)
+ Text(tr("Copy this bot’s settings to reuse as a template. Conversation history and conversation ID are excluded."),
+ style = Type.callout, color = Palette.secondary)
+ SelectionContainer(Modifier.weight(1f).fillMaxWidth().clip(RoundedRectangle(12.dp)).background(Palette.surface)
+ .verticalScroll(rememberScrollState()).padding(16.dp)) {
+ Text(template, style = Type.system(12f).monospaced, color = Palette.text)
+ }
+ Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
+ Text(tr("Includes workspace preferences and agent configuration."), Modifier.weight(1f), style = Type.caption, color = Palette.secondary)
+ PrimaryButton(if (copied) "Copied" else "Copy template") {
+ context.getSystemService(ClipboardManager::class.java).setPrimaryClip(ClipData.newPlainText(draft.name, template))
+ copied = true
+ }
+ }
+ }
+ }
+}
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
index 6a0ec1c8..a4cf1038 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt
@@ -259,7 +259,7 @@ internal val Entry.reactions: List<String> get() = (data["reactions"] as? JsonAr
Column(Modifier.fillMaxWidth().padding(end = 40.dp), verticalArrangement = Arrangement.spacedBy(4.dp)) {
// An artifact card or a message with files is that: the text is only the computer's fallback.
if (artifact != null) ArtifactCardView(artifact, entry.botId, state, store, Modifier.contextActions(reactions = reactionPick(entry, store),
- onClick = { focus.clearFocus(); openArtifact(OpenArtifact(artifact.id, artifact.title, entry.id)) }) { messageMenu(context, entry, reply, openTrace) })
+ onClick = { focus.clearFocus(); openArtifact(OpenArtifact(entry.botId, artifact.id, artifact.title, entry.id)) }) { messageMenu(context, entry, reply, openTrace) })
else if (files.isNotEmpty()) Column(Modifier.contextActions(reactions = reactionPick(entry, store), onClick = { focus.clearFocus() }) { messageMenu(context, entry, reply, openTrace) },
verticalArrangement = Arrangement.spacedBy(4.dp)) {
for (file in files) FileDownloadCard(entry, file, state, store)
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 db481cce..7356d4a3 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
@@ -61,24 +61,20 @@ import com.kyant.shapes.Capsule
/**
* One endless conversation with a bot or a group, as iOS `ThreadView`: only deliberate messages
- * show; tool calls and thinking live in "Full conversation". `editFallbacks` opens a bot's settings at its fallbacks.
+ * show; tool calls and thinking live in "Full conversation". `editGroup` opens a group's editor (its details).
*/
-@Composable fun ChatScreen(state: AppState, store: AppStore, edit: (Bot) -> Unit, editFallbacks: (Bot) -> Unit = edit) {
+@Composable fun ChatScreen(state: AppState, store: AppStore, editGroup: (Bot) -> Unit) {
val bot = state.bots.firstOrNull { it.id == state.selectedBot } ?: return
- key(state.contextId, state.generation, bot.id) { ThreadView(bot, state, store, edit, editFallbacks) }
+ key(state.contextId, state.generation, bot.id) { ThreadView(bot, state, store, editGroup) }
}
-@Composable private fun ThreadView(bot: Bot, state: AppState, store: AppStore, edit: (Bot) -> Unit, editFallbacks: (Bot) -> Unit) {
+@Composable private fun ThreadView(bot: Bot, state: AppState, store: AppStore, editGroup: (Bot) -> Unit) {
AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(AnalyticsScreen.Chat))
val context = LocalContext.current
- var confirmNewSession by remember { mutableStateOf(false) }
- var confirmDelete by remember { mutableStateOf(false) }
- var routines by remember { mutableStateOf(false) }
- // The routine the sheet opens on (a run's notice), or none for the list.
- var routineId by remember { mutableStateOf<String?>(null) }
- val openRoutine = { id: String? -> routineId = id; routines = true }
- var library by remember { mutableStateOf(false) }
- // The artifact open full size, over the chat and its Library.
+ // The bot's details sheet and the page it opens on.
+ var details by remember(bot.id) { mutableStateOf<DetailsRequest?>(null) }
+ val openRoutine = { id: String -> details = DetailsRequest(routineId = id) }
+ // The artifact open full size, over the chat and its details.
var viewing by remember(bot.id) { mutableStateOf<OpenArtifact?>(null) }
// The bot whose conversation with this one is open.
var peer by remember(bot.id) { mutableStateOf<String?>(null) }
@@ -101,7 +97,7 @@ import com.kyant.shapes.Capsule
// Down to just above the header's bottom; the bottom one stops under Jump to latest.
ScrollEdge(Edge.Top, top + 84.dp)
ScrollEdge(Edge.Bottom, with(density) { composerHeight.toDp() } + 4.dp, Modifier.align(Alignment.BottomCenter))
- ThreadHeader(bot, state, store, edit, { store.showTrace(true) }, { openRoutine(null) }, { library = true }, { confirmNewSession = true }, { confirmDelete = true })
+ ThreadHeader(bot, state, store) { if (bot.kind == "group") editGroup(bot) else details = DetailsRequest() }
// The call floats over the chat under the header, as on iOS; the chat stays readable and usable.
AnimatedVisibility(state.voice != null, Modifier.padding(top = top + 54.dp),
enter = fadeIn(Motion.fade()) + slideInVertically(Motion.layoutOffset) { -it }, exit = fadeOut(Motion.fade()) + slideOutVertically(Motion.layoutOffset) { -it }) {
@@ -121,17 +117,7 @@ import com.kyant.shapes.Capsule
}) {
Transcript(bot, chatState, store, connect, PaddingValues(start = 16.dp, end = 16.dp, top = top + 60.dp,
bottom = with(density) { composerHeight.toDp() } + 8.dp), indicatorTop = top + 50.dp, openRoutine = openRoutine, reply = reply,
- addFallback = editFallbacks, openArtifact = { viewing = it }) { peer = it }
- }
- CodyncDialog("Start a new session?", confirmNewSession, { confirmNewSession = false },
- message = "The conversation stays here, but the agent starts with a fresh context.") {
- listOf(DialogAction("New session") { store.command("newSession", body("botId" to bot.id)) })
- }
- CodyncDialog("Delete ${bot.name}?", confirmDelete, { confirmDelete = false },
- message = if (bot.kind == "group") "Its bots and their own chats stay." else "Files it changed on your computer stay as they are.") {
- listOf(DialogAction(if (bot.kind == "group") "Delete group chat" else "Delete bot and its conversation", destructive = true) {
- store.deleteBot(bot) { store.openBot(null) }
- })
+ addFallback = { details = DetailsRequest(botId = it.id) }, openArtifact = { viewing = it }) { peer = it }
}
CodyncDialog("Microphone access is off", micDenied, { micDenied = false },
message = "Allow the microphone in Android settings to talk to your bot.") {
@@ -141,50 +127,28 @@ import com.kyant.shapes.Capsule
AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(AnalyticsScreen.Trace))
TraceView(bot, state)
}
- CodyncSheet(routines, { routines = false }) {
- AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(AnalyticsScreen.Routines))
- RoutinesScreen(bot, state, store, routineId)
+ CodyncSheet(details, { details = null }) { request ->
+ val shown = state.bots.firstOrNull { it.id == (request.botId ?: bot.id) }
+ if (shown != null) BotDetailsView(shown, request, state, store) { viewing = it }
+ }
+ ArtifactLayer(viewing) { open ->
+ state.bots.firstOrNull { it.id == open.botId }?.let { owner -> ArtifactViewer(open, owner, state, store) { viewing = null } }
}
- CodyncSheet(library, { library = false }) { LibrarySheet(bot, state, store) { viewing = it } }
- ArtifactLayer(viewing) { ArtifactViewer(it, bot, state, store) { viewing = null } }
CodyncSheet(peer, { peer = null }) { BotConversationView(bot, it, state, store) }
CodyncSheet(app, { app = null; setupEntry = null }) { ComposioConnectSheet(it, state, store, setupEntry) { store.refreshPlugins() } }
CodyncSheet(connector, { connector = null; setupEntry = null }) { InstallConnectorSheet(it, state, store, setupEntry) }
}
-/** The glass back button, the title (its menu holds the bot's actions) and the connection under it. */
-@Composable private fun ThreadHeader(bot: Bot, state: AppState, store: AppStore, edit: (Bot) -> Unit, trace: () -> Unit,
- routines: () -> Unit, library: () -> Unit, newSession: () -> Unit, delete: () -> Unit) {
+/** The glass back button, the title (tapping it opens the bot's details) and the connection under it. */
+@Composable private fun ThreadHeader(bot: Bot, state: AppState, store: AppStore, openDetails: () -> Unit) {
Box(Modifier.fillMaxWidth().statusBarsPadding().padding(top = 6.dp).padding(horizontal = 16.dp).height(44.dp)) {
val (source, pressed) = rememberPress()
Box(Modifier.align(Alignment.CenterStart).size(44.dp).glass(Capsule(), pressed = pressed)
.then(Modifier.plainButton { store.openBot(null) }).semantics { contentDescription = "Back" }, contentAlignment = Alignment.Center) {
Symbol("chevron.left", size = 32.dp, tint = Palette.text)
}
- val host = state.computers.firstOrNull()?.name.orEmpty()
- val connected = tr(connectionLabel(state))
- DropdownMenu({ buildList {
- add(MenuItem("$host · $connected", enabled = false))
- add(MenuItem("Reconnect", icon = "arrow.clockwise") { store.reconnect() })
- add(MenuItem("Details", icon = "info.circle", divider = true) { edit(bot) })
- add(MenuItem("Full conversation", icon = "list.bullet.rectangle", action = trace))
- val pin = MenuItem(if (bot.pinned) "Unpin" else "Pin", icon = "pin") {
- store.command("updateBot", kotlinx.serialization.json.buildJsonObject {
- put("id", kotlinx.serialization.json.JsonPrimitive(bot.id)); put("pinned", kotlinx.serialization.json.JsonPrimitive(!bot.pinned))
- }, "roster:" + bot.id)
- }
- if (bot.kind == "group") {
- add(MenuItem("Edit group", icon = "person.2") { edit(bot) }); add(pin)
- add(MenuItem("Delete group", icon = "trash", destructive = true, divider = true, action = delete))
- } else {
- add(MenuItem("Edit profile", icon = "pencil") { edit(bot) }); add(pin)
- add(MenuItem("Routines", icon = "clock.arrow.circlepath", action = routines))
- // An older host has no Library.
- if (hasLibrary(state.hello?.text("version"))) add(MenuItem("Library", icon = "books.vertical", action = library))
- add(MenuItem("New session", icon = "arrow.counterclockwise", action = newSession))
- add(MenuItem("Delete bot", icon = "trash", destructive = true, divider = true, action = delete))
- }
- } }, Modifier.align(Alignment.Center), label = "${bot.name} actions") {
+ val label = tr("{name}, view details").replace("{name}", bot.name)
+ Box(Modifier.align(Alignment.Center).plainButton(action = openDetails).semantics { contentDescription = label }) {
Column(horizontalAlignment = Alignment.CenterHorizontally) {
Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(7.dp)) {
BotAvatar(bot, state.bots, 22.dp)
@@ -236,7 +200,7 @@ import com.kyant.shapes.Capsule
val items = chatItems(entries, pending)
val working = bot.isWorking(bot.id) && state.connection is LinkState.Ready
val more = bot.id !in state.historyComplete
- // Pull to refresh reconnects, like Reconnect in the title menu, until the link is back.
+ // Pull to refresh reconnects, like Reconnect in the roster's computer menu, until the link is back.
ConversationList(items.lastOrNull()?.id, entries.lastOrNull()?.rev, working, padding, store::refreshConnection, indicatorTop) {
if (more) item("earlier") {
Box(Modifier.fillMaxWidth().padding(vertical = 14.dp).clearAndSetSemantics { contentDescription = "Loading earlier messages" },
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/CodyncApp.kt b/apps/android/app/src/main/kotlin/com/codync/android/CodyncApp.kt
index a34f0928..ab649aef 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/CodyncApp.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/CodyncApp.kt
@@ -31,9 +31,6 @@ import com.codync.android.design.*
private enum class Root { Loading, Welcome, Pairing, Tabs }
-/** A bot's settings to open, at its fallbacks from a chat's "Add a fallback" (iOS `DetailsRequest`). */
-private data class BotEditRequest(val draft: BotDraft, val atFallbacks: Boolean = false)
-
/** The app's root, as iOS `RootView`: the welcome and pairing until set up, then the tabs, with every sheet on top. */
@Composable fun CodyncApp(state: AppState, store: AppStore) {
var welcomed by rememberSaveable { mutableStateOf(false) }
@@ -46,7 +43,7 @@ private data class BotEditRequest(val draft: BotDraft, val atFallbacks: Boolean
var creatingBot by rememberSaveable { mutableStateOf(false) }
var creatingGroup by rememberSaveable { mutableStateOf(false) }
var access by remember { mutableStateOf<CloudComputer?>(null) }
- var editor by remember { mutableStateOf<BotEditRequest?>(null) }
+ var editor by remember { mutableStateOf<BotDraft?>(null) }
var groupEditor by remember { mutableStateOf<GroupDraft?>(null) }
var handledNavigation by rememberSaveable { mutableIntStateOf(state.navigationRequest) }
var handledGeneration by rememberSaveable { mutableIntStateOf(state.generation) }
@@ -76,7 +73,7 @@ private data class BotEditRequest(val draft: BotDraft, val atFallbacks: Boolean
else -> Root.Tabs
}
BackHandler(root == Root.Pairing && !signedIn) { welcomed = false }
- val edit = { bot: Bot -> if (bot.kind == "group") groupEditor = GroupDraft.from(bot) else editor = BotEditRequest(BotDraft.from(bot)) }
+ val edit = { bot: Bot -> if (bot.kind == "group") groupEditor = GroupDraft.from(bot) else editor = BotDraft.from(bot) }
val openMarketplace = { showAccount = false; accountSettings = false; showComputers = false; showMarketplace = true }
Box(Modifier.fillMaxSize().background(Palette.background)) {
AnimatedContent(root, transitionSpec = {
@@ -97,7 +94,7 @@ private data class BotEditRequest(val draft: BotDraft, val atFallbacks: Boolean
Root.Tabs -> MainTabs(state, store, account = { showAccount = true }, manage = { showComputers = true }, usage = { showUsage = true },
newBot = { creatingBot = true }, newGroup = { creatingGroup = true },
edit = edit) {
- ChatScreen(state, store, edit) { bot -> editor = BotEditRequest(BotDraft.from(bot), atFallbacks = true) }
+ ChatScreen(state, store, edit)
}
}
}
@@ -130,14 +127,14 @@ private data class BotEditRequest(val draft: BotDraft, val atFallbacks: Boolean
}
CodyncSheet(creatingBot && !state.loading, { creatingBot = false }) { key(state.contextId, state.generation) { NewBotView(state, store) } }
CodyncSheet(creatingGroup && !state.loading, { creatingGroup = false }) { key(state.contextId, state.generation) { NewGroupView(state, store) } }
- // A bot or group's editor is its details.
+ // A group's editor is its details (a chat's title and the roster open it); a bot's (the roster's Edit profile) is all its settings.
CodyncSheet(groupEditor.takeIf { !state.loading }, { groupEditor = null }) { draft ->
AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(AnalyticsScreen.BotDetails))
key(state.contextId, state.generation, draft.id) { GroupEditor(state, draft, store) }
}
- CodyncSheet(editor.takeIf { !state.loading }, { editor = null }) { request ->
+ CodyncSheet(editor.takeIf { !state.loading }, { editor = null }) { draft ->
AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(AnalyticsScreen.BotDetails))
- key(state.contextId, state.generation, request.draft.id) { BotEditor(state, request.draft, store, request.atFallbacks) }
+ key(state.contextId, state.generation, draft.id) { BotEditor(state, draft, store) }
}
// The remote screen opens over the app once its sheets have slid away.
LaunchedEffect(state.screenRequest) { if (state.screenRequest != null) { closeAll(); showUsage = false } }
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/EditorControls.kt b/apps/android/app/src/main/kotlin/com/codync/android/EditorControls.kt
index 49449a1e..afb105d0 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/EditorControls.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/EditorControls.kt
@@ -46,9 +46,10 @@ import com.kyant.shapes.RoundedRectangle
}
}
-/** A rounded input box (`fieldBox`): a plain field on the ground color. */
+/** A rounded input box (`fieldBox`): a plain field on the ground color, or on the card color in an outlined card. */
@Composable internal fun FieldBox(text: String, onChange: (String) -> Unit, prompt: String, minLines: Int = 1, maxLines: Int = 1,
- style: TextStyle = Type.body, fill: Color = Palette.background, capitalize: Boolean = true, imeAction: ImeAction = ImeAction.Default,
+ style: TextStyle = Type.body, fill: Color = if (LocalCardStyle.current == CardStyle.Outlined) Palette.surface else Palette.background,
+ capitalize: Boolean = true, imeAction: ImeAction = ImeAction.Default,
actions: KeyboardActions = KeyboardActions.Default) {
Box(Modifier.fillMaxWidth().clip(RoundedRectangle(12.dp)).background(fill).padding(horizontal = 14.dp, vertical = 11.dp)) {
PlainTextField(text, onChange, Modifier.fillMaxWidth(), prompt, singleLine = maxLines == 1, style = style, minLines = minLines,
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/LibrarySheet.kt b/apps/android/app/src/main/kotlin/com/codync/android/LibraryView.kt
similarity index 84%
rename from apps/android/app/src/main/kotlin/com/codync/android/LibrarySheet.kt
rename to apps/android/app/src/main/kotlin/com/codync/android/LibraryView.kt
index f1e77212..470e30ce 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/LibrarySheet.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/LibraryView.kt
@@ -1,17 +1,13 @@
package com.codync.android
-import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
-import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
-import androidx.compose.foundation.rememberScrollState
-import androidx.compose.foundation.verticalScroll
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
@@ -23,7 +19,6 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.layout.ContentScale
-import androidx.compose.ui.semantics.heading
import androidx.compose.ui.semantics.semantics
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.text.style.TextOverflow
@@ -38,28 +33,26 @@ import com.codync.android.design.*
import com.kyant.shapes.RoundedRectangle
/**
- * A chat's Library, in a sheet over it (docs/features/artifacts.md): the artifacts its bot published and the files shared in
- * it, newest first by day. Each opens as it does in the chat.
+ * A chat's Library, on its bot's details (docs/features/artifacts.md): the artifacts its bot published and the files shared
+ * in it, newest first by day. Each opens as it does in the chat.
*/
-@Composable internal fun LibrarySheet(bot: Bot, state: AppState, store: AppStore, open: (OpenArtifact) -> Unit) {
+@Composable internal fun LibraryView(bot: Bot, state: AppState, store: AppStore, open: (OpenArtifact) -> Unit) {
val online = state.actualConnection is LinkState.Ready
AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(AnalyticsScreen.Library))
LaunchedEffect(bot.id, online) { if (online) store.loadLibrary(bot.id) }
val items = state.artifacts.library(bot.id, state.library[bot.id].orEmpty())
var renaming by remember { mutableStateOf<Artifact?>(null) }
var image by remember { mutableStateOf<Attachment?>(null) }
- Column(Modifier.fillMaxSize().background(Palette.background)) {
- ModalHeader("Library")
+ Column(Modifier.fillMaxWidth()) {
when {
- items.isNotEmpty() -> Column(Modifier.verticalScroll(rememberScrollState()).padding(start = 20.dp, end = 20.dp, bottom = 20.dp),
- verticalArrangement = Arrangement.spacedBy(16.dp)) {
+ items.isNotEmpty() -> Column(verticalArrangement = Arrangement.spacedBy(16.dp)) {
for ((period, members) in LibraryPeriod.sections(items)) Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
- Text(tr(period.title), Modifier.padding(start = 2.dp).semantics { heading() }, style = Type.system(15f).semibold, color = Palette.text)
- Column(Modifier.fillMaxWidth().clip(RoundedRectangle(16.dp)).background(Palette.surface)) {
+ SectionHeading(period.title, Modifier.padding(start = 2.dp))
+ Column(Modifier.fillMaxWidth().cardGroup()) {
for ((index, item) in members.withIndex()) {
if (index > 0) Hairline(Modifier.padding(horizontal = 16.dp))
when (item) {
- is LibraryItem.ArtifactItem -> ArtifactRow(item.artifact, { open(OpenArtifact(item.artifact.id, item.artifact.title, item.artifact.entryId)) },
+ is LibraryItem.ArtifactItem -> ArtifactRow(item.artifact, { open(OpenArtifact(bot.id, item.artifact.id, item.artifact.title, item.artifact.entryId)) },
{ renaming = item.artifact }) { store.shareArtifact(bot.id, item.artifact.id, item.artifact.title) }
is LibraryItem.FileItem -> FileRow(item, bot.id, state, store)
is LibraryItem.AttachmentItem -> AttachmentRow(item.file, bot.id, state, store) { image = item.file }
diff --git a/apps/android/app/src/main/kotlin/com/codync/android/RoutinesScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/RoutinesView.kt
similarity index 94%
rename from apps/android/app/src/main/kotlin/com/codync/android/RoutinesScreen.kt
rename to apps/android/app/src/main/kotlin/com/codync/android/RoutinesView.kt
index 6e82caa5..f42c647a 100644
--- a/apps/android/app/src/main/kotlin/com/codync/android/RoutinesScreen.kt
+++ b/apps/android/app/src/main/kotlin/com/codync/android/RoutinesView.kt
@@ -62,33 +62,29 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
/**
- * A bot's routines, in a sheet over its chat (iOS `RoutinesView`); a row opens its editor.
- * `initialId`: open on that routine's editor (a run's notice in the chat was tapped).
+ * A bot's routines, on its details' Details page (iOS `RoutinesView`); a row opens its editor.
+ * `initialId`: open on that routine's editor (a run's notice in the chat was tapped). `leave` goes back to the chat once a
+ * request to the bot is in the composer.
*/
-@Composable fun RoutinesScreen(bot: Bot, state: AppState, store: AppStore, initialId: String?) {
- val dismiss = LocalDismissModal.current
+@Composable fun RoutinesView(bot: Bot, state: AppState, store: AppStore, initialId: String?, leave: () -> Unit) {
val online = state.actualConnection is LinkState.Ready
val listing = state.routines[bot.id]
val busy = "routines:${bot.id}" in state.busy
// The open editor: on a routine (its id), or "" setting up a new one.
var editing by remember(bot.id) { mutableStateOf(initialId) }
LaunchedEffect(bot.id, online) { if (online) while (true) { store.loadRoutines(bot.id); delay(3_000) } }
- Column(Modifier.fillMaxSize().background(Palette.background).verticalScroll(rememberScrollState()).padding(20.dp),
- verticalArrangement = Arrangement.spacedBy(16.dp)) {
+ Column(verticalArrangement = Arrangement.spacedBy(10.dp)) {
Row(verticalAlignment = Alignment.CenterVertically) {
- Text("Routines", Modifier.weight(1f).padding(start = 2.dp), style = Type.system(13f).semibold, color = Palette.text)
- IconButton("Ask the bot for a routine", "text.bubble", enabled = online) { store.editDraft(bot.id, "I want a routine that "); dismiss() }
+ SectionHeading("Routines", Modifier.weight(1f).padding(start = 2.dp))
+ IconButton("Ask the bot for a routine", "text.bubble", enabled = online) { store.editDraft(bot.id, "I want a routine that "); leave() }
IconButton("Set up a routine", "plus", enabled = online) { editing = "" }
- IconButton("Close routines", "xmark", action = dismiss)
}
val routines = listing?.routines.orEmpty()
if (routines.isEmpty()) Text(tr(if (listing != null) "No routines yet. Ask the bot for one, or set it up yourself with +." else "Loading routines…"),
- Modifier.fillMaxWidth().clip(RoundedRectangle(16.dp)).background(Palette.surface).padding(14.dp),
- style = Type.system(12f).copy(lineHeight = Type.system(12f).lineHeight * 1.25f), color = Palette.secondary)
- else Column(Modifier.fillMaxWidth().clip(RoundedRectangle(16.dp)).background(Palette.surface).padding(horizontal = 14.dp)) {
- for ((index, routine) in routines.withIndex()) {
- if (index > 0) Hairline()
- Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
+ Modifier.outlinedCard(vertical = 14.dp), style = Type.system(12f).copy(lineHeight = Type.system(12f).lineHeight * 1.25f), color = Palette.secondary)
+ else Column(verticalArrangement = Arrangement.spacedBy(8.dp)) {
+ for (routine in routines) {
+ Row(Modifier.outlinedCard(vertical = 0.dp), verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) {
Column(Modifier.weight(1f).plainButton { editing = routine.id }.padding(vertical = 10.dp), verticalArrangement = Arrangement.spacedBy(3.dp)) {
Text(routine.name, style = Type.system(13f), color = Palette.text)
Text(listing?.summary(routine).orEmpty(), style = Type.caption, color = if (routine.lastError == null) Palette.secondary else Palette.danger)
@@ -101,6 +97,8 @@ import kotlinx.coroutines.launch
}
// Item-based, so the editor always gets the routine it was opened on; it opens once that routine is listed.
CodyncSheet(editing?.takeIf { listing.canEdit(it) }, { editing = null }) { id ->
+ // The list is part of the bot's details; a routine's editor is the routines screen, as on the iPhone.
+ AnalyticsOnAppear(AnalyticsEvent.ScreenViewed(AnalyticsScreen.Routines))
RoutineEditor(bot.id, listing?.routines?.firstOrNull { it.id == id }, state, store) { saved ->
// A new webhook routine stays open: its URL and key exist only now.
editing = if (id.isEmpty() && saved?.hasWebhook == true) saved.id else null
diff --git a/apps/android/core/src/main/kotlin/com/codync/android/core/BotDraft.kt b/apps/android/core/src/main/kotlin/com/codync/android/core/BotDraft.kt
index 15fe5c4c..a1421c4b 100644
--- a/apps/android/core/src/main/kotlin/com/codync/android/core/BotDraft.kt
+++ b/apps/android/core/src/main/kotlin/com/codync/android/core/BotDraft.kt
@@ -1,6 +1,7 @@
package com.codync.android.core
import kotlinx.serialization.Serializable
+import kotlinx.serialization.json.Json
import kotlinx.serialization.json.JsonNull
import kotlinx.serialization.json.JsonObject
import kotlinx.serialization.json.decodeFromJsonElement
@@ -44,8 +45,9 @@ data class BotDraft(
// switch or fallback list must stay out (the host's booleans and lists don't take null).
return JsonObject(WireJson.encodeToJsonElement(normalized).jsonObject.filterNot { (key, value) -> value == JsonNull && key in UNSET })
}
- /** A template carries the bot's setup, not its fallbacks (they name this computer's agents). */
- fun template(): String = JsonObject(body().filterKeys { it !in setOf("id", "pinned", "hidden", "fallbacks", "selfFallbacks") }).toString()
+ /** A template carries the bot's setup, not its fallbacks (they name this computer's agents): readable JSON, keys sorted as on iOS. */
+ fun template(): String = TemplateJson.encodeToString(JsonObject.serializer(),
+ JsonObject(body().filterKeys { it !in setOf("id", "pinned", "hidden", "fallbacks", "selfFallbacks") }.toSortedMap()))
/**
* This draft with each field it hasn't changed from [base] (the bot as the form loaded it) taken from [fresh] (the
@@ -61,6 +63,7 @@ data class BotDraft(
/** A new bot starts with a random face, like iOS. */
val AVATAR_COLORS = listOf("black", "brown", "red", "orange", "yellow", "green", "cyan", "blue", "violet", "magenta", "gray")
private val UNSET = setOf("fastMode", "notify", "fallbacks", "selfFallbacks")
+ private val TemplateJson = Json { prettyPrint = true; prettyPrintIndent = " " }
val AVATAR_SHAPES = listOf("blob", "pebble", "squircle", "tablet", "wedge", "hex", "cloud", "teardrop")
fun from(bot: Bot): BotDraft = BotDraft(bot.id, bot.name, bot.description, bot.avatarColor, bot.avatarShape,
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 64104d6c..d3b0b886 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
@@ -18,6 +18,7 @@ import androidx.compose.foundation.Canvas
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.clickable
+import androidx.compose.foundation.horizontalScroll
import androidx.compose.ui.layout.Layout
import androidx.compose.ui.unit.Constraints
import androidx.compose.foundation.layout.Arrangement
@@ -51,6 +52,7 @@ import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.runtime.getValue
+import androidx.compose.runtime.staticCompositionLocalOf
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
@@ -178,6 +180,19 @@ import com.kyant.shapes.RoundedRectangle
}
}
+/** Tabs as text, the chosen one on a filled pill (a details sheet's pages): `TabChoice`. */
+@Composable fun <T> TabChoice(selection: T, options: List<Pair<T, String>>, select: (T) -> Unit, modifier: Modifier = Modifier) {
+ // Four long labels (German) on a narrow phone scroll rather than cut a label short.
+ Row(modifier.horizontalScroll(rememberScrollState()), horizontalArrangement = Arrangement.spacedBy(2.dp)) {
+ for ((id, label) in options) {
+ val on = id == selection
+ val fill by animateColorAsState(if (on) Palette.bubbleAgent else Color.Transparent, Motion.morph(), label = "Tab")
+ Text(tr(label), Modifier.clip(Capsule()).background(fill).selectable(on, role = Role.Tab) { select(id) }
+ .padding(horizontal = 12.dp, vertical = 6.dp), style = Type.subheadline, color = if (on) Palette.text else Palette.secondary, maxLines = 1)
+ }
+ }
+}
+
/** One choice per row with a checkmark: the replacement for `.inline` pickers. */
@Composable fun <T> ChoiceList(selection: T, options: List<Triple<T, String, String?>>, select: (T) -> Unit, modifier: Modifier = Modifier) {
Column(modifier, verticalArrangement = Arrangement.spacedBy(14.dp)) {
@@ -234,10 +249,10 @@ class CardRows internal constructor() {
Column(modifier.fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(10.dp)) {
if (title != null) Row(Modifier.padding(start = 2.dp), verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(8.dp)) {
- Text(tr(title), Modifier.weight(1f).semantics { heading() }, style = Type.system(15f).semibold, color = Palette.text)
+ SectionHeading(title, Modifier.weight(1f))
accessory()
}
- if (list.isNotEmpty()) Column(Modifier.fillMaxWidth().clip(RoundedRectangle(16.dp)).background(Palette.surface)) {
+ if (list.isNotEmpty()) Column(Modifier.fillMaxWidth().cardGroup()) {
for ((index, row) in list.withIndex()) {
Box(Modifier.fillMaxWidth().padding(horizontal = 16.dp, vertical = 14.dp).heightIn(min = 32.dp),
contentAlignment = Alignment.CenterStart) {
@@ -251,6 +266,25 @@ class CardRows internal constructor() {
}
}
+/** How `CardSection` draws its group: filled (Settings style), or outlined on the page like Grok Bot's routine cards (the bot details sheet). */
+enum class CardStyle { Filled, Outlined }
+
+val LocalCardStyle = staticCompositionLocalOf { CardStyle.Filled }
+
+/** A `CardSection` heading: small, bold, a heading to TalkBack. */
+@Composable fun SectionHeading(title: String, modifier: Modifier = Modifier) =
+ Text(tr(title), modifier.semantics { heading() }, style = Type.system(15f).semibold, color = Palette.text)
+
+/** A `CardSection`'s group, drawn in the [LocalCardStyle]. */
+@Composable fun Modifier.cardGroup(): Modifier =
+ if (LocalCardStyle.current == CardStyle.Outlined) cardOutline() else clip(RoundedRectangle(16.dp)).background(Palette.surface)
+
+/** Grok Bot's list cards (routines): an outline on the page, no fill. */
+@Composable fun Modifier.outlinedCard(vertical: Dp = 12.dp): Modifier =
+ fillMaxWidth().cardOutline().padding(horizontal = 14.dp, vertical = vertical)
+
+@Composable private fun Modifier.cardOutline(): Modifier = border(1.dp, Palette.border, RoundedRectangle(14.dp))
+
/** A 1-pixel separator line in the border color. */
@Composable fun Hairline(modifier: Modifier = Modifier) {
val px = with(LocalDensity.current) { 1f.toDp() }
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
index b3b01508..7528d556 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json
@@ -1190,5 +1190,6 @@
"More actions": "Weitere Aktionen",
"Library": "Mediathek",
"Library is empty": "Die Mediathek ist leer",
- "Artifacts {name} makes and files shared in this chat show here.": "Artefakte von {name} und in diesem Chat geteilte Dateien erscheinen hier."
+ "Artifacts {name} makes and files shared in this chat show here.": "Artefakte von {name} und in diesem Chat geteilte Dateien erscheinen hier.",
+ "{name}, view details": "{name}, Details anzeigen"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
index 9477335b..5353c9e7 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json
@@ -1190,5 +1190,6 @@
"More actions": "Más acciones",
"Library": "Biblioteca",
"Library is empty": "La biblioteca está vacía",
- "Artifacts {name} makes and files shared in this chat show here.": "Los artefactos que crea {name} y los archivos compartidos en este chat aparecen aquí."
+ "Artifacts {name} makes and files shared in this chat show here.": "Los artefactos que crea {name} y los archivos compartidos en este chat aparecen aquí.",
+ "{name}, view details": "{name}, ver detalles"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
index c1aa813b..dc41b1d5 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json
@@ -1190,5 +1190,6 @@
"More actions": "Autres actions",
"Library": "Bibliothèque",
"Library is empty": "La bibliothèque est vide",
- "Artifacts {name} makes and files shared in this chat show here.": "Les artefacts créés par {name} et les fichiers partagés dans cette discussion apparaissent ici."
+ "Artifacts {name} makes and files shared in this chat show here.": "Les artefacts créés par {name} et les fichiers partagés dans cette discussion apparaissent ici.",
+ "{name}, view details": "{name}, voir les détails"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
index 88c3944c..b7edd8b6 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json
@@ -1190,5 +1190,6 @@
"More actions": "その他の操作",
"Library": "ライブラリ",
"Library is empty": "ライブラリは空です",
- "Artifacts {name} makes and files shared in this chat show here.": "{name} が作ったアーティファクトと、このチャットで共有したファイルがここに表示されます。"
+ "Artifacts {name} makes and files shared in this chat show here.": "{name} が作ったアーティファクトと、このチャットで共有したファイルがここに表示されます。",
+ "{name}, view details": "{name}、詳細を表示"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
index 14876e13..68e1f1af 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json
@@ -1190,5 +1190,6 @@
"More actions": "작업 더 보기",
"Library": "라이브러리",
"Library is empty": "라이브러리가 비어 있습니다",
- "Artifacts {name} makes and files shared in this chat show here.": "{name}이(가) 만든 아티팩트와 이 채팅에서 공유한 파일이 여기에 표시됩니다."
+ "Artifacts {name} makes and files shared in this chat show here.": "{name}이(가) 만든 아티팩트와 이 채팅에서 공유한 파일이 여기에 표시됩니다.",
+ "{name}, view details": "{name}, 세부 정보 보기"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
index 28dfe7b4..efde504e 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json
@@ -1190,5 +1190,6 @@
"More actions": "更多操作",
"Library": "资料库",
"Library is empty": "资料库还是空的",
- "Artifacts {name} makes and files shared in this chat show here.": "{name} 做的 Artifact,和这个对话里分享的文件,都会出现在这里。"
+ "Artifacts {name} makes and files shared in this chat show here.": "{name} 做的 Artifact,和这个对话里分享的文件,都会出现在这里。",
+ "{name}, view details": "{name},查看详情"
}
diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
index 2ed29e4f..b7a8d6f5 100644
--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json
@@ -1190,5 +1190,6 @@
"More actions": "更多操作",
"Library": "資料庫",
"Library is empty": "資料庫還是空的",
- "Artifacts {name} makes and files shared in this chat show here.": "{name} 做的 Artifact,和這個對話裡分享的檔案,都會出現在這裡。"
+ "Artifacts {name} makes and files shared in this chat show here.": "{name} 做的 Artifact,和這個對話裡分享的檔案,都會出現在這裡。",
+ "{name}, view details": "{name},檢視詳情"
}
diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
index e8341e09..f8552e64 100644
--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift
@@ -10,7 +10,6 @@ public struct ThreadView: View {
public init(botId: String) { self.botId = botId }
@Environment(BotStore.self) var model
- @Environment(\.dismiss) var dismiss
@State var showTrace = false
/// The message the composer's next send quotes.
@State var replyingTo: Entry?
@@ -18,8 +17,6 @@ public struct ThreadView: View {
@State var openArtifact: ArtifactTarget?
@State var editingGroup = false
@State var details: DetailsRequest?
- @State var confirmNewSession = false
- @State var confirmDelete: Bot?
@State var calling = false
@State var callSpeaking = false
@State var interruptCall: (() -> Void)?
@@ -86,11 +83,6 @@ public struct ThreadView: View {
.codyncSheet(isPresented: $editingGroup) {
if let bot { GroupEditorView(group: bot) }
}
- .codyncDialog("Start a new session?", isPresented: $confirmNewSession,
- message: "The conversation stays here, but the agent starts with a fresh context.") {
- [DialogAction("New session") { model.newSession(botId) }]
- }
- .deleteBotConfirmation($confirmDelete) { dismiss() }
}
/// Open Live Mode from Shortcuts: closes whatever covers the chat, then starts the call.
@@ -100,8 +92,6 @@ public struct ThreadView: View {
openArtifact = nil
editingGroup = false
details = nil
- confirmNewSession = false
- confirmDelete = nil
if model.fileDownloads.export?.botId == botId { model.fileDownloads.dismissExport() }
withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { calling = true }
}
@@ -195,36 +185,11 @@ public struct ThreadView: View {
}
}
- func openRoutine(_ id: String?) {
+ func openRoutine(_ id: String) {
withAnimation(Motion.reduced(Motion.layout, reduceMotion)) {
details = DetailsRequest(tab: .details, routineId: id)
}
}
-
- var menuItems: [MenuItem] {
- var items = [MenuItem("Full conversation", icon: "list.bullet.rectangle") { showTrace = true }]
- if let bot, bot.isGroup {
- items.append(MenuItem("Edit group", icon: "person.2") { editingGroup = true })
- items.append(MenuItem(bot.pinned ? "Unpin" : "Pin", icon: "pin") { model.setPinned(bot, !bot.pinned) })
- items.append(MenuItem("Delete group", icon: "trash", destructive: true, divider: true) { confirmDelete = bot })
- return items
- }
- if let bot {
- items.append(MenuItem("Settings", icon: "gearshape") { openSettings() })
- items.append(MenuItem(bot.pinned ? "Unpin" : "Pin", icon: "pin") { model.setPinned(bot, !bot.pinned) })
- }
- items.append(MenuItem("Routines", icon: "clock.arrow.circlepath") {
- openRoutine(nil)
- })
- if model.hasLibrary {
- items.append(MenuItem("Library", icon: "books.vertical") {
- withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { details = DetailsRequest(tab: .library) }
- })
- }
- items.append(MenuItem("New session", icon: "arrow.counterclockwise") { confirmNewSession = true })
- items.append(MenuItem("Delete bot", icon: "trash", destructive: true, divider: true) { confirmDelete = bot })
- return items
- }
}
// MARK: - Chat model
@@ -403,7 +368,7 @@ extension ThreadView {
}
}
- /// The system navigation bar: the title pill holds the bot's actions; the corner is the computer.
+ /// The system navigation bar: the title opens the bot's details; the corner is the computer.
func chrome(_ content: some View) -> some View {
content
.navigationBarTitleDisplayMode(.inline)
@@ -421,23 +386,10 @@ extension ThreadView {
}
}
+ /// Like Grok Bot: the bot at the top opens its details (a group's editor for a group).
var header: some View {
- // Like Grok Bot: the title pill holds the bot's actions; the corner is the computer.
- Menu {
- Text("\(model.hostName) · \(L10n.tr(model.connectionLabel))")
- Button(L10n.tr("Reconnect"), systemImage: "arrow.clockwise") { model.restartStream() }
- Divider()
- Button(L10n.tr("Details"), systemImage: "info.circle", action: openDetails)
- ForEach(menuItems) { item in
- if item.divider { Divider() }
- Button(role: item.destructive ? .destructive : nil, action: item.action) {
- if let icon = item.icon { Label(L10n.tr(item.title), systemImage: icon) } else { Text(L10n.tr(item.title)) }
- }
- }
- } label: {
- title
- }
- .accessibilityLabel("\(bot?.name ?? "Conversation") actions")
+ Button(action: openDetails) { title }
+ .accessibilityLabel(L10n.tr("{name}, view details").replacingOccurrences(of: "{name}", with: bot?.name ?? ""))
}
private func openDetails() {
@@ -452,8 +404,4 @@ extension ThreadView {
}
.symbolEffect(.pulse, options: .repeating, isActive: operating)
}
-
- func openSettings() {
- details = DetailsRequest(tab: .settings)
- }
}
diff --git a/apps/ios/Views/BotListView.swift b/apps/ios/Views/BotListView.swift
index d3698a6c..2b4135b9 100644
--- a/apps/ios/Views/BotListView.swift
+++ b/apps/ios/Views/BotListView.swift
@@ -13,6 +13,8 @@ struct BotListView: View {
@State private var editing: EditTarget?
@State private var editingGroup: GroupTarget?
@State private var confirmDelete: RosterItem?
+ /// A bot whose agent starts over with a fresh context, once confirmed.
+ @State private var confirmNewSession: RosterItem?
/// The row that's lifted (a `RosterLine` id): a bot to drag or for its menu, or a computer's heading.
@State private var lifted: String?
@Environment(\.accessibilityReduceMotion) private var reduceMotion
@@ -180,6 +182,14 @@ struct BotListView: View {
if let item { accounts.store(for: item.ref.computerId)?.delete(item.bot) }
}]
}
+ .codyncDialog("Start a new session?",
+ isPresented: Binding(get: { confirmNewSession != nil }, set: { if !$0 { confirmNewSession = nil } }),
+ message: "The conversation stays here, but the agent starts with a fresh context.") {
+ let item = confirmNewSession
+ return [DialogAction("New session") {
+ if let item { accounts.store(for: item.ref.computerId)?.newSession(item.bot.id) }
+ }]
+ }
}
/// A row the system's reordering dropped. A heading moves its computer and its bots (an order
@@ -245,8 +255,11 @@ struct BotListView: View {
Button(L10n.tr("Move down")) { withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { store.move(bot.id, by: 1) } }
}
.contextActions {
- [
- MenuItem(bot.pinned ? "Unpin" : "Pin", icon: bot.pinned ? "pin.slash" : "pin") { store.setPinned(bot, !bot.pinned) },
+ var items = [MenuItem(bot.pinned ? "Unpin" : "Pin", icon: bot.pinned ? "pin.slash" : "pin") { store.setPinned(bot, !bot.pinned) }]
+ if !bot.isGroup {
+ items.append(MenuItem("New session", icon: "arrow.counterclockwise") { confirmNewSession = item })
+ }
+ return items + [
bot.isGroup
? MenuItem("Edit group", icon: "person.2") { editingGroup = GroupTarget(computerId: item.ref.computerId, group: bot) }
: MenuItem("Edit profile", icon: "pencil") { editing = EditTarget(computerId: item.ref.computerId, draft: BotDraft(bot)) },
diff --git a/apps/ios/WhatsNew.md b/apps/ios/WhatsNew.md
index 13e63f4d..0fa9ecd2 100644
--- a/apps/ios/WhatsNew.md
+++ b/apps/ios/WhatsNew.md
@@ -20,6 +20,7 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o
- Bot 工作中點一下狀態膠囊,就能在對話裡展開這一輪的思考、工具與 MCP 呼叫,太長時在膠囊內捲動。
- 新增「Open Live Mode」捷徑,選擇 Bot 後直接開啟語音聊天。
- 新增「Send Text to Bot」捷徑,可選擇 Bot 並傳送文字;預設在背景傳送,也可開啟「Open Chat」顯示對話。
+- 點對話上方的 Bot 會打開它的詳情、資料庫、記憶與設定;「新會話」改到 Bot 列表的長按選單。
### en-US
- Bots can make artifacts: reports, trackers and dashboards you come back to show as a card in the chat. Open one full screen and message the bot below it to change it; it updates in place.
@@ -33,6 +34,7 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o
- While a bot works, tap its status pill to unfold this turn's thinking, tool and MCP calls right in the chat; a long turn scrolls inside the pill.
- Use Open Live Mode in Shortcuts to choose a bot and start voice chat.
- Use Send Text to Bot to choose a bot and send text in the background by default, or enable Open Chat to show the conversation.
+- Tapping the bot at the top of its chat opens its Details, Library, Memory and Settings; New session moved to the bot's touch-and-hold menu in the list.
## 2.24.0
diff --git a/docs/architecture/file-structure.md b/docs/architecture/file-structure.md
index 3ff3a1cc..6be35b9d 100644
--- a/docs/architecture/file-structure.md
+++ b/docs/architecture/file-structure.md
@@ -99,7 +99,7 @@ Codync/
| Fast mode (session config option) | `host/src/agent/config.rs`, `agent/bot/fast_mode.rs` |
| Marketplace, Composio, connector OAuth | `host/src/market/` |
| Skills a bot writes (`save_skill`) | `host/src/chat/skills.rs`, stored by `host/src/market/skills.rs` |
-| Artifacts (`publish_artifact`) and a chat's Library | `host/src/chat/artifacts.rs`, `library.rs`; desktop `apps/desktop/src/renderer/views/library/` (+ `src/main/artifacts.ts`); iPhone `apps/ios/Kit/Sources/CodyncUI/Artifacts/` (+ `Store/ArtifactCache.swift`, `BotStore+Artifacts.swift`); Android `ArtifactCardView.kt`, `ArtifactViewer.kt`, `ArtifactWebView.kt`, `LibrarySheet.kt`, `AppStoreArtifacts.kt` (+ `core/Artifact.kt`, `core/Library.kt`); terminal `host/src/tui/net/artifacts.rs`, `manage/library.rs` |
+| Artifacts (`publish_artifact`) and a chat's Library | `host/src/chat/artifacts.rs`, `library.rs`; desktop `apps/desktop/src/renderer/views/library/` (+ `src/main/artifacts.ts`); iPhone `apps/ios/Kit/Sources/CodyncUI/Artifacts/` (+ `Store/ArtifactCache.swift`, `BotStore+Artifacts.swift`); Android `ArtifactCardView.kt`, `ArtifactViewer.kt`, `ArtifactWebView.kt`, `LibraryView.kt`, `AppStoreArtifacts.kt` (+ `core/Artifact.kt`, `core/Library.kt`); terminal `host/src/tui/net/artifacts.rs`, `manage/library.rs` |
| Screen bridge and built-in MCP tools | `host/src/screen/`, `mcp.rs` |
| Swift transport and cloud API | `apps/ios/Kit/Sources/CodyncKit/Client/` |
| Account aggregation / one host mirror | `apps/ios/Kit/Sources/CodyncUI/Store/AccountStore.swift` / `BotStore.swift` (+ `BotStore+Connection`, `+Sync`, `+Sending`, `+Actions`, `+Plugins`, `+Cache`, `+Shortcuts`) |
@@ -112,7 +112,7 @@ Codync/
| Cloud routes / authentication / relay | `cloud/src/index.ts`, `api.ts`, `routes/`, `auth.ts`, `relay.ts` |
| Push encryption / APNs delivery / decryption | `host/src/remote/push.rs`, `relay/src/`, `apps/ios/NotificationService/` |
| Widget and activity rendering | `apps/ios/Kit/Sources/CodyncKit/Design/`, `apps/ios/Widgets/` |
-| Android screens (one file per iOS view: `BotListView.kt`, `ChatScreen.kt`, `PairingView.kt`, `SettingsView.kt`, …) | `apps/android/app/src/main/kotlin/com/codync/android/` |
+| Android screens (one file per iOS view: `BotListView.kt`, `ChatScreen.kt`, `BotDetailsView.kt` (+ `BotSettingsForm.kt`, `BotTemplateView.kt`), `PairingView.kt`, `SettingsView.kt`, …) | `apps/android/app/src/main/kotlin/com/codync/android/` |
| Android components and glass | `apps/android/design/` (`Controls.kt`, `Chrome.kt`, `Sheet.kt`, `Menus.kt`, `Dialog.kt`, `Glass.kt`) |
| Android transport, pairing and wire models | `apps/android/core/` (`EncryptedChannel.kt`, `HostConnector.kt`, `Pairing.kt`, `Compatibility.kt`) |
| Android widgets, Live updates, push | `apps/android/app/` (`CodyncWidgets.kt`, `WidgetCards.kt`, `LiveUpdateGallery.kt`, `PushService.kt`) |
diff --git a/docs/design/ui-conventions.md b/docs/design/ui-conventions.md
index b5dd4360..f896ee9f 100644
--- a/docs/design/ui-conventions.md
+++ b/docs/design/ui-conventions.md
@@ -2,7 +2,7 @@
## iPhone navigation
-The bot list and conversation use the system `NavigationStack` toolbar. `ToolbarItem` owns the account button, centered computer status/filter menu, and New button (New bot, New group chat). Computer management is inside the centered menu. The conversation copies Grok Bot: the title pill is a native `Menu` (details and the bot's actions), the only trailing button is the computer (remote screen; it pulses while this bot operates the screen), and the call button sits in the composer as a filled waveform capsule while the box is empty. Menus opened from toolbar buttons (New, the computer filter, the title) are native `Menu`s, like every iOS menu; the conversation uses the system back button. iOS supplies Liquid Glass, control sizing, grouping and interaction feedback.
+The bot list and conversation use the system `NavigationStack` toolbar. `ToolbarItem` owns the account button, centered computer status/filter menu, and New button (New bot, New group chat). Computer management is inside the centered menu. The conversation copies Grok Bot: the title (the bot's avatar and name) is a plain button that opens its details sheet on Details, a group's editor for a group (VoiceOver: "<name>, view details"); the other bot actions live where the desktop has them (New session, Pin and Delete in the bot list's touch-and-hold menu, Full conversation through a message's Show what it did, Reconnect through pull to refresh and the computer menu), the only trailing button is the computer (remote screen; it pulses while this bot operates the screen), and the call button sits in the composer as a filled waveform capsule while the box is empty. Menus opened from toolbar buttons (New, the computer filter) are native `Menu`s, like every iOS menu; the conversation uses the system back button. iOS supplies Liquid Glass, control sizing, grouping and interaction feedback.
The conversation keeps the native glass buttons over the chat with a soft top scroll-edge effect, so messages blur out under the header instead of running sharp behind it. Root error dialogs use an in-place, full-screen scrim so presenting them does not change the underlying glass controls' appearance.
@@ -10,7 +10,7 @@ iPhone conversation scrolling leaves dragging, deceleration, and bottom rubber-b
Do not wrap those toolbar controls in `IconButtonStyle`, hand-sized rounded backgrounds or another glass effect. The account avatar is toolbar content, with the system supplying the enclosing surface. This is the explicit exception to the custom-chrome rule below.
-Connecting and reconnecting are background work. `BotStore` gives initial offline reports 1 second to recover and holds drops from online (including relay "computer offline" reports) for 5 seconds. "No access" shows immediately. Automatic read acknowledgements never open an error dialog and visible conversations are acknowledged again after reconnecting. An action taken during a reconnect (back in the foreground, a new network, a drop still inside its grace) waits for the link, up to 20 seconds, instead of failing; while one waits, headers read `Connecting…` and the conversation's connection label shows a spinner. Calls that are safe to repeat (send, stop, approvals, pin, hide, mark as read, delete) are tried again when the link drops under them. Tapping while the header says Offline because the computer can't be reached starts a fresh connection attempt and waits for it, instead of failing until the backoff gets there; a computer the relay reports as off fails at once, since the relay says when it is back. A permission card shows a spinner on the chosen option, dims the others and takes no second answer until the computer has it. The desktop app's `BotStore` (link handling in `apps/desktop/src/renderer/store/bot-sync.ts`) applies the same graces and 20-second wait. The TUI follows the same rule over loopback: a command the host can't be reached for is retried for up to 20 seconds behind its "Reconnecting…" indicator (the `hello` probe that explains an unreachable host still answers at once), and its permission cards spin on the chosen option. The "Something went wrong" dialog is left for a computer that is off, a refused device, the computer's own answers, and reconnects that outlast the wait. Background work (cloud refresh, device registration) logs connection, busy-cloud and stale-token failures instead of showing them. The iOS app disconnects only in `.background`, not `.inactive`. Connection status lives only in headers and their menus. The roster header shows a small summary (`1 connected`, `1/2 connected`, `2 offline`, or `Connecting…`). Its computer menu supports multiple selections, Show only, All computers, reconnect, and management. At least one available computer stays selected; if saved exclusions would hide every computer, the list falls back to all. Filters persist on the device. Bots sort pinned first, then in the order the user dragged them into, then by recency ([bot order](../features/computer-order.md#bot-order)). On iPhone, when more than one computer is shown, each computer gets a light heading (badge, name, connection, and "No bots yet" when empty) above its own bots; with one computer the list stays flat. Tapping a heading folds that computer's bots away (chevron; saved on the device). Long-press a heading to drag the computer with its bots up or down: while it is lifted every computer's bots fold into their headings, they unfold on release, and the order is saved on the device (`AccountStore.move`; VoiceOver: Move up / Move down). A bot moves only among its own computer's bots. The desktop app shows a flat roster. There are no connection banners. The compact desktop rail uses a computer icon for the same menu. Conversation headers show a small connection label, with the computer name available in the header menu or help text. Pull-to-refresh remains available on iPhone. Computer setup and access requests live under Manage computers; a phone asks an account computer for access only when the user taps Ask for access, never on its own.
+Connecting and reconnecting are background work. `BotStore` gives initial offline reports 1 second to recover and holds drops from online (including relay "computer offline" reports) for 5 seconds. "No access" shows immediately. Automatic read acknowledgements never open an error dialog and visible conversations are acknowledged again after reconnecting. An action taken during a reconnect (back in the foreground, a new network, a drop still inside its grace) waits for the link, up to 20 seconds, instead of failing; while one waits, headers read `Connecting…` and the conversation's connection label shows a spinner. Calls that are safe to repeat (send, stop, approvals, pin, hide, mark as read, delete) are tried again when the link drops under them. Tapping while the header says Offline because the computer can't be reached starts a fresh connection attempt and waits for it, instead of failing until the backoff gets there; a computer the relay reports as off fails at once, since the relay says when it is back. A permission card shows a spinner on the chosen option, dims the others and takes no second answer until the computer has it. The desktop app's `BotStore` (link handling in `apps/desktop/src/renderer/store/bot-sync.ts`) applies the same graces and 20-second wait. The TUI follows the same rule over loopback: a command the host can't be reached for is retried for up to 20 seconds behind its "Reconnecting…" indicator (the `hello` probe that explains an unreachable host still answers at once), and its permission cards spin on the chosen option. The "Something went wrong" dialog is left for a computer that is off, a refused device, the computer's own answers, and reconnects that outlast the wait. Background work (cloud refresh, device registration) logs connection, busy-cloud and stale-token failures instead of showing them. The iOS app disconnects only in `.background`, not `.inactive`. Connection status lives only in headers and their menus. The roster header shows a small summary (`1 connected`, `1/2 connected`, `2 offline`, or `Connecting…`). Its computer menu supports multiple selections, Show only, All computers, reconnect, and management. At least one available computer stays selected; if saved exclusions would hide every computer, the list falls back to all. Filters persist on the device. Bots sort pinned first, then in the order the user dragged them into, then by recency ([bot order](../features/computer-order.md#bot-order)). On iPhone, when more than one computer is shown, each computer gets a light heading (badge, name, connection, and "No bots yet" when empty) above its own bots; with one computer the list stays flat. Tapping a heading folds that computer's bots away (chevron; saved on the device). Long-press a heading to drag the computer with its bots up or down: while it is lifted every computer's bots fold into their headings, they unfold on release, and the order is saved on the device (`AccountStore.move`; VoiceOver: Move up / Move down). A bot moves only among its own computer's bots. The desktop app shows a flat roster. There are no connection banners. The compact desktop rail uses a computer icon for the same menu. Conversation headers show a small connection label; the desktop names the computer in its help text, the phones in the bot details' Settings (Workspace → Computer). Pull-to-refresh remains available on iPhone. Computer setup and access requests live under Manage computers; a phone asks an account computer for access only when the user taps Ask for access, never on its own.
Sources: `apps/ios/Views/BotListView.swift`, `AccountSwitcherView.swift`, `apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift`, `Bots/ComputerFilterHeader.swift`, `Store/ComputerSelection.swift`, `Bots/BotRow.swift`; desktop: `apps/desktop/src/renderer/views/ChatWindow.tsx`, `ComputerFilterHeader.tsx`, `BotRow.tsx`.
@@ -95,7 +95,7 @@ Desktop conversations start with the details inspector closed; the title menu op
Preserve the original character avatar design: dotted shading, highlight-only color, silhouettes and animation. Desktop roster avatars remain 30 points and iPhone roster avatars remain 46 points. iPhone shares readable secondary text and message previews; its native navigation remains platform-specific. Terminal avatars already use solid color and the terminal has no persistent details inspector; its secondary text uses the same readable palette.
-The details inspector (`apps/desktop/src/renderer/views/thread/DetailsPanel.tsx`) copies Grok Bot's: share (Create template) and close (X) as round buttons in the corner, in the page color with a soft ring, over a 54-point band that drags the window; the bot's 60-point avatar, name and runtime centered on top; then page tabs (`TabChoice`: plain labels, the chosen one on a light capsule) for **Details**, **Library** (the chat's [artifacts and files](../features/artifacts.md)), **Memory** and **Settings**, all in one scroll. The chat's `<<` button (in the same ringed style) and the title pill open it; hovering the pill shows a `>` after the name. Details holds what changes often: Instructions, Agent (the agent with its logo, its model, fast mode and its [fallbacks](../features/agent-fallback.md#apps)), the Use the computer switch and Routines (one card per routine); Settings holds the rest: Profile (avatar row, name, and "Created by" for a bot another bot created), Workspace (computer, workspace, permissions), Activity, Connectors and Skills. Both are parts of `BotSettingsForm` (`part`), saved as you edit; the editor sheet shows all of it. Every bot settings form (these, the editor sheets, the terminal's form) keeps a change made elsewhere while it is open (a bot that manages the team, another device): it takes the new value in each field not edited there, or the terminal sends only what it changed. Memory is the read-only memory card, its sections in the same tabs; each layer's note ends with "To change it, tell the bot." and the Dreams tab has an info button. Every group in the panel is Grok Bot's outlined card (an outline on the page, no fill, inputs filled instead), a row with a note puts its control under the note, and long notes (skill descriptions, explanations, a note's description) stop at two lines with an ellipsis. A group shows its avatar, name, bot count and members instead of tabs. Use 16-point horizontal insets and 28-point section gaps; sections use the `CardSection` look: filled 16-point groups without borders, hairline-split rows, a note under each option. The iPhone's Details sheet (`BotDetailsView`, from the title menu's Details, Settings and Routines) has the same corner buttons, header, tabs, pages, outlined cards (`cardStyle`) and two-line notes (`noteLines`), and saves as you edit too.
+The details inspector (`apps/desktop/src/renderer/views/thread/DetailsPanel.tsx`) copies Grok Bot's: share (Create template) and close (X) as round buttons in the corner, in the page color with a soft ring, over a 54-point band that drags the window; the bot's 60-point avatar, name and runtime centered on top; then page tabs (`TabChoice`: plain labels, the chosen one on a light capsule) for **Details**, **Library** (the chat's [artifacts and files](../features/artifacts.md)), **Memory** and **Settings**, all in one scroll. The chat's `<<` button (in the same ringed style) and the title pill open it; hovering the pill shows a `>` after the name. Details holds what changes often: Instructions, Agent (the agent with its logo, its model, fast mode and its [fallbacks](../features/agent-fallback.md#apps)), the Use the computer switch and Routines (one card per routine); Settings holds the rest: Profile (avatar row, name, and "Created by" for a bot another bot created), Workspace (computer, workspace, permissions), Activity, Connectors and Skills. Both are parts of `BotSettingsForm` (`part`), saved as you edit; the editor sheet shows all of it. Every bot settings form (these, the editor sheets, the terminal's form) keeps a change made elsewhere while it is open (a bot that manages the team, another device): it takes the new value in each field not edited there, or the terminal sends only what it changed. Memory is the read-only memory card, its sections in the same tabs; each layer's note ends with "To change it, tell the bot." and the Dreams tab has an info button. Every group in the panel is Grok Bot's outlined card (an outline on the page, no fill, inputs filled instead), a row with a note puts its control under the note, and long notes (skill descriptions, explanations, a note's description) stop at two lines with an ellipsis. A group shows its avatar, name, bot count and members instead of tabs. Use 16-point horizontal insets and 28-point section gaps; sections use the `CardSection` look: filled 16-point groups without borders, hairline-split rows, a note under each option. The iPhone's Details sheet (`BotDetailsView`, from tapping the chat's title, a routine notice or a failure's Add a fallback) has the same corner buttons, header, tabs, pages, outlined cards (`cardStyle`) and two-line notes (`noteLines`), and saves as you edit too. Android's (`BotDetailsView.kt`) ports it, without the Memory tab until the read-only memory screen is ported ([Android plan](../plans/android-app.md)).
Routines are a compact grouped list: name, a one-line schedule (or the live run state), and an on/off switch per row; tapping a row opens the same form as +, filled in, with delete and test run beside Save. On the desktop the form card fits its content. The header's chat button asks the bot (puts "I want a routine that " in the composer); + opens the form, where When to run is a type choice (a segmented control on the desktop, the system menu on iPhone) and a schedule is a Repeat choice (Hourly, Daily, Weekdays, Weekly, Custom) with only the fields that choice needs (minute, time, weekday, or a typed cron for Custom) and a time zone picked from a searchable list. On the desktop these sit in one `CardSection` of labeled rows, Repeat and the weekday as `ChipChoice` chips with the chosen one on a light capsule. The empty state is one line of text. A saved webhook routine's form shows the public URL and key as monospaced rows (in the same group on the desktop) with copy, show/hide and replace-key (confirmed) icon buttons, and one caption on how to send and that deliveries pass through the Codync cloud. Agent metadata uses Runtime and Workspace labels for personal bots, or Project folder for explicitly configured projects; project paths remain selectable and wrap. Personal workspace paths stay out of the default details UI. Keep status and section headings readable in both appearances through `Palette`.
diff --git a/docs/features/artifacts.md b/docs/features/artifacts.md
index 224ac1ab..1346a15c 100644
--- a/docs/features/artifacts.md
+++ b/docs/features/artifacts.md
@@ -77,8 +77,7 @@ All four clients show the same things; layout follows each platform.
its card in the chat. An image the user sent shows a thumbnail and opens full size; other files they sent show their
name and size. Empty: "Library is empty" / "Artifacts {name} makes and files shared in this chat show here."
- Desktop: a Library tab in the conversation details panel (Details · Library · Memory · Settings).
- - iPhone: the same tab in the bot's details sheet; Library in the chat's menu opens it there.
- - Android: Library in the chat's menu (beside Routines), a sheet with the list.
+ - iPhone and Android: the same tab in the bot's details sheet, which tapping the chat's title opens.
- **Terminal UI**: a card is a `▤ Artifact: <title>` line. On the selected message, `o` opens the artifact in the
computer's browser (its HTML written to a temporary file) and `f` saves `<title>.html` to Downloads, like files.
The Library is a tab of the bot's pages (`L`, ⇧← ⇧→): `↵`/`o` opens an artifact in the browser, `f` saves any row to
diff --git a/docs/features/chat-messages.md b/docs/features/chat-messages.md
index 153ebdd2..0d9b30ca 100644
--- a/docs/features/chat-messages.md
+++ b/docs/features/chat-messages.md
@@ -81,7 +81,8 @@ summaries shown (`--thinking-display summarized`, through `claudeCode.options.ex
`agent/bot/launch.rs`). Whether Claude thinks stays the user's Claude Code setting; when it does, a
short thought's summary arrives in one piece when the thinking ends, a long one's in parts.
-Full conversation remains available from the conversation menu. It contains narration, all
+Full conversation remains available through a message's Show what it did (its touch-and-hold
+menu on the iPhone and Android, its actions on the desktop). It contains narration, all
thoughts, tools and previous turns, and follows new steps until the reader scrolls up.
On the terminal, `>` or a click on the working line unfolds the steps under it (their last
14 lines), `t` opens Full conversation, and the working line keeps the count of steps so far;
diff --git a/docs/features/routines.md b/docs/features/routines.md
index d05fd002..b9ed8ae7 100644
--- a/docs/features/routines.md
+++ b/docs/features/routines.md
@@ -1,8 +1,9 @@
# Routines
Routines belong to an agent bot and are usually created by talking to it ("I want
-a routine that…"). Every agent receives the built-in `routines` MCP server. The desktop
-conversation details panel and the iPhone's **More → Routines** show a compact list
+a routine that…"). Every agent receives the built-in `routines` MCP server. The Details page
+of the bot's details (the desktop's details panel; the phones' details sheet, which tapping the
+chat's title or a routine's notice opens) shows a compact list
(name, schedule, on/off switch). The header's chat button puts "I want a routine
that " in the composer; **+** opens the form for doing it by hand. A row opens
the same form filled in, with delete and test run beside Save; the row's switch
diff --git a/docs/plans/android-app.md b/docs/plans/android-app.md
index 92cfa241..3b51b891 100644
--- a/docs/plans/android-app.md
+++ b/docs/plans/android-app.md
@@ -16,11 +16,11 @@ emulator against a real host; device acceptance is listed separately.
| --- | --- | --- |
| Welcome/pairing | Ported: welcome crew and chat glimpse, Install (Mac/Linux) and Scan pages with the camera on the page, paste link, Tailscale note, sign-in | Physical optical scan, camera permission denial |
| Accounts/access | Ported: account sheet and switcher, Computers & settings (connection status, badge color, Revoke this phone's access, older copies removed from the account), account computer access with its code, access banner, `codync-dev://computers` and `codync-dev://plugins` | Provider browser round trip on a device; Revoke and older copies against a signed-in account (covered by cloud request tests only); one computer per phone ([multiple computers are future work](../architecture/overview.md)) |
-| Roster | Ported: rows, menus, pin/hide/delete, groups, drag to reorder (host-synced order) and TalkBack Move up/down, computer header, pull to refresh (also in Computers & settings) | Multiple computers |
+| Roster | Ported: rows, menus, pin/hide/delete, New session (bots only), groups, drag to reorder (host-synced order) and TalkBack Move up/down, computer header, pull to refresh (also in Computers & settings) | Multiple computers |
| Conversation | Ported: bubbles, Markdown/code, permissions, reactions, quote replies, Full conversation, bot-to-bot exchange lines and their conversation, routine notices that open their routine, files a bot shares (verified download, then the share sheet), sent images full size, pull down to reconnect, jump to latest, read receipts for every conversation on screen | Physical keyboard and TalkBack |
| Composer | Ported: files/photos/paste (groups too, image thumbnails, Paste only when the clipboard holds files), `/` commands (Fast mode, skills listed fresh on `/`), @mentions in groups, call/send/stop/interrupt button | Dictation ([voice call](../features/voice-call.md)): the mic, its recording pill, the engine menu beside it (On device, or OpenAI / Gemini transcribed on the user's key with *Transcribing…*) and the *Couldn't dictate* dialog |
-| Bot and group editors | Ported: avatar, profile, agent and model options, Fast mode, workspace folder picker, permissions, activity, connectors, skills (with their details) | — |
-| Memory | Broken since 2.18.0: the screen calls removed host methods (see [Not ported yet](#not-ported-yet)) | Port the read-only memory screen from `MemoryView.swift`, `MemoryFilesView.swift` and `MemoryInfoSheet.swift`, without add, edit, pin or forget |
+| Bot and group editors | Ported: avatar, profile, agent and model options, Fast mode, workspace folder picker, permissions, activity, connectors, skills (with their details); the bot details sheet (`BotDetailsView`, from the chat's title, a routine notice or Add a fallback): Details (instructions, agent, Use the computer, Routines), Library and Settings tabs saved as you edit, Create template; a group's title opens its editor | The details' Memory tab (see Memory) |
+| Memory | Broken since 2.18.0: the screen calls removed host methods (see [Not ported yet](#not-ported-yet)); it shows only in the roster's Edit profile, and the bot details have no Memory tab until the port | Port the read-only memory screen from `MemoryView.swift`, `MemoryFilesView.swift` and `MemoryInfoSheet.swift`, without add, edit, pin or forget |
| Routines | Ported: list with switches, editor (schedule, webhook panel, run settings), test run, delete | Live provider/routine acceptance |
| Extensions | Ported: agents (install, sign-in, setup terminal), registry connectors, Composio apps, skills, installed list, custom connector, own skill, credentials, chat connection request card | Real provider OAuth, 1Password |
| Voice | Ported: call bar (provider name, fallback notice), Voice chat settings (engine, mode, models, voice, minutes this month), on device (the call's language through Android's on-device recognizer, Vosk English as the fallback, replies read by an offline voice for their language), OpenAI Realtime (WebRTC), Gemini Live, Speech mode, fallback to on device, group calls | Both providers with a real key on a device; a live microphone on a device |
@@ -83,7 +83,7 @@ was walked through on an emulator against a real host.
recognizer; it never falls back to online recognition (iOS may use Apple's servers).
- **Jump to latest** is an opaque disc: it sits in the scrolling content, so there's no blur under it.
- **Not ported**: the computer filter's hide toggle and *This computer was removed* (one computer
- per phone on Android, and removing it reloads the app), *Create template* (nothing opens it on iOS).
+ per phone on Android, and removing it reloads the app).
- **Multiple computers**: one per phone ([future work](../architecture/overview.md)).
## Before a Play release
diff --git a/web/content/docs/agent-fallbacks.mdx b/web/content/docs/agent-fallbacks.mdx
index 8e7ae60c..67b57d7a 100644
--- a/web/content/docs/agent-fallbacks.mdx
+++ b/web/content/docs/agent-fallbacks.mdx
@@ -9,7 +9,7 @@ A bot has no fallbacks until you add them.
Fallbacks live in the bot's **Agent** card, under Model:
- **Desktop app:** click the bot's name at the top of the chat. The **Details** tab shows the Agent card.
-- **iPhone:** tap the bot's name at the top of the chat, then **Details**. The Agent card is on the **Details** tab.
+- **iPhone:** tap the bot's name at the top of the chat. The **Details** tab shows the Agent card.
- **Terminal UI:** press `e` on the bot and go to the **Fallbacks** field.
In the desktop and iPhone apps:
diff --git a/web/content/docs/artifacts.mdx b/web/content/docs/artifacts.mdx
index 7f3e7ada..b81aa790 100644
--- a/web/content/docs/artifacts.mdx
+++ b/web/content/docs/artifacts.mdx
@@ -39,7 +39,7 @@ Each bot's **Library** holds what was made or shared in its chat, newest first u
Where to find it:
- **Desktop:** click the bot's name at the top of the chat, then the **Library** tab.
-- **iPhone:** tap the bot's name at the top of the chat and choose **Library**.
+- **iPhone:** tap the bot's name at the top of the chat, then the **Library** tab.
- **Terminal UI:** press `L` for the bot's Library tab. `Enter` or `o` opens an artifact in your browser, `f` saves any row to Downloads, and `r` renames an artifact.
The Library looks through the bot's newest 500 messages with files.
diff --git a/web/content/docs/bots.mdx b/web/content/docs/bots.mdx
index ad35d19a..4e058795 100644
--- a/web/content/docs/bots.mdx
+++ b/web/content/docs/bots.mdx
@@ -8,7 +8,7 @@ The host on your computer runs every bot. A bot's agent starts when you send it
## Where to change a bot's settings
-- **iPhone:** open the bot's chat and tap its name at the top. **Details** shows its instructions, agent, model and routines; **Settings** shows the rest. Changes save as you edit. You can also touch and hold the bot in the list and choose **Edit profile**.
+- **iPhone:** open the bot's chat and tap its name at the top, for the tabs **Details**, **Library**, **Memory** and **Settings**. **Details** shows its instructions, agent, model and routines; **Settings** shows the rest. Changes save as you edit. You can also touch and hold the bot in the list and choose **Edit profile**.
- **Desktop:** click the bot's name at the top of the chat to open the details panel, with the tabs **Details**, **Library**, **Memory** and **Settings**. Changes save as you edit. You can also right-click the bot in the sidebar and choose **Edit Profile…**
- **Terminal UI:** select the bot and press `e`. Press Ctrl+S to save, or Esc to drop your changes.
@@ -85,7 +85,7 @@ A bot's chat and its agent's session are two different things. The chat is the p
**New session** starts the agent with a fresh context. The chat history stays where it is, and so do the bot's memory, settings and files. Use it when the agent's context has drifted, or before starting unrelated work.
-- **iPhone:** tap the bot's name at the top of the chat, then **New session**.
+- **iPhone:** touch and hold the bot in the list, then **New session**.
- **Desktop:** right-click the bot in the sidebar, then **New session**.
- **Terminal UI:** press `S`.
@@ -95,7 +95,7 @@ A new session also starts when you change the bot's agent, model or folder. Cody
## Delete a bot
-- **iPhone:** tap the bot's name at the top of the chat, then **Delete bot**, or touch and hold it in the list, then **Delete**.
+- **iPhone:** touch and hold the bot in the list, then **Delete**.
- **Desktop:** right-click the bot in the sidebar, then **Delete**.
- **Terminal UI:** press `x`.
diff --git a/web/content/docs/connectors-and-skills.mdx b/web/content/docs/connectors-and-skills.mdx
index 90d408bc..fcfb276b 100644
--- a/web/content/docs/connectors-and-skills.mdx
+++ b/web/content/docs/connectors-and-skills.mdx
@@ -79,7 +79,7 @@ The cards themselves hold no credentials. You can answer them in the iPhone app,
A connector or skill you add is turned on for every bot, and new bots start with all of them on (without a credential store, as on a [headless Linux server](/docs/linux-servers#limits-on-a-headless-server), new bots start with no connectors). To turn one off for a bot, open the bot's **Settings** tab:
- **Desktop app:** click the bot's name at the top of the chat, then **Settings**.
-- **iPhone:** tap the bot's name at the top of the chat, then **Details**, then **Settings**.
+- **iPhone:** tap the bot's name at the top of the chat, then the **Settings** tab.
- **Terminal UI:** press `e` on the bot, then use the **Connectors** and **Skills** fields (space toggles).
The bot picks up the change on its next turn, in the same conversation.
diff --git a/web/content/docs/conversations.mdx b/web/content/docs/conversations.mdx
index 1ce0da72..02b9c3cd 100644
--- a/web/content/docs/conversations.mdx
+++ b/web/content/docs/conversations.mdx
@@ -10,7 +10,7 @@ The line ends in an arrow. Tap or click it to unfold this turn's steps right in
Everything else the agent did (its narration, thinking, tool calls, diffs and plans) is in **Full conversation**:
-- **iPhone:** tap the bot's name at the top of the chat, then **Full conversation**. Or touch and hold a bot message, then **Show what it did**.
+- **iPhone:** touch and hold a bot message, then **Show what it did**.
- **Desktop:** hover a bot message and choose **More message actions**, then **Show what it did**, or right-click the message.
- **Terminal UI:** `t` opens the trace pane, `T` opens it full screen, and `o` shows the last turn's steps.
@@ -104,7 +104,7 @@ Type `/` at the start of a message to see the bot's commands:
- `/fast`: turns [Fast mode](/docs/agents#models-and-options) on or off, when the bot's agent offers it.
- `/` followed by a skill's ID: tells the bot to read that skill first and follow it for this message. The bot's skills are listed after the built-in commands.
-Any other `/command` goes to the agent unchanged, so the agent's own commands keep working. New session isn't a command; it's in the bot's menu. See [Bots](/docs/bots#new-session).
+Any other `/command` goes to the agent unchanged, so the agent's own commands keep working. New session isn't a command; it's in the bot's menu in the list. See [Bots](/docs/bots#new-session).
## Fresh conversations
diff --git a/web/content/docs/groups.mdx b/web/content/docs/groups.mdx
index 3127c31d..19da4bac 100644
--- a/web/content/docs/groups.mdx
+++ b/web/content/docs/groups.mdx
@@ -18,7 +18,7 @@ Pick the bots to add, type a name if you like, and choose **Create**. Without a
Open the group's settings to change it:
-- **iPhone:** tap the group's name at the top of the chat and choose **Edit group**.
+- **iPhone:** tap the group's name at the top of the chat to edit the group.
- **Desktop:** click the group's name at the top of the chat. The details panel lists the members, with **Add Member** and an X to remove each one.
- **Terminal UI:** select the group and press `e`.
diff --git a/web/content/docs/memory.mdx b/web/content/docs/memory.mdx
index e563c1d5..ce6448a2 100644
--- a/web/content/docs/memory.mdx
+++ b/web/content/docs/memory.mdx
@@ -47,7 +47,7 @@ You can also edit the files on the computer with any editor. Codync records the
Memory is on the bot's **Memory** tab, read-only. To change something, tell the bot.
-- **iPhone:** tap the bot's name at the top of the chat, choose **Details**, then **Memory**.
+- **iPhone:** tap the bot's name at the top of the chat, then the **Memory** tab.
- **Desktop:** click the bot's name at the top of the chat, then the **Memory** tab.
- **Terminal UI:** select the bot and press `M`.
diff --git a/web/content/docs/routines.mdx b/web/content/docs/routines.mdx
index ddafb83d..3ea88925 100644
--- a/web/content/docs/routines.mdx
+++ b/web/content/docs/routines.mdx
@@ -4,7 +4,7 @@ Each routine belongs to one bot and runs on your computer, with that bot's agent
## Find a bot's routines
-- **iPhone:** tap the bot's name at the top of the chat and choose **Routines**.
+- **iPhone:** tap the bot's name at the top of the chat. Routines are on the **Details** tab.
- **Desktop:** click the bot's name at the top of the chat to open its details. Routines are on the **Details** tab.
- **Terminal UI:** select the bot and press `R`.