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
@@ -15,6 +15,7 @@ import {
} from "@/lib/agent-activity-trace";
import {
RECTIFICATION_ACTIVITY_PROGRESS_LABELS,
RECTIFICATION_ANALYZING_LIVE_LABEL,
RECTIFICATION_TOOL_DONE_LABELS,
RECTIFICATION_TOOL_PROGRESS_LABELS,
activityTraceFromReceipt,
@@ -938,8 +939,8 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
});
completedReceipt = receiptFromRectificationActivityState(activityReceiptState);
currentActivity = nextActivityView(currentActivity, {
phase: rectificationToolActivityPhase(tool),
label: rememberLiveActivity(RECTIFICATION_TOOL_DONE_LABELS[tool], tool),
phase: "evidence-validation",
label: rememberLiveActivity(RECTIFICATION_ANALYZING_LIVE_LABEL, null),
completedTrail: rectificationCompletedTrail(activityReceiptState.completedSteps),
});
frames.touch();
@@ -1371,15 +1372,6 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
const collectSpokenPrompt = currentQuestion?.kind === "collect_spoken"
? currentQuestion.prompt
: null;
const showCollectStop = Boolean(
latestLiveQuestion
&& latestLiveQuestion.kind === "collect_spoken"
&& currentQuestion?.focus_id === latestLiveQuestion.focus_id
&& !questionIsAnswered(latestLiveQuestion)
&& !busy
&& !readonly
&& regeneratingMessageKey === null,
);
const adoptedRangeLabel = candidateResult?.credibleRange
? `${candidateResult.credibleRange[0]}${candidateResult.credibleRange[1]}`
: null;
@@ -1459,16 +1451,6 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
void submitStructuredChoice(STOP_ACTION, "stop");
}
function submitCollectStop() {
if (!latestLiveQuestion || latestLiveQuestion.kind !== "collect_spoken") return;
void submitStructuredChoice(STOP_ACTION, "stop", {
focusId: latestLiveQuestion.focus_id,
questionId: latestLiveQuestion.question_id,
probeId: latestLiveQuestion.probe_id,
caseRevision: choiceCard?.case_revision ?? 0,
});
}
const boardPeek = compactBoard && !boardOpen ? (
<RectificationBoardPeek
result={candidateResult}
@@ -1707,16 +1689,6 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
}}
onStop={stopRun}
/>
{showCollectStop && (
<button
type="button"
className="rectification-collect-stop"
disabled={!canSend}
onClick={submitCollectStop}
>
{CHOICE_STOP_LABEL}
</button>
)}
<div className="composer-footer">
<ModelSelector