From 4bf074b2bfce4b54ba7d56a907890d54addd0468 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Fri, 28 Aug 2026 09:10:56 +0800 Subject: [PATCH] fix(rectification): show choice-card prompt instead of hiding it BUG-401 hid the legend to avoid duplicating Agent copy. After the question contract, the Agent only leads in, so the persisted stem must be visible on the card. Co-authored-by: Cursor --- docs/BUG_HISTORY.md | 16 ++++++++++++++++ .../src/components/rectification-choice-card.tsx | 2 +- .../tests/rectification-agentic-entry.test.ts | 5 +++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 7e26c65a..0af32f7a 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -6188,3 +6188,19 @@ - 复发自:BUG-403(动态四选项合同未贯穿 Python/排序)、BUG-404(Focus 与口语问题仍可分裂) - 修复版本:10.0.13 +## BUG-406 | 点选题干只在无障碍 legend 里,卡片上看不到 + +- 状态:resolved +- 首次发现:2026-08-28 +- 最近更新:2026-08-28 +- 影响面:`rectification-choice-card`、GET `choice_card.prompt`、生时纠正 Agent 口语 +- 用户现象:区分阶段出现 A/B/C/D,气泡只说“请看下面的选项”,卡片上方没有年份和事件家族;用户看不到要核对的是哪一类经历。 +- 触发条件:服务器已持久化 `choice_card.prompt`(`年份 · 事件家族`),Agent 按 P0 只写承接句、不复述题干。 +- 根因:BUG-401 把卡片 legend 设为 `sr-only`,当时题干由 Agent 正文展示。BUG-405 改为正文只做承接、题干以 Focus/卡片为真源,但没有取消 `sr-only`,题干两边都不出现。 +- 修复:卡片 legend 恢复为可见题干,与 GET `choice_card.prompt` 同一份文案。不改 Skill `10.0.13`。 +- 验证:`frontend/tests/rectification-agentic-entry.test.ts` 锁定可见 `{props.card.prompt}`,禁止 `sr-only`。 +- 防复发:有点选卡时题干必须在卡片上可见。Agent 承接句不得替代卡片题干。不得再把 `choice_card.prompt` 藏进 `sr-only`。 +- 相关记录:BUG-400、BUG-401、BUG-405 +- 复发自:BUG-401(卡片隐藏题干)叠加 BUG-405(正文不再复述题干) +- 修复版本:待发布 + diff --git a/frontend/src/components/rectification-choice-card.tsx b/frontend/src/components/rectification-choice-card.tsx index 555870a9..f4666159 100644 --- a/frontend/src/components/rectification-choice-card.tsx +++ b/frontend/src/components/rectification-choice-card.tsx @@ -42,7 +42,7 @@ export function RectificationChoiceCard(props: RectificationChoiceCardProps) { aria-label={props.card.scoring ? "校正判断" : "盘外核对"} >
- {props.card.prompt} + {props.card.prompt} {props.card.why ?

{props.card.why}

: null}
{primary.map((option, index) => ( diff --git a/frontend/tests/rectification-agentic-entry.test.ts b/frontend/tests/rectification-agentic-entry.test.ts index ac49c9d0..9f7b7405 100644 --- a/frontend/tests/rectification-agentic-entry.test.ts +++ b/frontend/tests/rectification-agentic-entry.test.ts @@ -667,8 +667,9 @@ test("the Agent prompt cannot offer candidates while asking for more evidence", assert.doesNotMatch(tools, /offer_selection/); }); -test("choice cards keep the question accessible without repeating it visually", () => { - assert.match(choiceCardComponent, /\{props\.card\.prompt\}<\/legend>/); +test("choice cards render the persisted prompt as the visible question stem", () => { + assert.match(choiceCardComponent, /\{props\.card\.prompt\}<\/legend>/); + assert.doesNotMatch(choiceCardComponent, /\{props\.card\.prompt\}<\/legend>/); }); test("adopted time offers a consultation handoff without unique-minute copy", () => {