Show a reply's steps, and catch up on a reply whose live push was missed

A reply that works through tools now shows its latest tool step under
"is thinking…" (not its closing note, which is the answer). While a reply
is due, the open conversation checks the session's latest messages every
few seconds (api/admin/bots/session-messages) and replays any it missed
as server:bot-message, so the thread, rail and unread all take it and the
thinking row can't stay up until a reload. MCP and custom tool steps read
in words ("Using Exa search (web search exa)").

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-19 16:28:53 +01:00
co-authored by Claude Opus 5.5
parent 425ae723cf
commit 61098a114c
11 changed files with 238 additions and 11 deletions
@@ -16,6 +16,10 @@ type Props = {
* The latest step of the bot's active task.
*/
progress?: string | null;
/**
* The latest step of the reply running in this conversation.
*/
reply_progress?: string | null;
/**
* The thread's last message is the user's, so a reply is due here.
*/
@@ -29,13 +33,13 @@ type Props = {
/**
* Under the last message while the bot is working on a reply or a task
* (or waiting for a model or its computer), so slow work doesn't look like
* none. A task shows its latest step. The bot's face is one per user,
* none. A task or a reply shows its latest step. The bot's face is one per user,
* shared by all their sessions with it, so a reply shows from the thread
* alone: every user message queues one, so while the user has the last
* word a reply is due here, even while the bot works elsewhere. Only the
* waits (for a model, for its computer) come from the face.
*/
export default function BotThinkingRow({ bot, progress, awaiting_reply, has_task }: Props) {
export default function BotThinkingRow({ bot, progress, reply_progress, awaiting_reply, has_task }: Props) {
const name = bot.name || "The bot";
const asleep = bot.face == "asleep";
const waiting_model = asleep && bot.status_line == BotWaitingStatusLine && Boolean(awaiting_reply || has_task);
@@ -53,7 +57,7 @@ export default function BotThinkingRow({ bot, progress, awaiting_reply, has_task
: working
? `${name} is working…`
: `${bot.status_line}…`;
const detail = working ? progress : null;
const detail = working ? progress : thinking ? reply_progress : null;
return (
<Row role="status" className="w-full gap-3! flex-nowrap items-center">
@@ -14,6 +14,10 @@ type Props = {
* The latest step of the bot's active task, shown while it works.
*/
progress?: string | null;
/**
* The latest step of the reply running here, shown while it thinks.
*/
reply_progress?: string | null;
/**
* This session has an active task.
*/
@@ -26,7 +30,7 @@ type Props = {
* While the bot works on a reply or a task, a status row sits under the
* last one.
*/
export default function MessageThread({ bot, messages, progress, has_task }: Props) {
export default function MessageThread({ bot, messages, progress, reply_progress, has_task }: Props) {
const groups = groupMessages({ messages });
return (
@@ -47,6 +51,7 @@ export default function MessageThread({ bot, messages, progress, has_task }: Pro
<BotThinkingRow
bot={bot}
progress={progress}
reply_progress={reply_progress}
awaiting_reply={messages[messages.length - 1]?.author == "user"}
has_task={has_task}
/>