fix(rectification): ask tie-break questions before the range card (BUG-685/686/687)

Close leads hold delivery until unused D9/D10 style questions are asked. Tie-break POST merges the new turn into the transcript. Range copy no longer lists declined lines.
This commit is contained in:
jesse-ux
2026-09-14 18:23:54 +08:00
parent 1c424bf6d5
commit 7f28bfecbb
22 changed files with 833 additions and 86 deletions
@@ -621,7 +621,12 @@ test("time-selection cards use server adoption state and stay mutually exclusive
// 保留语义:卡片仍由服务端 can_adopt / selection_allowed / receipt 授权,前端不自造候选。
assert.match(chat, /canShowRectificationSelectionCards/);
assert.match(chat, /applyLiveCandidateOffer/);
assert.match(chat, /persistedOfferFromTurn/);
// 原值: chat 源码含 persistedOfferFromTurnmergeTurnQuestions 写在组件内)
// 新值: 合并抽到 rectification-snapshot-messages.ts,仍调用 persistedOfferFromTurn
// 原因: BUG-685 要把新 turn 并进对话区,合并逻辑必须可单测
const snapshotMessages = readFileSync(new URL("../src/lib/rectification-snapshot-messages.ts", import.meta.url), "utf8");
assert.match(snapshotMessages, /persistedOfferFromTurn/);
assert.match(chat, /applySnapshotTurnsToMessages|mergeTurnQuestions/);
assert.match(chat, /resolveSelectionCardMessageKey/);
assert.match(chat, /keepSelectionCardsWhileBusy/);
assert.match(chat, /\.reverse\(\)\.find\(\(message\) => message\.candidateOffer\)/);