fix(rectification): hide option hover impact and composer step strip (BUG-575)
Hovering A/B/C/D rewrote a leading/lagging time line and made the card flicker; the step-state sentence above the composer was instructional filler, not something the user needed to answer. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -55,10 +55,11 @@ test("step state parser rejects forbidden certainty words", () => {
|
||||
assert.doesNotMatch(blob, /概率|置信度|确定/);
|
||||
});
|
||||
|
||||
test("chat renders rectification-step-state above the composer", () => {
|
||||
test("chat does not render the step-state strip above the composer", () => {
|
||||
const chat = readFileSync(new URL("../src/components/rectification-agentic-chat.tsx", import.meta.url), "utf8");
|
||||
const route = readFileSync(new URL("../src/app/api/rectification/cases/[caseId]/route.ts", import.meta.url), "utf8");
|
||||
assert.match(chat, /rectification-step-state/);
|
||||
assert.doesNotMatch(chat, /rectification-step-state/);
|
||||
assert.doesNotMatch(chat, /下一步:\{stepState\.next\}/);
|
||||
assert.match(chat, /rectification-composer-meta/);
|
||||
assert.match(route, /step_state: stepStateFromCaseDossier/);
|
||||
});
|
||||
|
||||
@@ -136,6 +136,9 @@ test("the choice card confirms the tap and the board's first state shows the dec
|
||||
assert.match(choiceCard, /data-selected=\{selectedKey === option\.key \? "true" : "false"\}/);
|
||||
assert.match(choiceCard, /rectification-choice-card__pending/);
|
||||
assert.match(choiceCard, /InlineSpinner size=\{12\}/);
|
||||
assert.doesNotMatch(choiceCard, /onMouseEnter/);
|
||||
assert.doesNotMatch(choiceCard, /rectification-choice-impact/);
|
||||
assert.doesNotMatch(choiceCard, /hoveredKey/);
|
||||
assert.doesNotMatch(styles, /\.rectification-choice-card__selected/);
|
||||
assert.match(styles, /\.rectification-choice-card__pending \{/);
|
||||
// BUG-518: scoring cards do not render 先这样,先看当前范围; reverse_verify still has 这题跳过.
|
||||
|
||||
@@ -235,9 +235,9 @@ test("shouldStartOpening is server-owned: only freshly created never-started cas
|
||||
assert.equal(shouldStartOpening("readonly", 0), false);
|
||||
});
|
||||
|
||||
test("case snapshot includes step_state", () => {
|
||||
test("case snapshot includes step_state without a composer strip", () => {
|
||||
const route = readFileSync(new URL("../src/app/api/rectification/cases/[caseId]/route.ts", import.meta.url), "utf8");
|
||||
const chat = readFileSync(new URL("../src/components/rectification-agentic-chat.tsx", import.meta.url), "utf8");
|
||||
assert.match(route, /step_state: stepStateFromCaseDossier\(dossier\)/);
|
||||
assert.match(chat, /rectification-step-state/);
|
||||
assert.doesNotMatch(chat, /rectification-step-state/);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user