fix(rectification): keep a live analyzing step and drop the range-stop exits
A completed tool left only checkmarks under 正在分析, so the run looked stuck. The composer and scoring-card 先这样 buttons were unused early exits. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import test from "node:test";
|
||||
import { createElement } from "react";
|
||||
import { renderToString } from "react-dom/server";
|
||||
|
||||
import { ConsultationRunTimeline, timelineSummaryLabel } from "../src/components/consultation-run-timeline.tsx";
|
||||
import { ConsultationRunTimeline, timelineSummaryLabel, visibleTimelineRows } from "../src/components/consultation-run-timeline.tsx";
|
||||
import { latestAssistantView, type ChatMessage } from "../src/lib/chat-message-view.ts";
|
||||
|
||||
const read = (path: string) => readFileSync(new URL(`../${path}`, import.meta.url), "utf8");
|
||||
@@ -69,6 +69,17 @@ test("the timeline collapses in place with a 180ms height transition and honours
|
||||
assert.match(live, /aria-expanded="true"/);
|
||||
assert.match(live, /正在处理…/);
|
||||
assert.match(live, /inline-spinner/);
|
||||
const liveAfterTool = renderToString(createElement(ConsultationRunTimeline, {
|
||||
rows: [{ id: "read", kind: "calculate", status: "done", label: "读取校正记录" }],
|
||||
live: true,
|
||||
}));
|
||||
assert.match(liveAfterTool, /读取校正记录/);
|
||||
assert.match(liveAfterTool, /正在分析…/);
|
||||
assert.match(liveAfterTool, /inline-spinner/);
|
||||
assert.deepEqual(
|
||||
visibleTimelineRows([{ id: "read", kind: "calculate", status: "done", label: "读取校正记录" }], true).map((row) => row.status),
|
||||
["done", "live"],
|
||||
);
|
||||
const settled = renderToString(createElement(ConsultationRunTimeline, {
|
||||
rows: [{ id: "method", kind: "method", status: "done", label: "已加载方法" }],
|
||||
live: false,
|
||||
|
||||
Reference in New Issue
Block a user