Skip to content

Bring the Bot activity row back on DSH 0.2.1 - #434

Merged
Fei2411 merged 4 commits into
devfrom
fix/349-activity-row
Oct 22, 2026
Merged

Fei2411 merged 4 commits into
devfrom
fix/349-activity-row

Conversation

@Fei2411

@Fei2411 Fei2411 commented Oct 22, 2026

Copy link
Copy Markdown
Owner

Issue

Fixes #349

Bug: on DSH 0.2.1 the activity row under a Bot's chat (what it is doing, and for how long) never showed, and the sidebar showed no activity for a Bot working in its own chat.

What changed / 改了什么

Three commits, each can be reverted on its own:

  • Mount the row inside a nested running slot: DSH 0.2.1 wraps [data-chat-running], so the row looks for it as a descendant and falls back to the flow's end; a page with no chat flow is reported once as a mount failure.
  • Keep the row when a turn that streamed text starts a tool.
  • Preview what a running Bot is doing in its sidebar row.

Thanks to @Notoonex for the analysis in #349.

Changelog

The activity row under a Bot's chat and the sidebar preview show what a Bot is doing again on DSH 0.2.1.

How I checked it / 怎么验证的

  • npm test (in ds-bot/): 844 pass, 0 fail, 1 platform skip
  • node scripts/build-client.mjs --check
  • npm run lint: 0 errors
  • Smoke test: no src/host/ change
  • On DSH Web 0.2.1-rc.2 a Bot ran a real tool: the row and the sidebar read "查看团队… · 1s" (the shimmer makes a still screenshot unreadable, so none is attached)

Checklist / 检查

  • One issue, one subject. / 只做一件事。
  • src/client/ changed → npm run build ran and client.js is committed. / 改了 src/client/ 就已重新 build 并提交 client.js。
  • No keys, tokens or personal data, also in screenshots. / 没有密钥、token 或个人信息,截图里也没有。
  • No AI tool as author or Co-authored-by. / 没有把 AI 工具写成作者或 Co-authored-by。

The row looked for [data-chat-running] only as a direct child of
[data-chat-flow]; when the shell wraps the slot the row never found a
host and silently never drew. The search is now a descendant one, and
without the slot the row falls back to the flow's tail. A page with no
chat flow at all is a mount failure and is reported once through
noteClientError.

Relates to #349
A turn that streams its reply text first and calls a tool afterwards
lost the activity row the moment text arrived: streaming hid the row
unconditionally. The row now stays while the turn runs as long as no
text is streaming or a tool is in flight; a group relay still hides it,
since the group view shows members speaking on its own.

Relates to #349
A Bot's sidebar row showed its last message while it worked in its own
chat, so the preview looked idle during a turn. When the Bot is running
and an activity is recorded, the row now previews it with the same
workLine a group row uses; an idle Bot keeps the message preview.

Fixes #349
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-22T08:51:52.101796Z fe9656d PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fe9656d1a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

const away = !running && groups.length > 0
const state = botState(running || away, doing, alert)
// A Bot running in its own chat previews what it is doing, like a group's row.
const runningLine = running && doing ? doingLine(doing) : null

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Use actual work details in the sidebar preview

Whenever a Bot runs a tool that activityOf() classifies as searching—including web search, browser, and read tools—doing contains only the generic string searching. Passing that string to workPhrase() treats it as a tool name, matches the generic search pattern, and incorrectly displays “Looking through files…”. Use the structured work.bots[id] entry, which already contains the actual tool and target, for the own-chat preview while retaining activity for the avatar state.

AGENTS.md reference: AGENTS.md:L14-L15

Useful? React with 👍 / 👎.

@Fei2411
Fei2411 merged commit fadcd08 into dev Oct 22, 2026
11 checks passed
@Fei2411
Fei2411 deleted the fix/349-activity-row branch October 22, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant