feat(rectification): 区间常驻条补代表分钟与已答题数,盘面五段折叠收成两段
R7 / 决策 D10。任务书 docs/tasks/TASK-cend-surfaces-claude-alignment-20260916.md。 T7.1 常驻条。任务书 E9 说区间只在盘面标题行,实际读代码:对话区顶部 已有常驻条 RectificationTimeline 且已显示区间与宽度,窄屏 .is-compact 下 也可见。真正只存在于 .rectification-board__clock 的是代表分钟——窄屏盘面 是默认关闭的 overlay,代表分钟就此看不见。所以没有另造第二条(会撞固定条 高这条正确性约束),而是在既有条上补齐缺的两项: 05:07–05:09 · 3 分钟 · 代表分钟 05:08 · 已答 6 题 代表分钟与盘面标题行是同一次 workingRectificationTime(result) 调用,一个 值两处用,不是两条推导路径。已答题数逐字读服务端的 inference_state.answered_probe_count,投影没给就整项不显示,不补「已答 0 题」。 条上不写确认,边界句仍只在交付/采用旁白里出现一次。读数只增宽不增高:条高 在滚动容器外,变高会让贴底读者的内容无声滑出视野。 收窄进度未做,触发让步顺序第 5 条。没有这个字段(服务端只把这句话拼进旁白 正文),且前端自己减会算错——candidate_range 是当前窗口且会放宽(BUG-572), 拿它当「最初」相减会把一次放宽报成一次收窄。缺口与解除条件写进 BLOCKED.md。 T7.2 盘面折叠。实际有 8 个 details(任务书记的五处漏了交界节奏、错标了两块), 按内容归成「候选分钟」(换升时刻 + 次级候选)与「参数与口径」(宫位表、确认门、 本轮技法、两段本命上升、经历与大运对照含双轨一致性、交界节奏)。每块保留原有 渲染条件,engineMeaningToDisplayCopy() 仍是 5 处,逐分钟行的 is-changed / 当前时间 一字未改。共享组件 technique-audit-disclosure.tsx 未动。 顺带修掉一个静默失效的断言:rectification-agentic-entry 用 board.slice(indexOf(A), indexOf(B)),B 改名后 indexOf 返回 -1,slice(i, -1) 会悄悄退化成几乎整份文件,底下四条 doesNotMatch 照样绿。已换成带越界断言的 sliceBetween()。两处改动的断言都在测试里写了原值/新值/原因。 tsc 0 错;lint 0 error / 118 warning(同基线);npm test 3350 → 3360,失败 仍是 31 条无 Docker 用例且与基线逐条一致;next build exit 0,/ 仍 ○ Static; 产物 CSS gzip 39,017 → 38,973 B(−0.11%)。 窄屏 .is-compact 下常驻条的实际可见性无 Chrome 无法验证,已按任务书写成环境 缺口,未标通过;CSS 上已确认无任何规则在该状态下隐藏该条,并写成测试断言。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0193vBv6w5MV2cifdTUu9H5P
This commit is contained in:
co-authored by
Claude Opus 5
parent
a1a78c7ebc
commit
ca0204984b
@@ -510,18 +510,33 @@ test("the natal house table is a live board beside the chat, not a message", ()
|
||||
chat.indexOf("{messages.map((message) => {"),
|
||||
chat.indexOf("{savedTime &&"),
|
||||
);
|
||||
const snapshot = board.slice(
|
||||
board.indexOf("className=\"rectification-snapshot\""),
|
||||
board.indexOf("{scoringMinutes.length > 0 || displayMinutes.length > 0"),
|
||||
);
|
||||
// A slice whose end marker has gone missing silently becomes `slice(i, -1)`,
|
||||
// i.e. almost the whole file, and every doesNotMatch below stops meaning what
|
||||
// it says. Fail loudly on a renamed marker instead.
|
||||
const sliceBetween = (source: string, from: string, to: string): string => {
|
||||
const start = source.indexOf(from);
|
||||
const end = source.indexOf(to);
|
||||
assert.ok(start >= 0, `marker not found: ${from}`);
|
||||
assert.ok(end > start, `marker not found after ${from}: ${to}`);
|
||||
return source.slice(start, end);
|
||||
};
|
||||
// 原值: snapshot 切到 `{scoringMinutes.length > 0 || displayMinutes.length > 0`,
|
||||
// 并断言 `<RectificationHouseTableView` 就在 snapshot 里。
|
||||
// 新值: snapshot 切到 `{hasMinuteDetail && (`,宫位表改在「参数与口径」段里断言。
|
||||
// 原因: D10 把盘面五个折叠块收敛成「候选分钟」与「参数与口径」两段,本命宫位表
|
||||
// 随之从 `.rectification-snapshot` 移进「参数与口径」。旧终点标记已不存在,
|
||||
// 留着会让 slice 退化成整份文件。宫位表仍在盘面、不在消息流,断言不变。
|
||||
const snapshot = sliceBetween(board, "className=\"rectification-snapshot\"", "{hasMinuteDetail && (");
|
||||
const parameterSection = board.slice(board.indexOf("{hasParameterDetail && ("));
|
||||
// 原值: `<ChatMessageRow` 在容器 map 循环里。
|
||||
// 新值: 循环渲染 `RectificationMessageEntry`,ChatMessageRow 在行组件内。
|
||||
// 原因: BUG-725。
|
||||
const rowIndex = messageLoop.indexOf("<RectificationMessageEntry");
|
||||
const snapshotIndex = snapshot.indexOf("className=\"rectification-snapshot\"");
|
||||
const houseIndex = snapshot.indexOf("<RectificationHouseTableView");
|
||||
assert.ok(rowIndex >= 0);
|
||||
assert.ok(snapshotIndex >= 0 && houseIndex > snapshotIndex);
|
||||
// The chart is what stays unfolded; the table is one click into 参数与口径.
|
||||
assert.match(snapshot, /<VedicChartSvg/);
|
||||
assert.doesNotMatch(snapshot, /<RectificationHouseTableView/);
|
||||
assert.ok(parameterSection.indexOf("<RectificationHouseTableView") > 0);
|
||||
assert.doesNotMatch(snapshot, /<RectificationCandidateCards/);
|
||||
assert.doesNotMatch(snapshot, /当前可能的出生时间/);
|
||||
assert.doesNotMatch(messageLoop, /className="rectification-snapshot"/);
|
||||
|
||||
Reference in New Issue
Block a user