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.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
fix(chat): remove inline thinking previews
leepokai2b0cf29108d1
diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/ThinkingPreviewTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.ktsimilarity index 75%rename from apps/android/app/src/androidTest/kotlin/com/codync/android/ThinkingPreviewTest.ktrename to apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.ktindex a0f6acdc..bac7991c 100644--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/ThinkingPreviewTest.kt+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.kt@@ -20,13 +20,13 @@ import org.junit.Assert.assertFalseimport org.junit.Ruleimport org.junit.Test-class ThinkingPreviewTest {+class WorkingIndicatorTest {@get:Rule val compose = createComposeRule()- @Test fun thinkingExpansionAndStreamingFollowTheBottomButLeaveHistoryInPlace() {+ @Test fun activityIsNotClickableAndUpdatesWithoutMovingHistory() {// The live orb runs a frame loop; advance motion explicitly instead of waiting for it to stop.compose.mainClock.autoAdvance = false- val thought = mutableStateOf("First thinking line")+ val activity = mutableStateOf("Working…")lateinit var list: LazyListStatecompose.setContent {Hosted {@@ -34,19 +34,22 @@ class ThinkingPreviewTest {rememberFollowing(list, "message", 1, working = true, bottom = 0.dp)LazyColumn(Modifier.size(320.dp).testTag("conversation"), state = list, contentPadding = PaddingValues(0.dp)) {items(30) { Box(Modifier.height(48.dp)) { Text("Message $it") } }- item("working") { WorkingIndicator(Bot("bot", "Bot", status = "working"), thought.value) }+ item("working") { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = activity.value)) }}}}compose.mainClock.advanceTimeBy(1000)compose.waitForIdle()- compose.onNodeWithText("Working…").performClick()- compose.mainClock.advanceTimeBy(1000)- compose.onNodeWithText("First thinking line").assertIsDisplayed()- compose.runOnIdle { assertFalse(list.canScrollForward) }- compose.runOnIdle { thought.value = (1..12).joinToString("\n") { "Thinking line $it" } }+ compose.onNodeWithText("Working…").assertIsDisplayed().assertHasNoClickAction()+ compose.onNodeWithContentDescription("Show thinking").assertDoesNotExist()+ compose.onNodeWithText("No thinking text yet.").assertDoesNotExist()+ compose.runOnIdle {+ assertFalse(list.canScrollForward)+ activity.value = "Searching files…"+ }compose.mainClock.advanceTimeBy(1000)compose.waitForIdle()+ compose.onNodeWithText("Searching files…").assertIsDisplayed().assertHasNoClickAction()compose.runOnIdle { assertFalse(list.canScrollForward) }compose.onNodeWithTag("conversation").performTouchInput { swipeDown() }compose.mainClock.advanceTimeBy(1000)@@ -54,7 +57,7 @@ class ThinkingPreviewTest {var place = 0 to 0compose.runOnIdle {place = list.firstVisibleItemIndex to list.firstVisibleItemScrollOffset- thought.value += "\nAnother thinking line"+ activity.value = "Writing a reply…"}compose.mainClock.advanceTimeBy(1000)compose.waitForIdle()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.ktindex 026d996b..64cb0546 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@@ -2,13 +2,7 @@ package com.codync.androidimport android.content.ClipDataimport android.content.ClipboardManager-import androidx.compose.animation.AnimatedVisibilityimport androidx.compose.animation.animateContentSize-import androidx.compose.animation.core.animateFloatAsState-import androidx.compose.animation.expandVertically-import androidx.compose.animation.fadeIn-import androidx.compose.animation.fadeOut-import androidx.compose.animation.shrinkVerticallyimport androidx.compose.foundation.backgroundimport androidx.compose.foundation.clickableimport androidx.compose.foundation.layout.Arrangement@@ -34,7 +28,6 @@ import androidx.compose.runtime.setValueimport androidx.compose.ui.Alignmentimport androidx.compose.ui.Modifierimport androidx.compose.ui.draw.clip-import androidx.compose.ui.draw.rotateimport androidx.compose.ui.graphics.Colorimport androidx.compose.ui.platform.LocalContextimport androidx.compose.ui.semantics.Role@@ -360,31 +353,17 @@ internal val Entry.botReactions: Map<String, List<String>> get() =}}-/**- * The bot's live activity line: a turning orb, what it's doing and for how long. Tapping it- * unfolds the current thinking text in place.- */-@Composable internal fun WorkingIndicator(bot: Bot, thought: String?) {- var expanded by remember(bot.startedAt) { mutableStateOf(false) }+/** The bot's current activity and elapsed time. */+@Composable internal fun WorkingIndicator(bot: Bot) {val needs = bot.status == "needsInput"Column(Modifier.fillMaxWidth().padding(top = 6.dp, end = 40.dp)) {Row(Modifier.clip(RoundedRectangle(18.dp)).background(Palette.bubbleAgent)- .clickable(role = Role.Button, onClickLabel = if (expanded) "Hide thinking" else "Show thinking", onClick = { expanded = !expanded }).padding(horizontal = 16.dp, vertical = 12.dp),verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(8.dp)) {ThinkingOrb(if (needs) ThinkingOrbState.Listening else ThinkingOrbState.Working, 16.dp, if (needs) Palette.warning else Palette.secondary)Text(bot.activity.ifEmpty { "Working…" }, Modifier.weight(1f, fill = false), style = Type.subheadline,color = if (needs) Palette.warning else Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)bot.startedAt?.let { Elapsed(it) }- val angle by animateFloatAsState(if (expanded) 90f else 0f, Motion.morph(), label = "Thinking disclosure")- Symbol("chevron.right", Modifier.rotate(angle), size = 12.dp, tint = Palette.tertiary)- }- AnimatedVisibility(expanded, enter = fadeIn(Motion.layout()) + expandVertically(Motion.layout(), expandFrom = Alignment.Top),- exit = fadeOut(Motion.layout()) + shrinkVertically(Motion.layout(), shrinkTowards = Alignment.Top)) {- SelectionContainer {- Text(thought ?: "No thinking text yet.", Modifier.fillMaxWidth().padding(start = 16.dp, end = 16.dp, top = 10.dp, bottom = 4.dp),- style = Type.footnote, color = Palette.secondary)- }}}}diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.ktindex 4a091466..2744553b 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@@ -251,6 +251,6 @@ import com.kyant.shapes.Capsuleis ChatItem.Exchanges -> BotMessageRow(item.group, state) { openPeer(item.group.peerId) }}}- if (working) item("working") { WorkingIndicator(bot, latestThought(state.entries.filter { it.botId == bot.id })) }+ if (working) item("working") { WorkingIndicator(bot) }}}diff --git a/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt b/apps/android/app/src/main/kotlin/com/codync/android/TraceView.ktindex 0893c589..5e9e25a6 100644--- a/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt+++ b/apps/android/app/src/main/kotlin/com/codync/android/TraceView.kt@@ -59,11 +59,6 @@ import kotlinx.serialization.json.jsonPrimitiveinternal fun runningTurn(entries: List<Entry>, working: Boolean): Long? =if (working) entries.filter { it.status != "queued" }.maxOfOrNull { it.turn } else null-internal fun latestThought(entries: List<Entry>): String? {- val turn = runningTurn(entries, working = true)- return entries.lastOrNull { it.turn == turn && it.kind == "thought" && it.text.isNotBlank() }?.text-}-/** The running turn's thoughts start `unfolded`, so its reasoning reads as it comes in. */@Composable private fun TraceRow(entry: Entry, unfolded: Boolean) {val d = entry.datadiff --git a/apps/android/app/src/test/kotlin/com/codync/android/TraceTest.kt b/apps/android/app/src/test/kotlin/com/codync/android/TraceTest.ktindex 74b0256f..d879e75f 100644--- a/apps/android/app/src/test/kotlin/com/codync/android/TraceTest.kt+++ b/apps/android/app/src/test/kotlin/com/codync/android/TraceTest.kt@@ -16,11 +16,4 @@ class TraceTest {assertEquals(1L, runningTurn(entries, working = true))assertNull(runningTurn(entries, working = false))}- @Test fun `thinking preview shows only the latest nonempty thought in this turn`() {- val entries = listOf(entry("old", 1, kind = "thought"), entry("latest", 2, kind = "thought"),- entry(" ", 2, kind = "thought"), entry("tool", 2, kind = "tool"), entry("queued", 3, status = "queued"))- assertEquals("latest", latestThought(entries))- assertNull(latestThought(entries + entry("new", 3)))- assertNull(latestThought(emptyList()))- }}diff --git a/apps/desktop/src/renderer/views/thread/ChatRows.tsx b/apps/desktop/src/renderer/views/thread/ChatRows.tsxindex d48e3e69..a30f6f24 100644--- a/apps/desktop/src/renderer/views/thread/ChatRows.tsx+++ b/apps/desktop/src/renderer/views/thread/ChatRows.tsx@@ -219,26 +219,17 @@ export function NoticeRow({ entry, addFallback }: { entry: Entry; addFallback?:}}-/** The live activity unfolds just the current thinking text, right in the conversation. */-export function WorkingIndicator({ bot, thought }: { bot: Bot; thought?: string }) {+/** The bot's current activity and elapsed time. */+export function WorkingIndicator({ bot }: { bot: Bot }) {const waiting = needsInput(bot)- const [expanded, setExpanded] = useState(false)return (<VStack align="flex-start" className="agent-inset">- <button className="working" onClick={() => setExpanded((value) => !value)} aria-expanded={expanded} title={expanded ? 'Hide thinking' : 'Show thinking'}>+ <div className="working"><HStack as="span" gap={8}><ThinkingOrb state={waiting ? 'listening' : 'working'} size={16} color={waiting ? 'var(--warning)' : 'var(--secondary)'} /><Text size="subheadline" tone={waiting ? 'attention' : 'secondary'} truncate>{bot.activity || 'Working…'}</Text>{bot.startedAt ? <Timer since={bot.startedAt} /> : null}- <span className={`disclosure-chevron${expanded ? ' open' : ''}`}>- <Icon name="chevron.right" size={10} weight="semibold" color="var(--tertiary)" />- </span></HStack>- </button>- <div className={`working-thought ${expanded ? 'shown' : ''}`} inert={!expanded} aria-hidden={!expanded}>- <div className="chat-working-clip">- <Text as="div" size="footnote" tone="secondary" className="working-thought-text selectable">{thought || 'No thinking text yet.'}</Text>- </div></div></VStack>)diff --git a/apps/desktop/src/renderer/views/thread/ThreadView.tsx b/apps/desktop/src/renderer/views/thread/ThreadView.tsxindex 4a46515e..7c11d31d 100644--- a/apps/desktop/src/renderer/views/thread/ThreadView.tsx+++ b/apps/desktop/src/renderer/views/thread/ThreadView.tsx@@ -13,7 +13,6 @@ import { UpdateNeededCard } from '../UpdateNeededCard'import { buildChat, rowIn, useArrivals, type ChatItem } from './chat-items'import { BotConversationView, BotMessageRow } from './BotConversation'import { ChatRow, TimeSeparator } from './ChatRows'-import { latestThought } from './trace-turns'import { WorkingTransition } from './WorkingTransition'import { RoutineNotice } from './RoutineNotice'import { Composer } from './Composer'@@ -365,7 +364,7 @@ const Transcript = memo(function Transcript({ botId, openTrace, onReply, openRou<Row item={item} chat={bot} openTrace={openTrace} onReply={onReply} openRoutine={openRoutine} openAgent={openAgent} openBotChat={openBotChat} /></div>))}- {bot ? <WorkingTransition bot={bot} visible={live} thought={latestThought(entries)} /> : null}+ {bot ? <WorkingTransition bot={bot} visible={live} /> : null}<div className="chat-end" /></div></div>diff --git a/apps/desktop/src/renderer/views/thread/WorkingTransition.tsx b/apps/desktop/src/renderer/views/thread/WorkingTransition.tsxindex cd60494a..f1af1431 100644--- a/apps/desktop/src/renderer/views/thread/WorkingTransition.tsx+++ b/apps/desktop/src/renderer/views/thread/WorkingTransition.tsx@@ -4,19 +4,19 @@ import { usePresence } from '../../components/Overlay'import { WorkingIndicator } from './ChatRows'/** Keep the activity and its space alive until the exit finishes, including a quick restart. */-export function WorkingTransition({ bot, visible, thought }: { bot: Bot; visible: boolean; thought?: string }) {+export function WorkingTransition({ bot, visible }: { bot: Bot; visible: boolean }) {// Matches --working-duration; initial history appears without an entrance animation.const presence = usePresence(visible, 420, false)- const lastActive = useRef({ bot, thought })+ const lastActive = useRef(bot)useLayoutEffect(() => {- if (visible) lastActive.current = { bot, thought }- }, [bot, thought, visible])- const active = visible ? { bot, thought } : lastActive.current+ if (visible) lastActive.current = bot+ }, [bot, visible])+ const active = visible ? bot : lastActive.currentreturn (<div className={`chat-working ${presence.shown ? 'shown' : ''}`} inert={!visible} aria-hidden={!visible}><div className="chat-working-clip"><div className="chat-working-content">- {presence.mounted ? <WorkingIndicator key={active.bot.startedAt} bot={active.bot} thought={active.thought} /> : null}+ {presence.mounted ? <WorkingIndicator bot={active} /> : null}</div></div></div>diff --git a/apps/desktop/src/renderer/views/thread/thread.css b/apps/desktop/src/renderer/views/thread/thread.cssindex 674115f6..59c863d8 100644--- a/apps/desktop/src/renderer/views/thread/thread.css+++ b/apps/desktop/src/renderer/views/thread/thread.css@@ -321,14 +321,14 @@.agent-inset {padding-right: 40px;}-.chat-working, .working-thought {+.chat-working {--working-duration: 0.42s;display: grid;grid-template-rows: 0fr;opacity: 0;transition: grid-template-rows var(--working-duration) var(--spring), opacity var(--working-duration) var(--ease-out);}-.chat-working.shown, .working-thought.shown {+.chat-working.shown {grid-template-rows: 1fr;opacity: 1;}@@ -410,7 +410,7 @@}}@media (prefers-reduced-motion: reduce) {- .chat-working, .chat-working-content, .working-thought {+ .chat-working, .chat-working-content {transition: none;transform: none;}@@ -418,13 +418,3 @@animation: fade-in 0.12s both;}}--.working-thought {- width: 100%;-}-.working-thought-text {- padding: 10px 16px 4px;- white-space: pre-wrap;- overflow-wrap: anywhere;- line-height: 1.5;-}diff --git a/apps/desktop/src/renderer/views/thread/trace-turns.test.ts b/apps/desktop/src/renderer/views/thread/trace-turns.test.tsindex 1c83874d..6b3f4d1c 100644--- a/apps/desktop/src/renderer/views/thread/trace-turns.test.ts+++ b/apps/desktop/src/renderer/views/thread/trace-turns.test.ts@@ -1,6 +1,6 @@import assert from 'node:assert/strict'import { test } from 'node:test'-import { latestThought, runningTurn, scrolledToEnd, traceTurns } from './trace-turns.ts'+import { runningTurn, scrolledToEnd, traceTurns } from './trace-turns.ts'import type { Entry } from '../../../shared/models.ts'const entry = (id: string, turn: number, kind = 'agent', status?: string): Entry => ({@@ -23,11 +23,3 @@ test('the trace follows new steps only while scrolled to the end', () => {assert.equal(scrolledToEnd({ scrollHeight: 1000, scrollTop: 595, clientHeight: 400 }), true)assert.equal(scrolledToEnd({ scrollHeight: 1000, scrollTop: 500, clientHeight: 400 }), false)})--test('thinking preview uses the latest nonempty thought in the active turn', () => {- const entries = [entry('old', 1, 'thought'), entry('first', 2, 'thought'), entry('latest', 2, 'thought'),- entry(' ', 2, 'thought'), entry('tool output', 2, 'tool'), entry('queued', 3, 'user', 'queued')]- assert.equal(latestThought(entries), 'latest')- assert.equal(latestThought([...entries, entry('new turn', 3, 'user')]), undefined)- assert.equal(latestThought([]), undefined)-})diff --git a/apps/desktop/src/renderer/views/thread/trace-turns.ts b/apps/desktop/src/renderer/views/thread/trace-turns.tsindex 7cf070ae..b575de8f 100644--- a/apps/desktop/src/renderer/views/thread/trace-turns.ts+++ b/apps/desktop/src/renderer/views/thread/trace-turns.ts@@ -17,9 +17,3 @@ export function runningTurn(entries: Entry[], working: boolean): number | undefiexport function scrolledToEnd(el: { scrollHeight: number; scrollTop: number; clientHeight: number }) {return el.scrollHeight - el.scrollTop - el.clientHeight < 8}--/** A compact live preview never leaks thoughts from a previous turn or a queued request. */-export function latestThought(entries: Entry[]): string | undefined {- const turn = runningTurn(entries, true)- return entries.findLast((e) => e.turn === turn && e.kind === 'thought' && e.data.text?.trim())?.data.text-}diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swiftindex 843dbdbe..79c90aa0 100644--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift@@ -255,58 +255,26 @@ struct NoticeRow: View {}}-/// The live activity unfolds just the current thinking text, right in the conversation.+/// The bot's current activity and elapsed time.struct WorkingIndicator: View {let bot: Bot- let thought: String?- @State private var expanded = false- @Environment(\.accessibilityReduceMotion) private var reduceMotionvar body: some View {- VStack(alignment: .leading, spacing: 0) {- Button {- withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { expanded.toggle() }- } label: {- HStack(spacing: 8) {- ThinkingOrb(state: bot.needsInput ? .listening : .working, size: 16, color: bot.needsInput ? Palette.warning : Palette.secondary)- Text(bot.activity.isEmpty ? "Working…" : bot.activity)- .font(.subheadline)- .foregroundStyle(bot.needsInput ? Palette.warning : Palette.secondary)- .lineLimit(1)- if let started = bot.startedAt {- Text(Date(milliseconds: started), style: .timer)- .font(.footnote.monospacedDigit())- .foregroundStyle(Palette.tertiary)- }- Image(systemName: "chevron.right")- .rotationEffect(.degrees(expanded ? 90 : 0))- .font(.caption2.weight(.semibold))- .foregroundStyle(Palette.tertiary)- }- .padding(.horizontal, 16)- .padding(.vertical, 12)- .background(Palette.bubbleAgent, in: RoundedRectangle(cornerRadius: 18, style: .continuous))- }- .buttonStyle(.plain)- .accessibilityHint(expanded ? "Hide thinking" : "Show thinking")- .accessibilityValue(expanded ? "Expanded" : "Collapsed")- // Clip only the disclosure, so collapsing text cannot cross the status bubble.- VStack(alignment: .leading, spacing: 0) {- if expanded {- Text(thought ?? "No thinking text yet.")- .font(.footnote)- .foregroundStyle(Palette.secondary)- .textSelection(.enabled)- .frame(maxWidth: .infinity, alignment: .leading)- .fixedSize(horizontal: false, vertical: true)- .padding(.horizontal, 16)- .padding(.top, 10)- .padding(.bottom, 4)- .transition(.opacity)- }+ HStack(spacing: 8) {+ ThinkingOrb(state: bot.needsInput ? .listening : .working, size: 16, color: bot.needsInput ? Palette.warning : Palette.secondary)+ Text(bot.activity.isEmpty ? "Working…" : bot.activity)+ .font(.subheadline)+ .foregroundStyle(bot.needsInput ? Palette.warning : Palette.secondary)+ .lineLimit(1)+ if let started = bot.startedAt {+ Text(Date(milliseconds: started), style: .timer)+ .font(.footnote.monospacedDigit())+ .foregroundStyle(Palette.tertiary)}- .clipped()}+ .padding(.horizontal, 16)+ .padding(.vertical, 12)+ .background(Palette.bubbleAgent, in: RoundedRectangle(cornerRadius: 18, style: .continuous)).frame(maxWidth: .infinity, alignment: .leading).padding(.trailing, 40)}diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swiftindex 01bb1566..2317eea3 100644--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ThreadView.swift@@ -349,7 +349,7 @@ extension ThreadView {// Offline, "working" is only what the computer last said; don't show it as live.if let bot, working {rows.append(ConversationRow("working") {- WorkingIndicator(bot: bot, thought: TraceView.latestThought(model.chat(botId)))+ WorkingIndicator(bot: bot).id(bot.startedAt).padding(.top, 6)})diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/TraceView.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/TraceView.swiftindex e4995852..a3d5a3d6 100644--- a/apps/ios/Kit/Sources/CodyncUI/Thread/TraceView.swift+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/TraceView.swift@@ -45,11 +45,6 @@ public struct TraceView: View {.tracked(.screenViewed(.trace))}- nonisolated static func latestThought(_ entries: [Entry]) -> String? {- let turn = runningTurn(entries, working: true)- return entries.last { $0.turn == turn && $0.kind == "thought" && !($0.data.text ?? "").trimmingCharacters(in: .whitespacesAndNewlines).isEmpty }?.data.text- }-/// The turn running now while the bot works in this chat; a queued message already holds the next turn.nonisolated static func runningTurn(_ entries: [Entry], working: Bool) -> Int64? {working ? entries.filter { $0.data.status != "queued" }.map(\.turn).max() : nildiff --git a/apps/ios/Kit/Tests/CodyncUITests/ChatItemTests.swift b/apps/ios/Kit/Tests/CodyncUITests/ChatItemTests.swiftindex 0620bb5b..253aca19 100644--- a/apps/ios/Kit/Tests/CodyncUITests/ChatItemTests.swift+++ b/apps/ios/Kit/Tests/CodyncUITests/ChatItemTests.swift@@ -76,16 +76,3 @@ import Testing#expect(TraceView.runningTurn(entries, working: true) == 1)#expect(TraceView.runningTurn(entries, working: false) == nil)}--@Test func thinkingPreviewUsesOnlyLatestNonemptyThoughtInRunningTurn() {- func entry(_ text: String, turn: Int64, kind: String, status: String? = nil) -> Entry {- Entry(id: text, seq: 0, botId: "b", rev: 0, kind: kind, turn: turn,- data: EntryData(text: text, status: status), createdAt: 0, updatedAt: 0)- }- let entries = [entry("old", turn: 1, kind: "thought"), entry("latest", turn: 2, kind: "thought"),- entry(" ", turn: 2, kind: "thought"), entry("tool", turn: 2, kind: "tool"),- entry("queued", turn: 3, kind: "user", status: "queued")]- #expect(TraceView.latestThought(entries) == "latest")- #expect(TraceView.latestThought(entries + [entry("new", turn: 3, kind: "user")]) == nil)- #expect(TraceView.latestThought([]) == nil)-}diff --git a/apps/ios/WhatsNew.md b/apps/ios/WhatsNew.mdindex 5c86eb89..c5f630c5 100644--- a/apps/ios/WhatsNew.md+++ b/apps/ios/WhatsNew.md@@ -10,7 +10,7 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o### zh-Hant- 用麥克風聽寫時,麥克風按鈕會變成錄音膠囊:停止鍵、錄了多久,還有跟著你說話起伏的點點-- Bot 工作中時點一下箭頭,就能在對話裡展開簡單的思考文字,再點一次收起+- Bot 工作中會顯示簡潔的動畫、目前動作與經過時間,詳細紀錄可從「完整對話」查看- 麥克風旁的向上箭頭可以選聽寫要用裝置內建語音,還是用你自己的 OpenAI 或 Gemini 金鑰- iPad 接實體鍵盤時,在輸入框按 Return 會換行,⌘↩ 送出- 群組裡被提及的 bot 若正在別的對話忙,群組會顯示它在忙,忙完就回來回答@@ -18,7 +18,7 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o### en-US- While you dictate, the mic turns into a recording pill: a stop button, how long you've been talking, and dots that follow your voice-- Tap the arrow while a bot works to expand its thinking text right in the chat, and tap again to collapse+- While a bot works, see its activity and elapsed time in a compact animated indicator; details remain in Full conversation- The arrow beside the mic picks how dictation hears you: on-device speech, or your own OpenAI or Gemini key- On iPad with a hardware keyboard, Return starts a new line in the message box and ⌘↩ sends- In a group, a bot you mention that's busy in another chat now says so, and answers once it's donediff --git a/docs/architecture/conversation-runtime.md b/docs/architecture/conversation-runtime.mdindex 23d33426..9ffcb4c0 100644--- a/docs/architecture/conversation-runtime.md+++ b/docs/architecture/conversation-runtime.md@@ -7,4 +7,4 @@- **A session that fails** with an internal error its agent gives no category (JSON-RPC `-32603` without `data.errorKind`) is closed right after the turn, when the agent can close and load sessions: Claude's adapter otherwise answers every later prompt on it with "The Claude Agent session has ended". The next message loads it again and the conversation carries on (`acp::may_end_session`).- Bot collaboration: built-in `team` MCP (`chat/team.rs`) lists visible bots and asks one for a reply or sends it an independent message through its actor queue. Asks are separate turns, cycle-checked and cancellable; native subagents stay with the harness. See [docs/features/bot-collaboration.md](../features/bot-collaboration.md).- **Context & memory**: frozen instruction snapshot per session + compaction epoch (Claude gets it as a system prompt), profile edits as update blocks, memory in the host (a layer shared by all bots and one per bot, written by the user, the bots' tools and dreaming), busy-time messages folded into one turn, interrupted turns resumed: [docs/features/context-and-memory.md](../features/context-and-memory.md).-- **Chat shows only**: user messages, the bot's messages (`data.final`: each `send_message` call from the built-in `chat` MCP, Grok Bot's way; a turn that sent none falls back to its last text, unless it reacted to the user's message instead or passed), permission cards, notices. Nothing streams into a bubble; narration, thoughts, tool calls, plans are trace entries (Full conversation sheet; the live activity can also unfold its latest thinking text inline): [docs/features/chat-messages.md](../features/chat-messages.md).+- **Chat shows only**: user messages, the bot's messages (`data.final`: each `send_message` call from the built-in `chat` MCP, Grok Bot's way; a turn that sent none falls back to its last text, unless it reacted to the user's message instead or passed), permission cards, notices. Nothing streams into a bubble; narration, thoughts, tool calls, plans are trace entries (Full conversation sheet): [docs/features/chat-messages.md](../features/chat-messages.md).diff --git a/docs/features/chat-messages.md b/docs/features/chat-messages.mdindex 3fc18fc0..9ac31488 100644--- a/docs/features/chat-messages.md+++ b/docs/features/chat-messages.md@@ -63,15 +63,13 @@ it has no pointer tooltip or link-opening action.## While it worksThe working line under the last message shows the bot's activity; composing a `send_message`-reads as **Typing…** (`activity()` in `agent/bot.rs`). Its chevron expands or collapses a plain-text-preview in the conversation: only the latest nonempty `thought` entry from the running turn.-Queued messages do not advance that turn. Until the agent shares text, the preview says-“No thinking text yet.” Each new turn starts collapsed.+reads as **Typing…** (`activity()` in `agent/bot.rs`). The activity indicator shows an animated orb,+a short status and elapsed time. It is not interactive and does not expand thinking text.+Replies arrive as complete messages.Full conversation remains available from the conversation menu. It contains narration, allthoughts, tools and previous turns, and follows new steps until the reader scrolls up.-On the terminal, click the activity row or press `>` to toggle the inline preview; `t` still-opens Full conversation, and the working line retains the count of steps so far.+On the terminal, `t` opens Full conversation, and the working line retains the count of steps so far.## Motion and scrollingdiff --git a/host/src/tui/app/input.rs b/host/src/tui/app/input.rsindex 7e7141d5..37a885fd 100644--- a/host/src/tui/app/input.rs+++ b/host/src/tui/app/input.rs@@ -270,7 +270,6 @@ impl App {}KeyCode::Char('{') => self.step_turn(-1),KeyCode::Char('}') => self.step_turn(1),- KeyCode::Char('>') => self.toggle_thinking(),KeyCode::Char('t') => {self.trace = if self.trace == TraceMode::Pane { TraceMode::Off } else { TraceMode::Pane };if self.trace == TraceMode::Off && self.focus == Focus::Trace {@@ -409,7 +408,6 @@ impl App {}Some(Click::Composer) => self.start_typing(),Some(Click::BotChat(entry)) => self.open_bot_chat(&entry),- Some(Click::Thinking) => self.toggle_thinking(),None => {if self.overlays.is_empty() {if self.hits.trace.contains(at) {diff --git a/host/src/tui/app/mod.rs b/host/src/tui/app/mod.rsindex caf76437..7e71af17 100644--- a/host/src/tui/app/mod.rs+++ b/host/src/tui/app/mod.rs@@ -12,14 +12,12 @@ mod navigate;mod new_bot;mod overlay_keys;mod slash;-mod thinking;mod ui;pub use editor::Editor;pub use exchange::{ConversationRow, Exchange, Item, Outcome, conversation, group, rows};pub use model::{After, AgentModel, Bot, Entry, Kind, Mark, ModelOption, Msg, Status};pub use slash::SlashAction;-pub(super) use thinking::{latest_thought, running_turn};pub use ui::{ACTIONS, Action, COLORS, Click, Confirm, ConfirmAct, Dir, FIELDS, FILTERS, Field, Focus, FolderPicker, Form, Goto,GotoItem, GroupField, GroupForm, Hits, NewBot, NewBotField, Overlay, PairCode, SHAPES, Toast, Toggle, TraceMode,@@ -78,8 +76,6 @@ pub struct App {pub chat_scroll: usize,pub trace_scroll: usize,pub trace: TraceMode,- /// The bot and turn whose inline thinking preview is open.- pub thinking: Option<(String, i64)>,/// Turn shown in the trace; `None` follows the latest.pub trace_turn: Option<i64>,pub compact: bool,@@ -155,7 +151,6 @@ impl App {chat_scroll: 0,trace_scroll: 0,trace: TraceMode::Off,- thinking: None,trace_turn: None,compact: false,overlays: vec![],diff --git a/host/src/tui/app/thinking.rs b/host/src/tui/app/thinking.rsdeleted file mode 100644index e12722de..00000000--- a/host/src/tui/app/thinking.rs+++ /dev/null@@ -1,58 +0,0 @@-//! The inline activity disclosure is presentation state, scoped to one bot and turn.--use super::{App, Entry, Kind, Status};--pub(in crate::tui) fn running_turn(entries: &[&Entry]) -> Option<i64> {- entries.iter().filter(|e| e.data["status"] != "queued").map(|e| e.turn).max()-}--pub(in crate::tui) fn latest_thought<'a>(entries: &[&'a Entry]) -> Option<&'a str> {- let turn = running_turn(entries)?;- entries- .iter()- .rev()- .find(|e| e.turn == turn && e.kind == Kind::Thought && !e.text().trim().is_empty())- .map(|e| e.text())-}--impl App {- pub(super) fn toggle_thinking(&mut self) {- let Some(bot) = self- .bot()- .filter(|b| self.online && b.works_here() && matches!(b.status, Status::Working | Status::NeedsInput))- else {- return;- };- let Some(turn) = running_turn(&self.lane(&bot.id)) else { return };- let key = (bot.id.clone(), turn);- self.thinking = if self.thinking.as_ref() == Some(&key) { None } else { Some(key) };- }-}--#[cfg(test)]-mod tests {- use super::*;- use serde_json::json;-- fn entry(turn: i64, kind: Kind, text: &str, status: &str) -> Entry {- Entry { id: text.into(), seq: 0, turn, kind, data: json!({"text": text, "status": status}), created_at: 0 }- }-- #[test]- fn preview_uses_latest_thought_without_queued_or_tool_text() {- let entries = [- entry(1, Kind::Thought, "earlier", ""),- entry(1, Kind::Thought, "latest", ""),- entry(1, Kind::Tool, "tool output", ""),- entry(2, Kind::User, "next", "queued"),- ];- assert_eq!(latest_thought(&entries.iter().collect::<Vec<_>>()), Some("latest"));- }-- #[test]- fn new_turn_does_not_reuse_previous_thinking() {- let entries =- [entry(1, Kind::Thought, "old", ""), entry(2, Kind::User, "new", ""), entry(2, Kind::Thought, " ", "")];- assert_eq!(latest_thought(&entries.iter().collect::<Vec<_>>()), None);- }-}diff --git a/host/src/tui/app/ui.rs b/host/src/tui/app/ui.rsindex 9668a928..92a642ac 100644--- a/host/src/tui/app/ui.rs+++ b/host/src/tui/app/ui.rs@@ -317,7 +317,6 @@ pub enum Click {},Filter(usize),Composer,- Thinking,/// A bot-message row (entry id): opens the conversation.BotChat(String),}diff --git a/host/src/tui/view/activity.rs b/host/src/tui/view/activity.rsindex f5fdb49e..8d301202 100644--- a/host/src/tui/view/activity.rs+++ b/host/src/tui/view/activity.rs@@ -1,10 +1,9 @@-//! A compact activity row with an optional plain-text thinking preview.+//! The current activity and tool count, with a shortcut to Full conversation.use ratatui::text::{Line, Span};-use super::super::app::{App, Bot, Click, Entry, Kind, latest_thought, running_turn};-use super::super::md::{self, truncate};-use super::buffer::u;+use super::super::app::{App, Bot, Entry, Kind};+use super::super::md::truncate;use super::style::{spin, theme};use super::transcript::{Built, gap, name_style};@@ -12,27 +11,60 @@ pub(super) fn activity(out: &mut Built, app: &App, bot: &Bot, entries: &[&Entry]let t = theme();gap(out);out.lines.push(Line::from(Span::styled(format!(" {}", bot.name), name_style(&bot.color))));- let expanded =- app.thinking.as_ref().is_some_and(|(id, turn)| id == &bot.id && Some(*turn) == running_turn(entries));let text = if bot.activity.is_empty() { "Working…" } else { &bot.activity };- let row = out.lines.len();out.lines.push(Line::from(vec![Span::styled(format!(" {} ", spin(app)), t.secondary),- Span::styled(truncate(text, width.saturating_sub(8)), t.secondary),- Span::styled(if expanded { " v" } else { " >" }, t.dim),+ Span::styled(truncate(text, width.saturating_sub(4)), t.secondary),]));- out.buttons.push((row, 0, u(width), Click::Thinking));- let turn = running_turn(entries);+ let turn = entries.iter().filter(|e| e.data["status"] != "queued").map(|e| e.turn).max();let steps = entries.iter().filter(|entry| Some(entry.turn) == turn && entry.kind == Kind::Tool).count();let hint = if steps == 0 {- " > thinking · t full conversation".to_owned()+ " t full conversation".to_owned()} else {- format!(" {steps} steps so far · > thinking · t full conversation")+ format!(" {steps} steps so far · t full conversation")};out.lines.push(Line::from(Span::styled(hint, t.dim)));- if expanded {- let text = latest_thought(entries).unwrap_or("No thinking text yet.");- let prefix = [Span::raw(" ")];- out.lines.extend(md::wrap(&[Span::styled(text.to_owned(), t.secondary)], width, &prefix, &prefix));+}++#[cfg(test)]+mod tests {+ use super::*;+ use crate::tui::{app::Msg, net::Client};+ use serde_json::json;++ #[test]+ fn activity_shows_current_steps_without_a_disclosure() {+ let (tx, _) = tokio::sync::mpsc::unbounded_channel();+ let mut app = App::new(Client::new("http://127.0.0.1:1", None), tx, String::new());+ app.on_msg(Msg::Event(json!({"type": "bot", "bot": {+ "id": "bot", "name": "Bot", "activity": "Searching files…"+ }})));+ let entries = [+ Entry { id: "old".into(), seq: 1, turn: 1, kind: Kind::Tool, data: json!({}), created_at: 0 },+ Entry { id: "tool".into(), seq: 2, turn: 2, kind: Kind::Tool, data: json!({}), created_at: 0 },+ Entry {+ id: "thought".into(),+ seq: 3,+ turn: 2,+ kind: Kind::Thought,+ data: json!({"text": "Private preview text"}),+ created_at: 0,+ },+ Entry {+ id: "queued".into(),+ seq: 4,+ turn: 3,+ kind: Kind::User,+ data: json!({"status": "queued"}),+ created_at: 0,+ },+ ];+ let mut out = Built { lines: vec![], buttons: vec![], messages: vec![] };+ activity(&mut out, &app, &app.bots["bot"], &entries.iter().collect::<Vec<_>>(), 80);+ let text = out.lines.iter().map(ToString::to_string).collect::<Vec<_>>().join("\n");+ assert!(text.contains("Searching files…"));+ assert!(text.contains("1 steps so far · t full conversation"));+ assert!(!text.contains("Private preview text") && !text.contains("> thinking"));+ assert!(out.buttons.is_empty());}}diff --git a/host/src/tui/view/help.rs b/host/src/tui/view/help.rsindex 4a4f5fd8..8a49f55a 100644--- a/host/src/tui/view/help.rs+++ b/host/src/tui/view/help.rs@@ -9,7 +9,7 @@ use super::buffer::{centered, frame_box, put, u};use super::overlay::field_line;use super::style::theme;-const HELP: [(&str, &str, &str); 64] = [+const HELP: [(&str, &str, &str); 63] = [("MOVE", "j k ↑ ↓", "next / previous bot"),("MOVE", "[ ]", "previous / next bot"),("MOVE", "1…9", "jump to bot 1–9"),@@ -26,7 +26,6 @@ const HELP: [(&str, &str, &str); 64] = [("CHAT", "N", "reject and say why"),("CHAT", "1…9", "pick an approval option"),("CHAT", "s", "stop the bot"),- ("CHAT", ">", "expand / collapse thinking"),("CHAT", "o", "last turn's steps"),("CHAT", "c", "copy the last reply"),("CHAT", "C", "open connection / login request"),