feat(consult): show the queued row from the send frame; only smalltalk replies are quiet (T1, BUG-1074)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0199rbQDTsUbCVw84wc8BTFe
This commit is contained in:
Jesse_Chen
2026-09-28 09:09:41 +08:00
co-authored by Claude Fable 5.1
parent 584ad05c36
commit 86d99115c6
7 changed files with 45 additions and 9 deletions
@@ -67,7 +67,11 @@ test("the timeline collapses in place with a 180ms height transition and honours
const live = renderToString(createElement(ConsultationRunTimeline, { rows: [], live: true }));
assert.match(live, /aria-expanded="true"/);
assert.match(live, /正在处理…/);
// 原值: /正在处理…/
// 新值: /收到,正在看你的问题…/
// 原因: TASK-consult-first-frame-and-pacing-20260928 D1 / BUG-1074:排队行从发送那一帧起可见,文案与服务端首帧一致
assert.match(live, /收到,正在看你的问题…/);
assert.doesNotMatch(live, /正在处理…/);
assert.match(live, /inline-spinner/);
const liveAfterTool = renderToString(createElement(ConsultationRunTimeline, {
rows: [{ id: "read", kind: "calculate", status: "done", label: "读取校正记录" }],
@@ -14,8 +14,20 @@ test("settled and streaming smalltalk render text without thinking, activity or
assert.doesNotMatch(html, /consultation-thinking-report|agent-activity|must stay hidden|已完成|技法|正在分析/);
}
});
test("classification wait does not invent a thinking step before any activity", () => {
// 原值: 分类结果回来之前整行静默——不渲染时间线,不出现「正在处理 / 正在分析」
// 新值: 从发送那一帧起就渲染时间线的排队行「收到,正在看你的问题…」;只有 responseKind 为 smalltalk 的行才静默
// 原因: TASK-consult-first-frame-and-pacing-20260928 D1 / BUG-1074:静默让每一轮在服务端首事件前都是空白(BUG-976 的副作用)
test("the classification wait shows the queued row from the send frame; only a smalltalk reply is quiet", () => {
const message = streamingChatMessageView([{ role: "user", text: "你好" }], true, "", undefined, undefined, undefined, [])!;
const html = renderToStaticMarkup(<ChatMessageRow message={message} />);
assert.doesNotMatch(html, /consultation-thinking-report|正在处理|正在分析|已完成/);
const html = renderToStaticMarkup(<ChatMessageRow message={message} showActivity />);
assert.match(html, /consultation-thinking-report/);
assert.match(html, /收到,正在看你的问题…/);
assert.match(html, /inline-spinner/);
assert.doesNotMatch(html, /已完成|正在处理…/);
// No invented step: the queued row is the only row, and it is not a think or write step.
assert.equal((html.match(/consultation-run-timeline__row/g) ?? []).length, 1);
const smalltalk = streamingChatMessageView([{ role: "user", text: "你好" }], true, "", undefined, undefined, undefined, [], "smalltalk")!;
const quiet = renderToStaticMarkup(<ChatMessageRow message={smalltalk} showActivity />);
assert.doesNotMatch(quiet, /consultation-thinking-report|收到,正在看你的问题|正在分析|已完成/);
});