fix(rectification): keep a live analyzing step and drop the range-stop exits
Independent Staging Quality Gate / validate (push) Successful in 9m26s
Independent Staging Quality Gate / publish (push) Successful in 1m57s

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:
Jesse_Chen
2026-09-04 12:46:10 +08:00
co-authored by Cursor
parent fc5eca8c00
commit cfa824994e
13 changed files with 172 additions and 90 deletions
@@ -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,