Merge origin/staging into consultation family-contract fix.
Independent Staging Quality Gate / validate (push) Successful in 11m16s
Independent Staging Quality Gate / publish (push) Successful in 34m6s

Keep BUG-628 collect-chip history and add BUG-630 natal homepage contract fix.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-09-09 22:49:14 +08:00
co-authored by Cursor
11 changed files with 171 additions and 64 deletions
+1 -1
View File
@@ -252,7 +252,7 @@ The birth-time rectification session is the consultation transcript plus a house
- **Life-event evidence:** after deterministic questionnaire completion, render three structured event rows by default and allow up to six. Each row uses a domain select, a precision select, and a matching year/month/day control; free-form descriptions are not part of scoring.
- **Candidate result:** keep the reported range, candidate interval, and active-time status visually separate. Delivery shows one range card: title (range + event count), up to three compare columns (time, relative likelihood, D9/D10/nakshatra traits, event-fit counts, next-12-month windows, “更像这个”), and the representative-minute boundary. An eight-method report sits in a closed `<details>` fold. Support numbers stay on the house board. Low confidence keeps evidence editing open; medium offers save or add evidence; high uses a separate confirmation action and never labels a column as the true birth time.
- **Evidence accessibility:** every row keeps visible labels, validation errors use live regions, add/remove controls retain 44px targets, and scoring/confirmation loading states disable duplicate submission without hiding the existing evidence.
- **One-question guide:** the guided journey renders only the persisted `nextAction` and one server-selected question. A deterministic question is visible immediately; Agent wording may replace it without changing the question identity, domain, precision request, progress, or permissions. The composer explicitly permits an approximate year. Spoken collect, when the focus is live and the turn is not busy, shows two 44px secondary buttons under the spoken question in the same assistant bubble, class `rectification-collect-reply` (not `rectification-step-state`): 「没有」 posts the same declined path as typing 没有; 「记不清」 posts skipped. The composer never hosts those chips. Stop on spoken collect is not a composer button: `CHOICE_STOP_LABEL` (“先这样,先看当前范围”) stays on choice cards, and generating turns keep “停止回答”. The readonly range line is a status sentence, not a stop control. Discriminator cards fold “为什么问这题” under the stem. Hovering or selecting an option does not reveal an `answer_impact` time line. The method sentence (`vargaSentence`) lives in the expanded activity timeline, not in the spoken bubble. The composer has no `rectification-step-state` status sentence and no `rectification-composer-meta`.
- **One-question guide:** the guided journey renders only the persisted `nextAction` and one server-selected question. A deterministic question is visible immediately; Agent wording may replace it without changing the question identity, domain, precision request, progress, or permissions. The composer explicitly permits an approximate year. Spoken collect does not render skip chips; typing 「没有」 still declines the domain and 「记不清」 still skips it. Stop on spoken collect is not a composer button: `CHOICE_STOP_LABEL` (“先这样,先看当前范围”) stays on choice cards, and generating turns keep “停止回答”. The readonly range line is a status sentence, not a stop control. Discriminator cards fold “为什么问这题” under the stem. Hovering or selecting an option does not reveal an `answer_impact` time line. The method sentence (`vargaSentence`) lives in the expanded activity timeline, not in the spoken bubble. The composer has no `rectification-step-state` status sentence and no `rectification-composer-meta`.
- **Draft review:** natural-language answers become one inline review card. The evidence domain is read-only and uses its Chinese label; precision controls which exact year, month, or day input is available. Incomplete drafts keep edit and skip paths visible, while confirmation is disabled until the structured date is valid. Status and errors use polite or assertive live regions without clearing the persisted journey.
- **Scoring and retry:** `score_pending` is a quiet progress surface with cancellable bounded polling and no manual compare control. `retry_scoring` preserves the confirmed evidence and exposes one explicit retry action. Refresh and device changes resume from the persisted action rather than inferring progress from copy.
- **Guided candidate states:** low confidence presents the saved candidate range and either another evidence question or a safe finish; medium confidence can save the range but never apply a representative minute; high confidence names both “候选时间” and “当前排盘使用时间” before explicit confirmation; ready states that the current chart time changed while the original report remains preserved. No state calls a candidate the true birth minute.
+1 -1
View File
@@ -45,7 +45,7 @@ Jyotisha 的可见文案是产品的一部分。正确性红线(真实性、
| 生成中输入框变灰,回车没反应 | 生成中仍可打字;回车后显示「已排队,回答结束后发出」,可撤回 | 对标主流对话产品,焦点不丢。 |
| 停止后出现红色告警条 | 已停止,已生成的内容保留;本次不会扣点。 | 停止是用户动作,不是出错。 |
| 也可以再说一件你记得大概时间的事。 | 能分开候选的问题已经问完,先按现有材料给你结果。 / 还差带月份的经历,领域不限。 | 采集问完后交付或说清门槛,不再开放采集。 |
| 口述采集没有停止按钮,范围小字不可点 | 选择题卡内有「先这样,先看当前范围」;生成中有「停止回答」。口述采集问题下方是「没有」「记不清」两个 44px 次要按钮,不是先这样,也不挂在输入框上方。范围小字是状态句,不可点。 | 没有=拒答,记不清=本会话先放着。 |
| 口述采集没有停止按钮,范围小字不可点 | 选择题卡内有「先这样,先看当前范围」;生成中有「停止回答」。口述采集只有输入框,没有「没有」「记不清」芯片,也不挂在输入框上方。范围小字是状态句,不可点。 | 想跳过可以打字「没有」或「记不清」。 |
| 只报一件后追问「还有吗,还能想起别的吗」 | 下一问仍是既有逐领域采集。第一道题干末尾由服务端加一次「想到别的也可以一起说。」 | 邀请不是要求;不插追问轮,也不重复开场。 |
| 点选后旁白写「04:3104:39 这段领先,05:0005:07 这段落后」 | 已记录,范围收到 04:31–04:39。 | 旁白只说范围变没变。领先/落后留在卡内「答了会怎样」,不进气泡。 |
| 每轮只有技法清单,不知道现在第几步 | 输入框上方有「第 N 步 · 原因 · 下一步」。 | 用户始终看得见该做什么。 |
-12
View File
@@ -3105,18 +3105,6 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class
font-weight: 600;
line-height: 1.55;
}
.rectification-collect-replies {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
}
.rectification-collect-reply {
min-height: 44px;
min-width: 44px;
width: auto;
flex: 0 0 auto;
padding: 0 var(--space-4);
}
/* The gap between a settled turn and its next question, as the last entry of the
transcript: a live timeline row while refetching, then copy and a reload. */
.rectification-question-gap {
@@ -187,34 +187,6 @@ function RectificationReadonlyRange({
);
}
function CollectSpokenReplies({
onChoose,
}: Readonly<{
onChoose: (text: "没有" | "记不清") => void;
}>) {
return (
<div className="rectification-collect-replies" role="group" aria-label="采集题快捷回答">
<Button
type="button"
variant="outline"
className="rectification-collect-reply"
onClick={() => onChoose("没有")}
>
</Button>
<Button
type="button"
variant="outline"
className="rectification-collect-reply"
onClick={() => onChoose("记不清")}
>
</Button>
</div>
);
}
type RectificationAgenticChatProps = Readonly<{
caseId: string;
sessionId: string;
@@ -1701,9 +1673,6 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
onStop={submitStop}
/>
)}
{liveQuestion && question.kind === "collect_spoken" && (
<CollectSpokenReplies onChoose={(text) => void send("message", text)} />
)}
{question.status === "skipped" && (
<p className="rectification-question-skipped" role="status">
{savedTime ? `已跳过(已采用 ${savedTime}` : "已跳过"}
@@ -116,9 +116,9 @@ test("cases current_question remains the submit contract, not a visual slot", ()
const wrap = chat.slice(chat.indexOf("className=\"composer-wrap\""), chat.indexOf("className=\"composer-footer\""));
assert.doesNotMatch(wrap, /rectification-collect-stop/);
assert.doesNotMatch(wrap, /CHOICE_STOP_LABEL/);
// 旧:输入框上方两个 44px 次要按钮「没有」「记不清」(BUG-605
// 新:同一组按钮挂在问题气泡 afterAnswer 里,composer 不再托管
// 原因:BUG-618;不得复用 rectification-step-state
// 旧:口述采集挂「没有」「记不清」芯片BUG-605 / BUG-618
// 新:芯片全部去掉;打字「没有 / 记不清」仍走短路
// 原因:BUG-628,用户一致差评
assert.doesNotMatch(wrap, /rectification-collect-replies/);
assert.doesNotMatch(wrap, /rectification-collect-reply/);
assert.doesNotMatch(wrap, /send\("message", "没有"\)/);
@@ -127,18 +127,18 @@ test("cases current_question remains the submit contract, not a visual slot", ()
chat.indexOf("const afterAnswer = question"),
chat.indexOf("key={message.renderKey}"),
);
assert.match(afterAnswer, /CollectSpokenReplies/);
assert.match(afterAnswer, /send\("message", text\)/);
assert.match(chat, /function CollectSpokenReplies/);
assert.match(chat, /rectification-collect-replies/);
assert.match(chat, /rectification-collect-reply/);
assert.match(chat, /onChoose\("没有"\)/);
assert.match(chat, /onChoose\("记不清"\)/);
assert.match(chat, />[\s\n]*没有[\s\n]*</);
assert.match(chat, />[\s\n]*记不清[\s\n]*</);
assert.match(chat, /liveQuestion && question.kind === "collect_spoken"/);
assert.doesNotMatch(afterAnswer, /CollectSpokenReplies/);
assert.doesNotMatch(afterAnswer, /shouldShowCollectSpokenReplies/);
assert.doesNotMatch(chat, /function CollectSpokenReplies/);
assert.doesNotMatch(chat, /rectification-collect-replies/);
assert.doesNotMatch(chat, /rectification-collect-reply/);
assert.doesNotMatch(chat, /onChoose\("没有"\)/);
assert.doesNotMatch(chat, /onChoose\("记不清"\)/);
assert.doesNotMatch(chat, />[\s\n]*没有[\s\n]*</);
assert.doesNotMatch(chat, />[\s\n]*记不清[\s\n]*</);
const styles = readFileSync(new URL("../src/app/globals.css", import.meta.url), "utf8");
assert.match(styles, /\.rectification-collect-reply \{[\s\S]*min-height:\s*44px/);
assert.doesNotMatch(styles, /\.rectification-collect-replies/);
assert.doesNotMatch(styles, /\.rectification-collect-reply/);
assert.equal(parseRectificationChoiceCard(COLLECT_GET_QUESTION), null);
});