Repository navigation
fix(chat): busy-ack composes a natural line from the message and running tool (#1629) - #1630
Merged
Merged
Conversation
Collaborator
Author
|
Verdict: PASS at 69a9b2b Ran at this tip: Not run: LIVE/prod — out of scope. FindingsNo actionable findings. Host composes the ack deterministically (topic + running tool, message language, rotation, never the chat's previous line); never the old canned sentence; still instant, no model call. Coalesce/clear semantics unchanged. |
This was referenced Oct 29, 2026
HugoXK
pushed a commit
to HugoXK/FlyBot
that referenced
this pull request
Oct 29, 2026
…til the host ack lands (ThinkFlowLab#1656) (ThinkFlowLab#1657) Fixes ThinkFlowLab#1656 Written-by: Dev-1 Owner: Dev Reviewer: Reviewer Tip: ca01a97 Tree: d3c03c7 ## What happens ThinkFlowLab#1630 (merged at 69a9b2b) made the host compose a context-aware busy-ack, but while that ack is still pending (only a local `queued`/`steering` submission) the client drew the fixed `BUSY_ACK_KEY` sentence 「看到了,这步做完就接着处理你这条。」, so users still saw a canned line first. ## What it does now - `busy-ack-logic.js`: `BUSY_ACK_KEY` is removed; `busyAckText(hostAck)` returns the host text (trimmed) or `''`, `busyAckPending(hostAck)` is true until a host line exists; `busyAckVisible` treats a blank host text as no ack. - `BusyAckBubble`: with host text it draws that text in the bubble, unchanged; while pending it draws the Bot's mark plus a three-dot blinking indicator (`.bt-busy-dots`, `aria-busy`, `data-pending`, reduced-motion respected) and no text. The host line replaces it when it lands. - The en/zh dictionary entry for the canned sentence is removed. - Docs: `docs/subsystems/core-client.md` busy-ack paragraph updated. ## Generated artifacts `core/client.js` from `npm --prefix core run build` (`build-client.mjs --check` exit 0); `patches/ds-bot/0001`, `0003`, `0008` and the `patches/ds-bot/files/...` mirrors from `node scripts/ds-bot-patches.mjs generate`; `ds-bot-patches check`: 10 patches apply cleanly, core/ equals ds-bot/ + patches. No generated file hand-edited. ## Tests `core/test/busy-ack-client.test.js` (4 tests): placement, visibility incl. blank host text, pending → no text / host text shown, and the canned zh/en sentence absent from `busy-ack.js`, `busy-ack-logic.js`, `i18n.js` and the bundle `client.js`. - `node --test test/busy-ack-client.test.js test/busy-ack.test.js test/i18n.test.js` (core): 16/16 pass. - `cd core && npm test`: 1924 tests, 1919 pass, 4 fail — `at-menu.test.js`, `ThinkFlowLab#1320 dsh-schedule task type`, `recurring task missed…`, `a loaded DSH clock…`; the same 4 fail on `origin/main` on this box (environment), none touches busy-ack. No screenshot: there is no local render harness for the core chat bubble on this box.
This was referenced Oct 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Owner: Danyang Chen
Reviewer: Reviewer
Written-by: Grok Bot (box-local; no Cursor CloudAgent)
Labels: agent-pr
Fixes #1629
Related: #1586 (busy-ack, merged), #1628 (RunningStatus host, merged — this is rebased on it). #1509 (tool-wait interrupt) is separate, not this PR.
What changed
The busy-ack bubble no longer shows one canned sentence.
core/src/host/busy-ack.jsnow composes the line deterministically from:bash→ 跑命令 / running a command,wait_job→ 等一个任务跑完 / waiting on a job, …),Three variants per shape (topic+tool, topic, tool, bare) × zh/en; the chat's previous ack text is never returned again. Coalescing (3 s) unchanged. Client fallback key (local queue/steer with no host ack yet) is a new line, not the old one.
Why templated, not a model call
The ack must appear immediately while the Bot's own turn is blocked; a model call would queue behind/alongside that turn, cost a call per message, add latency and need a template fallback anyway. A template is instant, free, offline-safe and testable. A cheap model rewrite can be layered later behind the same
composeBusyAckif wanted.Samples
bash→ 看到你说「帮我把周报的数据图再改一下」了,我正在跑命令,弄完马上接上。wait_job→ Noted "Can you also check the deploy logs" — still waiting on a job, then it’s next.web_fetch→ Seen — I’m reading a page, back to you shortly.Verification
core/test/busy-ack.test.jsagainst the old host → fails (no composer; canned text).node --test test/busy-ack.test.js test/busy-ack-client.test.js→ 10 pass / 0 fail.npm --prefix core test→ 1896 pass / 4 fail; the same 4 fail on origin/main on this box (at-menu, dsh-schedule ×2, DSH clock — env, unrelated).Residual