# PROGRESS · 组件库 K6 生时校正界面(2026-10-25) 工单 #110。分支 `codex/ui-kit-6-rectification-20261023`。基线 `origin/staging` `1516ad56ec66c5e80ef2a1f0ef4d82152b163699`(#109 报告、星历、登录和 #103 校正入口都在这个提交里)。只做任务书 **K6 生时校正界面**。K7 没收尾。没有重做校正入口、报告、登录、星盘页。 ## 结论 校正的选项卡片换成了组件库的单选标签。题目、计分、扣点和保存都没改。明确说要校正的人仍然直接开始,没做完的仍然接着做。 ## 做了什么 - 选项卡片(引导题和对话里的判断卡)改用 `ToggleGroup`,一次只选一个。原来的圆角、浅底描边、题干和选项原文都留着。不写「已选择」,卡片自己也不抢焦点。 - 「你对这个时间有多确定?」改用 `RadioGroup`,仍是三个圆点。「选一个最接近的范围」改用 `ToggleGroup`。 - 其余确认、暂停、重试、关闭、重新打开、采用,改用已有的 `Button`。关闭盘面仍是 Lucide 的叉,读屏名仍是「关闭盘面」。没有用字符当图标。 - 经历草稿的精度改用已有下拉。可见文字仍是「记得的精度」,触发按钮用 `aria-labelledby` 指到这句,方便读屏。对照 `frontend/docs/VOICE.md`:没有新文案,没有改题目。 - 题目出现时,若 Motion 在这次挂载之前已经载入,用已有的 `disclosure` 预设只淡入。减少动态效果时时长用预设里的 0.15 秒淡入,没有位移。没有新增循环。动效还没载入时不包一层,避免已经在屏幕上的内容再闪一次。 - 盘面探头仍用原来的 `createPortal` 挂到顶栏,没有改成弹窗。`rectification-agentic-chat.tsx` 因此仍留在白名单里。 - 白名单去掉 12 个校正文件,没有加长。测试里写死的基线名单没有改。 - 没有改 `page.tsx`,没有把整段校正拆出首页。`Home()` 的 useState / useRef 没有增长。没有给 `scripts/jyotish_api_server.py` 加方法。没有改 `.gitea/**`,没有改生产部署,没有改数据库,没有升级依赖。 移出白名单的 12 个文件:`birth-time-candidate-result.tsx`、`birth-time-choice-question.tsx`、`birth-time-evidence-draft-card.tsx`、`birth-time-guide-turn.tsx`、`birth-time-intake.tsx`、`birth-time-legacy-rectification.tsx`、`birth-time-rectification.tsx`、`rectification-board.tsx`、`rectification-choice-card.tsx`、`rectification-composer-reopen.tsx`、`rectification-range-delivery.tsx`、`rectification-segment-delivery.tsx`。 ## 断言改动(原值 / 新值 / 原因) | 位置 | 原值 | 新值 | 原因 | | --- | --- | --- | --- | | `frontend/tests/rectification-agentic-entry.test.ts` 持久化选择题的选项 class | `class="birth-time-choice-option is-primary"` 整段恰好 4 次 | 同一串作为 class 的一部分出现 4 次 | K6 选项改用 ToggleGroup,组件库会合并上自己的类。选项文案和读屏名称不变 | 选中态源码 `data-selected={selectedKey === option.key ? "true" : "false"}` 没有改。卡片仍不得出现 `Check`、「已选择」和 `.focus(`。 ## 自测 改前先在同一批测试上记过一笔。Windows 上本来就有 21 条失败。改完再跑,失败名单没有变长,通过的没有变少。 | 检查 | 命令 | 结果 | | --- | --- | --- | | 类型 | 仓库根 `frontend\node_modules\.bin\tsc --noEmit -p frontend` | 退出码 0 | | 检查 | 在 `frontend` 下 `npm run lint` | 退出码 0。122 个警告,0 error。警告数和上一张记下的一样 | | 校正前端 | 在 `frontend` 下 `node node_modules/tsx/dist/cli.mjs --test`,233 个 `rectification-*` / `birth-time-*` 测试文件加 `ui-kit-whitelist.test.ts` | 2291 条。通过 2270,失败 21,取消 0。与改前一致 | | Python | `.venv\Scripts\python.exe -m pytest`,`tests/test_rectification_*.py` 共 26 个文件 | 退出码 0,进度到 100% | | 构建 | 在 `frontend` 下 `npm run build` | 退出码 0。编译 10.3s,TypeScript 30.5s。79 个静态页。`/` 仍是 ○ Static。5 条既有 skill-package-registry 警告,没有改 | | 首屏体积 | 首页 `index.html` 引用的 `/_next/static/**.js`,gzip-9 相加,不含 CSS | 基线是 #109 在 `1516ad56` 记下的 35 个文件、642174 字节。本张 37 个文件,缺失 0,644683 字节,多 2509(+0.39%)。±2% 大约是 629331 到 655017。没有把校正拆出首页 | 改前就失败、改完仍是这 21 条(没有新增): 1. public code never imports the internal dynamic choice contract(路径被拼成 `G:\G:\...`) 2. candidate scores stay out of the specified client ownership boundary(同上) 3. A · typed answer to a pending choice(BUG-1045,`getComputedStyle`) 4. A · collect denial with a next choice(BUG-1045) 5. B · failed choice submit 409(BUG-1046,`window is not defined`) 6. B · failed choice submit network error(BUG-1046) 7. B · typed answer that never reaches the server 8. D3 · live focus moves to the latest message(BUG-635) 9. D3 · persisted question with no asked turn 10. D3 · standalone block fallback 11. D4 · willContinue 12. D4 · send() settle 13. C · superseded focus(BUG-1135) 14. C · client guard(BUG-1135) 15. C · stem left in the body(BUG-1135) 16. Skill bump 10.0.32 keeps Cases pinned(BUG-621) 17. D3 · first stage line 18. D3 · turn.rejected 19. opening on the real surface · body only 20. opening on the real surface · body + stem 21. agent pins the dedicated rectification skill and its fixed version 没有跑前端全量 `npm test`,没有跑 Python 快速门,没有跑 `test:db`。没有为了让测试通过去改计分或落库。 ## 环境缺口 - 没有登录态,没有模型凭据。没有在浏览器里走完一次校正。不写成通过。可照做的步骤在 `docs/testing/ui-kit-migration-20261023.md` 的「生时校正」一节。