From 1a3e14e72631bceb0741a0d006fe3686d7da3783 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Wed, 2 Sep 2026 11:09:56 +0800 Subject: [PATCH] fix(rectification): show question stems and unblock adopt after occupation Choice legends and spoken collect prompts were hidden after BUG-461, and occupation still blocked canAdopt once dated coverage was done. Restore visible stems and stop polling extra collects when adopt is allowed. Co-authored-by: Cursor --- docs/BUG_HISTORY.md | 35 +++++++ frontend/src/app/globals.css | 23 +++-- .../components/rectification-agentic-chat.tsx | 9 ++ .../components/rectification-choice-card.tsx | 2 +- .../rectification-agentic/v9/answer-choice.ts | 50 ++++++++-- .../v9/method-followup.ts | 14 +-- .../lib/rectification-agentic/v9/turn-exit.ts | 9 +- .../tests/agent-voice-copy-contract.test.ts | 6 +- .../tests/rectification-agentic-entry.test.ts | 6 +- .../tests/rectification-collect-stall.test.ts | 94 ++++++++----------- .../rectification-coverage-collect.test.ts | 35 +++++-- .../tests/rectification-eight-method.test.ts | 12 ++- ...ification-occupation-coverage-exit.test.ts | 4 +- .../rectification-provisional-adopt.test.ts | 60 +++++++++--- .../rectification-range-offer-deadend.test.ts | 59 ++++-------- .../rectification-spoken-collect.test.ts | 7 +- .../rectification-varga-style-copy.test.ts | 11 ++- 17 files changed, 272 insertions(+), 164 deletions(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index f14544bc..13f0ec14 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -6204,6 +6204,7 @@ - 相关记录:BUG-400、BUG-401、BUG-405 - 复发自:BUG-401(卡片隐藏题干)叠加 BUG-405(正文不再复述题干) - 修复版本:待发布 +- 后续复发:BUG-471 ## BUG-407 | 区分题目录被快照投影饿死,低分职业题压过已评分的高分 D24 @@ -7086,6 +7087,7 @@ - 相关记录:BUG-441、BUG-449、BUG-452、BUG-460 - 复发自:BUG-441 - 修复版本:待发布 +- 后续复发:BUG-471 ## BUG-462 | 区间出口采集撞上开场题号后,成功计费轮被误报 run_failed @@ -7118,6 +7120,7 @@ - 相关记录:BUG-456、BUG-460、BUG-462 - 复发自:无(授权策略变更,不是同一实现回归) - 修复版本:待发布 +- 后续复发:BUG-472 ## BUG-464 | 客户端全量覆盖 chat_sessions.messages 导致列表膨胀、写满失败与双标签页丢消息 @@ -7231,3 +7234,35 @@ - 相关记录:BUG-326、BUG-339、BUG-343、BUG-383 - 复发自:BUG-326(render 里写 ref);BUG-339(effect 同步 setState) - 修复版本:待发布 + +## BUG-471 | 选择题干与口述采集题在直播界面消失 + +- 状态:resolved +- 首次发现:2026-09-02 +- 最近更新:2026-09-02 +- 影响面:`rectification-choice-card` legend、`.rectification-question-slot` 口述题干、`shouldPersistFocusPromptTurn`、生时纠正直播对话 +- 用户现象:助手说「界面上继续有下一问 / 有下一步」,下方没有可见问句;D9/D10 风格卡只有 A/B/C/D,看不到题干。用户无法判断要回答什么。 +- 触发条件:Agent 正文只写承接句;`current_question` 已是 `choice` 或 `collect_spoken`;直播 `send()` 不重拉 turns。 +- 根因:BUG-461 为去掉重复采集卡,把选择题 legend 重新设为 `sr-only`,并拆掉口述题槽。题干只指望助手正文或第二条 persist turn。Agent 被禁止复述题干,直播又不合并额外 turn,于是两边都空。 +- 修复:选择题 legend 恢复可见 prompt。`collect_spoken` 在问题槽渲染 prompt 段落(不加灰色「请在下方输入框回答…」、不套选择卡样式)。collect 且本轮已有非空助手正文时,不再追加第二条题干消息。不改 Skill 版本,不打开确认门。 +- 验证:`rectification-agentic-entry`、`rectification-varga-style-copy`、`rectification-spoken-collect`、`agent-voice-copy-contract`。未做登录后的真实页面点选。 +- 防复发:有点选卡时题干必须在卡片上可见,不得再把 `choice_card.prompt` 藏进 `sr-only`。口述采集的真源是 GET `current_question.prompt`,必须在问题槽可见。不得用助手正文字符串判断「有没有问过」。不得恢复灰色 hint。 +- 相关记录:BUG-406、BUG-441、BUG-461、BUG-469 +- 复发自:BUG-406(可见 legend)被 BUG-461 回退;BUG-461 拆掉口述槽后直播无题干 +- 修复版本:待发布 + +## BUG-472 | 职业与财务采集挡住已放行的临时采用卡 + +- 状态:resolved +- 首次发现:2026-09-02 +- 最近更新:2026-09-02 +- 影响面:`BLOCKING_COVERAGE_IDS`、`persistNextInterviewIfIdle`、`persistNextInterviewAfterChoice`、GET overlay `can_adopt` +- 用户现象:区分题已答完、引擎 `accept_allowed=true`、区间已收到约 8 分钟,界面没有时间卡。用户说家里「没有」后只看到一句范围旁白,流程像停住。 +- 触发条件:带日期的 dasha/D9/D10/relatives 已覆盖或拒答,`occupation` 仍 uncovered;耗尽采集按 family→education→finance 继续追问。拒答家人走 `applyCollectFocusDenial` → `persistNextInterviewAfterChoice`,不走 idle 早退。 +- 根因:BUG-463 已把分离/holdout 移出采用门,但仍把 `occupation` 留在 blocking 集合。idle 覆盖完成后不再追问,拒答采集路径仍会落财务题。公开层 `can_adopt=false`,前端不渲染时间卡;口述槽当时也是空的。 +- 修复:blocking 采用门只保留 `dasha_events`、`d9_relationship`、`d10_career`、`relatives`。`occupation` 仍可采集,不再挡住 `canAdopt`。`persistNextInterviewAfterChoice` 与 idle 共用同一早退:已可采用且下一步不是采集/区分/holdout 时,不再落下一问。确认门、3/2 证据下限、引擎 ceiling 不变。不 bump Skill,不改 Python 引擎。 +- 验证:`rectification-provisional-adopt` 事故形状 1c 与 after-choice 早退;`rectification-eight-method`、`rectification-coverage-collect`、`rectification-occupation-coverage-exit`、`rectification-range-offer-deadend`、`rectification-collect-stall`。`./node_modules/.bin/tsc --noEmit` 通过。未做登录后的真实页面点选。 +- 防复发:不得把 `occupation`、财务或健康重新写进 `BLOCKING_COVERAGE_IDS`。覆盖完成后 `persistNextInterviewAfterChoice` 与 idle 都不得再追问 OOS 采集。不得放宽确认门或 3/2 下限。 +- 相关记录:BUG-453、BUG-463 +- 复发自:BUG-463(idle 不再追问,拒答路径与 occupation blocking 仍挡住采用卡) +- 修复版本:待发布 diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index 6d373047..2e4c5a16 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -2956,6 +2956,13 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class margin-block: var(--space-3); margin-inline-start: var(--assistant-content-inset); } +.rectification-question-slot__prompt { + margin: 0; + color: var(--color-ink); + font-size: var(--type-body-sm); + font-weight: 600; + line-height: 1.55; +} .rectification-question-slot__status { margin: 0; color: var(--color-ink-secondary); @@ -2988,16 +2995,14 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class border-radius: var(--radius-lg); background: var(--color-canvas-soft); } -.rectification-choice-card .birth-time-choice-question legend.sr-only { - position: absolute; - width: 1px; - height: 1px; +.rectification-choice-card .birth-time-choice-question legend { + display: block; + margin: 0 0 var(--space-3); padding: 0; - margin: 0; - overflow: hidden; - clip: rect(0, 0, 0, 0); - white-space: nowrap; - border: 0; + color: var(--color-ink); + font-size: var(--type-body-sm); + font-weight: 600; + line-height: 1.55; } .rectification-choice-card .birth-time-choice-question:disabled .birth-time-choice-option { cursor: default; diff --git a/frontend/src/components/rectification-agentic-chat.tsx b/frontend/src/components/rectification-agentic-chat.tsx index 58a70251..1872245f 100644 --- a/frontend/src/components/rectification-agentic-chat.tsx +++ b/frontend/src/components/rectification-agentic-chat.tsx @@ -325,6 +325,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) { const [boardDiff, setBoardDiff] = useState(() => diffRectificationBoard(null, null)); const boardId = useId(); const boardTitleId = useId(); + const collectSpokenPromptId = useId(); useLayoutEffect(() => { const query = window.matchMedia(`(max-width: ${RECTIFICATION_BOARD_SPLIT_MIN_PX - 1}px)`); @@ -1229,6 +1230,11 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) { onStop={submitStop} /> )} + {collectSpokenPrompt && !showLiveChoiceCard && !readonly && ( +

+ {collectSpokenPrompt} +

+ )} {showMissingQuestion && (

当前没有可回答的问题,正在等待服务端更新。 @@ -1278,6 +1284,9 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {