Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(chat): drop the duplicate in-flight indicator on the thinking phase

M3gA-Minde35ce04a5629
diff --git a/app/src/features/conversations/components/AssistantUiInferenceStatus.test.tsx b/app/src/features/conversations/components/AssistantUiInferenceStatus.test.tsx
index ec26877bbb..f12d3014cc 100644
--- a/app/src/features/conversations/components/AssistantUiInferenceStatus.test.tsx
+++ b/app/src/features/conversations/components/AssistantUiInferenceStatus.test.tsx
@@ -106,7 +106,7 @@ function startTurn(store: ReturnType<typeof buildStore>) {
}
describe('inference status on the assistant-ui chat surface', () => {
- it('shows the reasoning round while the model is thinking', async () => {
+ it('renders nothing while the model is thinking — the library dot owns that gap', async () => {
const store = buildStore();
renderChat(store);
startTurn(store);
@@ -123,7 +123,24 @@ describe('inference status on the assistant-ui chat surface', () => {
);
});
- expect(await screen.findByTestId('inference-status-line')).toHaveTextContent('Thinking... (3)');
+ // `Thinking... (3)` used to render here. It duplicated assistant-ui's own
+ // in-flight marker: `react-markdown/styles/dot.css` paints a pulsing `●`
+ // on `.aui-md[data-status="running"]:empty`, which is live for exactly
+ // this phase. The iteration count was harness telemetry besides.
+ expect(screen.queryByTestId('inference-status-line')).not.toBeInTheDocument();
+
+ // The suppression must be specific to `thinking`, not a dead component:
+ // a `tool_use` phase with no timeline row still has to caption itself, or
+ // this assertion would pass with the whole line removed.
+ act(() => {
+ store.dispatch(
+ setInferenceStatusForThread({
+ threadId: THREAD_ID,
+ status: { phase: 'tool_use', iteration: 3, maxIterations: 8, activeTool: 'shell' },
+ })
+ );
+ });
+ expect(await screen.findByTestId('inference-status-line')).toHaveTextContent('Running command');
});
it('names the running tool when no timeline row carries it', async () => {
@@ -151,15 +168,19 @@ describe('inference status on the assistant-ui chat surface', () => {
renderChat(store);
startTurn(store);
+ // Anchored on `tool_use` with an empty timeline — the phase that still
+ // captions itself. `thinking` renders nothing now, so anchoring there
+ // would leave the assertion below passing from a state where the line was
+ // never present: a guard that cannot fail.
act(() => {
store.dispatch(
setInferenceStatusForThread({
threadId: THREAD_ID,
- status: { phase: 'thinking', iteration: 2, maxIterations: 8 },
+ status: { phase: 'tool_use', iteration: 2, maxIterations: 8, activeTool: 'shell' },
})
);
});
- expect(await screen.findByTestId('inference-status-line')).toHaveTextContent('Thinking... (2)');
+ expect(await screen.findByTestId('inference-status-line')).toHaveTextContent('Running command');
// The tool call lands: the row is projected as a tool part that already
// names the command, so the line must not caption it a second time.
@@ -258,15 +279,18 @@ describe('inference status on the assistant-ui chat surface', () => {
renderChat(store);
startTurn(store);
+ // `tool_use` with no timeline row, for the same reason as above: it is the
+ // phase that still renders, so the disappearance asserted below is a real
+ // transition rather than an absence that was already true.
act(() => {
store.dispatch(
setInferenceStatusForThread({
threadId: THREAD_ID,
- status: { phase: 'thinking', iteration: 1, maxIterations: 8 },
+ status: { phase: 'tool_use', iteration: 1, maxIterations: 8, activeTool: 'shell' },
})
);
});
- expect(await screen.findByTestId('inference-status-line')).toHaveTextContent('Thinking... (1)');
+ expect(await screen.findByTestId('inference-status-line')).toHaveTextContent('Running command');
act(() => {
store.dispatch(endInferenceTurn({ threadId: THREAD_ID }));
diff --git a/app/src/features/conversations/components/AssistantUiInferenceStatus.tsx b/app/src/features/conversations/components/AssistantUiInferenceStatus.tsx
index 95ca7335ec..d1078a4a14 100644
--- a/app/src/features/conversations/components/AssistantUiInferenceStatus.tsx
+++ b/app/src/features/conversations/components/AssistantUiInferenceStatus.tsx
@@ -22,16 +22,27 @@ const selectThreadExtras = (state: AssistantState) => state.thread.extras;
* mic-cloud composer and `/chat` cannot drift apart, and so is the rule for
* when to show it: the `tool_use` / `subagent` phases only restate the running
* row, which this surface already paints as a tool part, so the line would be
- * a duplicate caption under the card. It is kept for `thinking` — the phase
- * with no row of its own, and the one a long turn spends minutes in — and as a
- * fallback whenever the phase's row is not on screen (a restored snapshot, or
- * a row that settled ahead of the status), where `status.activeTool` /
- * `status.activeSubagent` is the only name for the work in flight.
+ * a duplicate caption under the card. It is kept as a fallback whenever the
+ * phase's row is not on screen (a restored snapshot, or a row that settled
+ * ahead of the status), where `status.activeTool` / `status.activeSubagent` is
+ * the only name for the work in flight.
+ *
+ * The `thinking` phase renders NOTHING here. It used to show
+ * `Thinking... (N)` — a pulsing dot plus the harness's iteration counter — but
+ * assistant-ui already marks a minted-and-empty assistant message as in
+ * flight: `@assistant-ui/react-markdown/styles/dot.css` (imported by
+ * `markdown-text.tsx`) paints a pulsing `●` via
+ * `.aui-md[data-status="running"]:empty::after`, and the live tail carries
+ * `status: { type: 'running' }` (`assistantUiMessages.ts`). So the library's
+ * dot covers exactly the pre-first-token gap this line was added for, and ours
+ * was a second indicator stacked under it. The iteration count was harness
+ * telemetry the reader has no use for.
*/
export function AssistantUiInferenceStatus() {
const extras = readOpenHumanThreadExtras(useAuiState(selectThreadExtras));
const status = extras?.inferenceStatus;
if (!status) return null;
+ if (status.phase === 'thinking') return null;
const activeRow =
status.phase === 'subagent'
@@ -39,7 +50,7 @@ export function AssistantUiInferenceStatus() {
: status.phase === 'tool_use'
? extras?.activeToolEntry
: undefined;
- if (status.phase !== 'thinking' && activeRow) return null;
+ if (activeRow) return null;
return (
<InferenceStatusLine
diff --git a/app/src/features/conversations/components/aui/InferenceStatusLine.tsx b/app/src/features/conversations/components/aui/InferenceStatusLine.tsx
index a71b908e73..9b949b8c78 100644
--- a/app/src/features/conversations/components/aui/InferenceStatusLine.tsx
+++ b/app/src/features/conversations/components/aui/InferenceStatusLine.tsx
@@ -1,4 +1,3 @@
-import { useT } from '../../../../lib/i18n/I18nContext';
import type { ToolTimelineEntry } from '../../../../store/chatRuntimeSlice';
import { formatTimelineEntry } from '../../../../utils/toolTimelineFormatting';
@@ -20,25 +19,33 @@ export interface InferenceStatusLineProps {
*
* For the `tool_use` / `subagent` phases this only restates the active row the
* agentic-task-insights timeline already shows, so the caller suppresses it
- * once that timeline is on screen and keeps it for the `thinking` phase (which
- * has no timeline row yet) or when there is no timeline to fall back on.
+ * once that timeline is on screen, and keeps it when there is no timeline row
+ * to fall back on.
+ *
+ * There is deliberately NO `thinking` branch. It rendered `Thinking... (N)`,
+ * which stacked a second indicator under assistant-ui's own: the library's
+ * `react-markdown/styles/dot.css` paints a pulsing `●` on
+ * `.aui-md[data-status="running"]:empty`, which is live for precisely the
+ * pre-first-token gap this line was covering. The `(N)` was the harness's
+ * iteration counter — internal telemetry, not something a reader can act on.
+ * `AssistantUiInferenceStatus` returns null for that phase before reaching
+ * here; this component has no translation for it either.
*/
export function InferenceStatusLine({
status,
activeToolEntry,
activeSubagentEntry,
}: InferenceStatusLineProps) {
- const { t } = useT();
+ // No `useT` here any more: the only translated strings this component had
+ // were the `thinking` ones, and both keys are gone. The `tool_use` /
+ // `subagent` captions come from `formatTimelineEntry`, which localises the
+ // row title itself.
return (
<div
data-testid="inference-status-line"
className="flex items-center gap-2 px-1 py-1.5 text-xs text-content-muted">
<span className="inline-block w-2 h-2 rounded-full bg-primary-400 animate-pulse" />
<span>
- {status.phase === 'thinking' &&
- (status.iteration > 0
- ? t('chat.thinkingIteration').replace('{n}', String(status.iteration))
- : t('chat.thinkingDots'))}
{status.phase === 'tool_use' &&
`${
formatTimelineEntry(
diff --git a/app/src/lib/i18n/ar.ts b/app/src/lib/i18n/ar.ts
index 833b1c4255..4175489737 100644
--- a/app/src/lib/i18n/ar.ts
+++ b/app/src/lib/i18n/ar.ts
@@ -2274,8 +2274,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'محادثة جديدة (/new)',
'chat.new': 'جديد',
'chat.failedToLoadMessages': 'فشل تحميل الرسائل',
- 'chat.thinkingIteration': 'جارٍ التفكير... ({n})',
- 'chat.thinkingDots': 'جارٍ التفكير...',
'chat.approachingLimit': 'الاقتراب من حد الاستخدام',
'chat.approachingLimitMsg': 'لقد استخدمت {pct}% من حصتك المتاحة.',
'chat.upgrade': 'الترقية',
diff --git a/app/src/lib/i18n/bn.ts b/app/src/lib/i18n/bn.ts
index 12670e673e..0b0b39bd41 100644
--- a/app/src/lib/i18n/bn.ts
+++ b/app/src/lib/i18n/bn.ts
@@ -2331,8 +2331,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'নতুন থ্রেড (/new)',
'chat.new': 'নতুন',
'chat.failedToLoadMessages': 'বার্তা লোড করতে ব্যর্থ',
- 'chat.thinkingIteration': 'ভাবছে... ({n})',
- 'chat.thinkingDots': 'ভাবছে...',
'chat.approachingLimit': 'ব্যবহার সীমার কাছাকাছি',
'chat.approachingLimitMsg': 'আপনি আপনার উপলব্ধ কোটার {pct}% ব্যবহার করেছেন।',
'chat.upgrade': 'আপগ্রেড করুন',
diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.ts
index 5a6fef5b04..42f7c68893 100644
--- a/app/src/lib/i18n/de.ts
+++ b/app/src/lib/i18n/de.ts
@@ -2398,8 +2398,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'Neuer Thread (/new)',
'chat.new': 'Neu',
'chat.failedToLoadMessages': 'Nachrichten konnten nicht geladen werden',
- 'chat.thinkingIteration': 'Denken... ({n})',
- 'chat.thinkingDots': 'Denken...',
'chat.approachingLimit': 'Das Nutzungslimit nähert sich',
'chat.approachingLimitMsg': 'Du hast {pct} % deines verfügbaren Kontingents verwendet.',
'chat.upgrade': 'Upgrade',
diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.ts
index 1138d031e8..ef37fe6b0f 100644
--- a/app/src/lib/i18n/en.ts
+++ b/app/src/lib/i18n/en.ts
@@ -2582,8 +2582,6 @@ const en: TranslationMap = {
'chat.newThreadShortcut': 'New thread (/new)',
'chat.new': 'New',
'chat.failedToLoadMessages': 'Failed to load messages',
- 'chat.thinkingIteration': 'Thinking... ({n})',
- 'chat.thinkingDots': 'Thinking...',
'chat.approachingLimit': 'Approaching usage limit',
'chat.approachingLimitMsg': 'You have used {pct}% of your available quota.',
'chat.upgrade': 'Upgrade',
diff --git a/app/src/lib/i18n/es.ts b/app/src/lib/i18n/es.ts
index 3181c4d878..2b143f276e 100644
--- a/app/src/lib/i18n/es.ts
+++ b/app/src/lib/i18n/es.ts
@@ -2375,8 +2375,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'Nuevo hilo (/new)',
'chat.new': 'Nuevo',
'chat.failedToLoadMessages': 'No se pudieron cargar los mensajes',
- 'chat.thinkingIteration': 'Pensando... ({n})',
- 'chat.thinkingDots': 'Pensando...',
'chat.approachingLimit': 'Acercándote al límite de uso',
'chat.approachingLimitMsg': 'Has usado el {pct}% de tu cuota disponible.',
'chat.upgrade': 'Mejorar plan',
diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.ts
index 617c4f74df..ec8712a377 100644
--- a/app/src/lib/i18n/fr.ts
+++ b/app/src/lib/i18n/fr.ts
@@ -2395,8 +2395,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'Nouveau fil (/new)',
'chat.new': 'Nouveau',
'chat.failedToLoadMessages': 'Échec du chargement des messages',
- 'chat.thinkingIteration': 'Réflexion… ({n})',
- 'chat.thinkingDots': 'Réflexion…',
'chat.approachingLimit': "Limite d'utilisation proche",
'chat.approachingLimitMsg': 'Tu as utilisé {pct}% de ton quota disponible.',
'chat.upgrade': 'Passer à la version supérieure',
diff --git a/app/src/lib/i18n/hi.ts b/app/src/lib/i18n/hi.ts
index f7cb71e1f1..f682bc9ce4 100644
--- a/app/src/lib/i18n/hi.ts
+++ b/app/src/lib/i18n/hi.ts
@@ -2330,8 +2330,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'नई थ्रेड (/new)',
'chat.new': 'नई',
'chat.failedToLoadMessages': 'मैसेज लोड नहीं हो पाए',
- 'chat.thinkingIteration': 'सोच रहा है... ({n})',
- 'chat.thinkingDots': 'सोच रहा है...',
'chat.approachingLimit': 'उपयोग सीमा के करीब',
'chat.approachingLimitMsg': 'आपने अपने उपलब्ध कोटे का {pct}% इस्तेमाल कर लिया है।',
'chat.upgrade': 'अपग्रेड करें',
diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.ts
index a782252be1..742f06a366 100644
--- a/app/src/lib/i18n/id.ts
+++ b/app/src/lib/i18n/id.ts
@@ -2341,8 +2341,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'Thread baru (/new)',
'chat.new': 'Baru',
'chat.failedToLoadMessages': 'Gagal memuat pesan',
- 'chat.thinkingIteration': 'Berpikir... ({n})',
- 'chat.thinkingDots': 'Berpikir...',
'chat.approachingLimit': 'Mendekati batas pemakaian',
'chat.approachingLimitMsg': 'Anda telah memakai {pct}% dari kuota yang tersedia.',
'chat.upgrade': 'Tingkatkan',
diff --git a/app/src/lib/i18n/it.ts b/app/src/lib/i18n/it.ts
index 7fa87e5a22..9e6897c4bb 100644
--- a/app/src/lib/i18n/it.ts
+++ b/app/src/lib/i18n/it.ts
@@ -2373,8 +2373,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'Nuovo thread (/new)',
'chat.new': 'Nuovo',
'chat.failedToLoadMessages': 'Impossibile caricare i messaggi',
- 'chat.thinkingIteration': 'Sto pensando... ({n})',
- 'chat.thinkingDots': 'Sto pensando...',
'chat.approachingLimit': 'Limite di utilizzo in avvicinamento',
'chat.approachingLimitMsg': 'Hai usato il {pct}% della tua quota disponibile.',
'chat.upgrade': 'Aggiorna',
diff --git a/app/src/lib/i18n/ko.ts b/app/src/lib/i18n/ko.ts
index 539c32d135..a2c739dd08 100644
--- a/app/src/lib/i18n/ko.ts
+++ b/app/src/lib/i18n/ko.ts
@@ -2300,8 +2300,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': '새 스레드 (/new)',
'chat.new': '새로 만들기',
'chat.failedToLoadMessages': '메시지를 불러오지 못했습니다',
- 'chat.thinkingIteration': '생각 중... ({n})',
- 'chat.thinkingDots': '생각 중...',
'chat.approachingLimit': '사용 한도에 가까워지고 있습니다',
'chat.approachingLimitMsg': '사용 가능한 할당량의 {pct}%를 사용했습니다.',
'chat.upgrade': '업그레이드',
diff --git a/app/src/lib/i18n/pl.ts b/app/src/lib/i18n/pl.ts
index 858f6a8f92..d8d04a3514 100644
--- a/app/src/lib/i18n/pl.ts
+++ b/app/src/lib/i18n/pl.ts
@@ -2357,8 +2357,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'Nowy wątek (/new)',
'chat.new': 'Nowy',
'chat.failedToLoadMessages': 'Nie udało się wczytać wiadomości',
- 'chat.thinkingIteration': 'Myślę... ({n})',
- 'chat.thinkingDots': 'Myślę...',
'chat.approachingLimit': 'Zbliżasz się do limitu',
'chat.approachingLimitMsg': 'Wykorzystano {pct}% dostępnego limitu.',
'chat.upgrade': 'Podnieś plan',
diff --git a/app/src/lib/i18n/pt.ts b/app/src/lib/i18n/pt.ts
index c542e84946..e4fe461abd 100644
--- a/app/src/lib/i18n/pt.ts
+++ b/app/src/lib/i18n/pt.ts
@@ -2372,8 +2372,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'Nova conversa (/new)',
'chat.new': 'Nova',
'chat.failedToLoadMessages': 'Falha ao carregar mensagens',
- 'chat.thinkingIteration': 'Pensando... ({n})',
- 'chat.thinkingDots': 'Pensando...',
'chat.approachingLimit': 'Aproximando-se do limite de uso',
'chat.approachingLimitMsg': 'Você usou {pct}% da sua cota disponível.',
'chat.upgrade': 'Fazer upgrade',
diff --git a/app/src/lib/i18n/ru.ts b/app/src/lib/i18n/ru.ts
index f955c5488d..606d75a7d0 100644
--- a/app/src/lib/i18n/ru.ts
+++ b/app/src/lib/i18n/ru.ts
@@ -2350,8 +2350,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': 'Новый чат (/new)',
'chat.new': 'Новый',
'chat.failedToLoadMessages': 'Не удалось загрузить сообщения',
- 'chat.thinkingIteration': 'Думаю... ({n})',
- 'chat.thinkingDots': 'Думаю...',
'chat.approachingLimit': 'Лимит использования близко',
'chat.approachingLimitMsg': 'Ты использовал {pct}% доступной квоты.',
'chat.upgrade': 'Улучшить',
diff --git a/app/src/lib/i18n/zh-CN.ts b/app/src/lib/i18n/zh-CN.ts
index aeeab7e87b..7486196c37 100644
--- a/app/src/lib/i18n/zh-CN.ts
+++ b/app/src/lib/i18n/zh-CN.ts
@@ -2179,8 +2179,6 @@ const messages: TranslationMap = {
'chat.newThreadShortcut': '新建对话',
'chat.new': '新建',
'chat.failedToLoadMessages': '加载消息失败',
- 'chat.thinkingIteration': '思考中...({n})',
- 'chat.thinkingDots': '思考中...',
'chat.approachingLimit': '接近使用限制',
'chat.approachingLimitMsg': '你已使用了可用配额的{pct}%。',
'chat.upgrade': '升级',